Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 7th June 2012, 09:02
Kanyin Kanyin is offline
Junior Member
 
Join Date: Jun 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Postfix/Dovecot: Recipient address rejected: User unknown in virtual mailbox table

Hello,

I've recently set up a mail server with Postfix, Dovecot, Mysql and I'm able to send mail from the server. I am unable to recieve mail however. When testing, I send an email my my gmail account to the server email account and I recieve: Recipient address rejected: User unknown in virtual mailbox table (state 13)

My mail.log contains the following after a failed send attempt (Note *email removed* is not original text. I removed them):
Jun 7 06:59:30 localhost postfix/smtpd[8853]: connect from mail-vb0-f41.google.com[209.85.212.41]
Jun 7 06:59:30 localhost postfix/smtpd[8853]: Anonymous TLS connection established from mail-vb0-f41.google.com[209.85.212.41]: TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)
Jun 7 06:59:30 localhost postgrey[29968]: action=pass, reason=client whitelist, client_name=mail-vb0-f41.google.com, client_address=209.85.212.41, sender=*email removed*, recipient=*email removed*
Jun 7 06:59:30 localhost postfix/smtpd[8853]: NOQUEUE: reject: RCPT from mail-vb0-f41.google.com[209.85.212.41]: 550 5.1.1 <*email removed*>: Recipient address rejected: User unknown in virtual mailbox table; from=<*email removed*> to=<*email removed*> proto=ESMTP helo=<mail-vb0-f41.google.com>
Jun 7 06:59:30 localhost postfix/smtpd[8853]: disconnect from mail-vb0-f41.google.com[209.85.212.41]

UPDATE: I've fixed the server not getting the emails. I forgot to create the account.....I'm now receiving a new error message.

Jun 7 07:27:42 localhost dovecot: auth-worker: mysql(localhost): Connected to database mail
Jun 7 07:27:42 localhost dovecot: auth-worker: Error: mysql: Query failed, retrying: Table 'mail.users' doesn't exist
Jun 7 07:27:42 localhost dovecot: auth-worker: Error: sql(*email removed*): User query failed: Table 'mail.users' doesn't exist (using built-in default user_query: SELECT home, uid, gid FROM users WHERE username = '%n' AND domain = '%d')
Jun 7 07:27:42 localhost dovecot: lda: Error: user *email removed*: Auth USER lookup failed
Jun 7 07:27:42 localhost dovecot: lda: Fatal: Internal error occurred. Refer to server log for more information.
Jun 7 07:27:42 localhost postfix/pipe[8950]: 5A859481F6: to=<*email removed*>, relay=dovecot, delay=0.06, delays=0/0.01/0/0.05, dsn=4.3.0, status=deferred (temporary failure)

UPDATE: OK the fix for this was to change the user_query in /etc/dovecot/dovecot-sql.conf.ext to the following
user_query = \
SELECT '/var/vmail/%d/%n' as home, 'maildir:/var/vmail/%d/%n' as mail, \
150 AS uid, 8 AS gid, concat('dirsize:storage=', quota) AS quota \
FROM mailbox WHERE username = '%u' AND active = '1'

Talking myself through my problems by posting them here really helped lol. Thank you.

****One Last Problem*****

I'm unable to connect to my pop3 server via Outlook to download the messages. This is what the mail.log says when trying to set up the account in Outlook.

Jun 7 08:24:00 localhost postfix/smtpd[10351]: warning: hostname 97-104-71-152.res.bhn.net does not resolve to address 97.104.71.152: Name or service not known
Jun 7 08:24:00 localhost postfix/smtpd[10351]: connect from unknown[97.104.71.152]
Jun 7 08:24:00 localhost postfix/smtpd[10351]: warning: SASL: Connect to private/auth failed: Connection refused
Jun 7 08:24:00 localhost postfix/smtpd[10351]: fatal: no SASL authentication mechanisms
Jun 7 08:24:00 localhost postfix/smtpd[10353]: warning: hostname 97-104-71-152.res.bhn.net does not resolve to address 97.104.71.152: Name or service not known
Jun 7 08:24:00 localhost postfix/smtpd[10353]: connect from unknown[97.104.71.152]
Jun 7 08:24:00 localhost postfix/smtpd[10353]: warning: SASL: Connect to private/auth failed: Connection refused
Jun 7 08:24:00 localhost postfix/smtpd[10353]: fatal: no SASL authentication mechanisms
Jun 7 08:24:01 localhost postfix/master[9095]: warning: process /usr/lib/postfix/smtpd pid 10351 exit status 1
Jun 7 08:24:01 localhost postfix/master[9095]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling
Jun 7 08:24:01 localhost postfix/master[9095]: warning: process /usr/lib/postfix/smtpd pid 10353 exit status 1
Jun 7 08:25:01 localhost postfix/smtpd[10358]: warning: hostname 97-104-71-152.res.bhn.net does not resolve to address 97.104.71.152: Name or service not known
Jun 7 08:25:01 localhost postfix/smtpd[10358]: connect from unknown[97.104.71.152]
Jun 7 08:25:01 localhost postfix/smtpd[10358]: warning: SASL: Connect to private/auth failed: Connection refused
Jun 7 08:25:01 localhost postfix/smtpd[10358]: fatal: no SASL authentication mechanisms
Jun 7 08:25:01 localhost postfix/smtpd[10359]: warning: hostname 97-104-71-152.res.bhn.net does not resolve to address 97.104.71.152: Name or service not known
Jun 7 08:25:01 localhost postfix/smtpd[10359]: connect from unknown[97.104.71.152]
Jun 7 08:25:01 localhost postfix/smtpd[10359]: warning: SASL: Connect to private/auth failed: Connection refused
Jun 7 08:25:01 localhost postfix/smtpd[10359]: fatal: no SASL authentication mechanisms
Jun 7 08:25:01 localhost postfix/smtpd[10360]: warning: hostname 97-104-71-152.res.bhn.net does not resolve to address 97.104.71.152: Name or service not known
Jun 7 08:25:01 localhost postfix/smtpd[10360]: connect from unknown[97.104.71.152]
Jun 7 08:25:01 localhost postfix/smtpd[10360]: warning: SASL: Connect to private/auth failed: Connection refused
Jun 7 08:25:01 localhost postfix/smtpd[10360]: fatal: no SASL authentication mechanisms
Jun 7 08:25:01 localhost postfix/smtpd[10361]: warning: hostname 97-104-71-152.res.bhn.net does not resolve to address 97.104.71.152: Name or service not known
Jun 7 08:25:01 localhost postfix/smtpd[10361]: connect from unknown[97.104.71.152]
Jun 7 08:25:01 localhost postfix/smtpd[10361]: warning: SASL: Connect to private/auth failed: Connection refused
Jun 7 08:25:01 localhost postfix/smtpd[10361]: fatal: no SASL authentication mechanisms
Jun 7 08:25:02 localhost postfix/master[9095]: warning: process /usr/lib/postfix/smtpd pid 10358 exit status 1
Jun 7 08:25:02 localhost postfix/master[9095]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling
Jun 7 08:25:02 localhost postfix/master[9095]: warning: process /usr/lib/postfix/smtpd pid 10359 exit status 1
Jun 7 08:25:02 localhost postfix/master[9095]: warning: process /usr/lib/postfix/smtpd pid 10360 exit status 1
Jun 7 08:25:02 localhost postfix/master[9095]: warning: process /usr/lib/postfix/smtpd pid 10361 exit status 1

UPDATE: Everything is fixed and working. Unfortunately I ran into about a million problems after this one and went on a bug fix spree so I'm not sure how I fixed this problem at the moment. I'll try to help anyway though if anyone comes across this.

This error was due to me not giving the ability for users to auth with the server. I had ssl and plain text login turned off, configuration error on my part. I enabled those and this problem went away. You'll have to dig around in the dovecot conf to find the exact settings to do it but start there.

Last edited by Kanyin; 7th June 2012 at 15:42.
Reply With Quote
Sponsored Links
  #2  
Old 7th June 2012, 13:50
TiTex TiTex is offline
Senior Member
 
Join Date: Aug 2011
Location: Cluj-Napoca,Romania
Posts: 125
Thanks: 0
Thanked 18 Times in 17 Posts
Send a message via Skype™ to TiTex
Default

can you post the output of
Code:
dovecot -n
at the end of the output you should have something like this

Code:
>   socket:
     type: listen
    client:
      path: /var/spool/postfix/private/auth
      mode: 432
      user: postfix
      group: postfix	
     master:
       path: /var/spool/postfix/private/auth
       mode: 432
       user: postfix
       group: postfix
Reply With Quote
  #3  
Old 14th August 2012, 16:47
(O)fer_cz (O)fer_cz is offline
Junior Member
 
Join Date: Sep 2011
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi, i've got similar problem i can receive mails, but i can't send them everything worked but now, it somehow stopped


mail.log on mail server

Quote:
Aug 14 16:20:02 mail dovecot: pop3-login: Disconnected (no auth attempts): rip=127.0.0.1,

lip=127.0.0.1, secured
Aug 14 16:20:02 mail dovecot: imap-login: Disconnected (no auth attempts): rip=127.0.0.1,

lip=127.0.0.1, secured
Aug 14 16:20:02 mail postfix/smtpd[20471]: connect from localhost[127.0.0.1]
Aug 14 16:20:02 mail postfix/smtpd[20471]: lost connection after CONNECT from localhost

[127.0.0.1]
Aug 14 16:20:02 mail postfix/smtpd[20471]: disconnect from localhost[127.0.0.1]
Aug 14 16:20:03 mail postfix/smtpd[20471]: connect from web.example.com[web-ip]
Aug 14 16:20:03 mail postfix/smtpd[20471]: NOQUEUE: reject: RCPT from web.example.com

[web-ip]: 550 5.1.1 <www-data@example.com>: Recipient address rejected: User unknown

in virtual mailbox table; from=<www-data@example.com> to=<www-data@example.com> proto=ESMTP

helo=<web.example.com>
Aug 14 16:20:03 mail postfix/smtpd[20471]: warning: network_biopair_interop: error writing

37 bytes to the network: Broken pipe
Aug 14 16:20:03 mail postfix/smtpd[20471]: disconnect from web.example.com[web-ip]
Aug 14 16:20:03 mail postfix/smtpd[20471]: connect from web.example.com[web-ip]
Aug 14 16:20:03 mail postfix/smtpd[20471]: NOQUEUE: reject: RCPT from web.example.com

[web-ip]: 550 5.1.1 <www-data@example.com>: Recipient address rejected: User unknown

in virtual mailbox table; from=<> to=<www-data@example.com> proto=ESMTP

helo=<web.example.com>
Aug 14 16:20:03 mail postfix/smtpd[20471]: disconnect from web.example.com[ip]
Aug 14 16:20:26 mail dovecot: imap-login: Login: user=<mailbox@maildomain.com>,

method=PLAIN, rip=web-ip, lip=mail-ip, TLS
Aug 14 16:20:26 mail postfix/smtpd[20943]: connect from web.example.com[ip]
Aug 14 16:20:28 mail postfix/smtpd[20943]: warning: web.example.com[ip]: SASL

LOGIN authentication failed: UGFzc3dvcmQ6
Aug 14 16:20:28 mail postfix/smtpd[20943]: disconnect from web.example.com[ip]
Aug 14 16:20:28 mail dovecot: IMAP(mail.box@maildomain.com): Disconnected: Logged out

bytes=12/342
dovecot -n

Quote:
socket:
type: listen
client:
path: /var/spool/postfix/private/auth
mode: 432
user: postfix
group: postfix
master:
path: /var/run/dovecot/auth-master
mode: 384
user: vmail
plugin:
quota: dict:user::file:/var/vmail/%d/%n/.quotausage
sieve: /var/vmail/%d/%n/.sieve
exim setup http://www.howtoforge.com/exim-authenticated-smarthost

exim log on web server

Quote:
2012-08-14 21:25:14 1T1Mjq-0001Q2-I6 <= info@phpsite.com U=web135 P=local S=801

id=20120814192514.5455.1908849208.swift@phpsite.co m
2012-08-14 21:25:16 1T1Mjq-0001Q2-I6 plain authenticator failed H=mail.example.com

[31.30.1.175] 535 5.7.8 Error: authentication failed:
2012-08-14 21:25:18 1T1Mjq-0001Q2-I6 login authenticator failed H=mail.example.com

[31.30.1.175] 535 5.7.8 Error: authentication failed: UGFzc3dvcmQ6
2012-08-14 21:25:18 1T1Mjq-0001Q2-I6 ** address@phpsite.com R=smarthost

T=remote_smtp_smarthost: SMTP error from remote mail server after RCPT

TO:<address@send.to>: host mail.example.com [31.30.1.175]: 554 5.7.1 <address@send.to>:

Relay access denied
2012-08-14 21:25:18 1T1Mju-0001Q5-4s <= <> R=1T1Mjq-0001Q2-I6 U=Debian-exim P=local S=1753
2012-08-14 21:25:18 1T1Mjq-0001Q2-I6 Completed
2012-08-14 21:25:20 1T1Mju-0001Q5-4s plain authenticator failed H=mail.example.com

[31.30.1.175] 535 5.7.8 Error: authentication failed:
2012-08-14 21:25:22 1T1Mju-0001Q5-4s login authenticator failed H=mail.example.com

[31.30.1.175] 535 5.7.8 Error: authentication failed: UGFzc3dvcmQ6
2012-08-14 21:25:22 1T1Mju-0001Q5-4s ** info@phpsite.com R=smarthost T=remote_smtp_smarthost:

SMTP error from remote mail server after RCPT TO:<info@phpsite.com>: host

mail.example.com[ip]: 554 5.7.1 <info@phpsite.com>: Relay access denied
2012-08-14 21:25:22 1T1Mju-0001Q5-4s Frozen (delivery error message)
__________________
IBM Server x3550 797841G, VMWare ESXi 5, Debian 6 Squeeze, ISPConfig 3, multi-server setup

Last edited by (O)fer_cz; 14th August 2012 at 21:46.
Reply With Quote
  #4  
Old 15th August 2012, 13:31
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
 
Default

Do you use Postfix or Exim?

Do you get any error messages? Did you check if your server is blacklisted?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ubuntu and nginx delgado2061 Installation/Configuration 0 27th November 2011 23:36
SquirrelMail login not working glenneh Installation/Configuration 13 9th April 2011 20:01
dovecot: lda: Fatal: Unknown user dpicella Installation/Configuration 1 22nd August 2010 02:59
Sending emails with custom FROM email address merisor Installation/Configuration 4 8th February 2010 16:27
Apache2 Freezes celtic Server Operation 31 28th May 2007 17:18


All times are GMT +2. The time now is 18:38.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.