postfix-dovecot Auth USER lookup failed
I'm running postfix + dovecot on my CentOS-7 home server. When I send myself a message I get this error message in /var/log/maillog: Aug 9 12:59:57 alfred postfix/lmtp[31336]: B0D02220748: to=tim@localhost.gayleard.eu, orig_to=tim@localhost, relay=alfred.gayleard.eu[private/dovecot-lmtp], delay=475, delays=474/0.03/0.02/0.09, dsn=4.3.0, status=deferred (host alfred.gayleard.eu[private/dovecot-lmtp] said: 451 4.3.0 tim@localhost.gayleard.eu Internal error occurred. Refer to server log for more information. (in reply to RCPT TO command)) and in /var/log/dovecot I read Aug 09 13:13:03 auth-worker(31472): Error: passwd(tim@localhost.gayleard.eu): getpwnam() failed: Address family not supported by protocol Aug 09 13:13:03 lmtp(31470): Error: user tim@localhost.gayleard.eu: Auth USER lookup failed
It seems that USER is set to tim@localhost.gayleard.eu rather than tim .
I am including the line mailbox_transport = lmtp:unix:private/dovecot-lmtp in /etc/postfix/main.cf . If I omit this line so that postfix sends email directly to ~/Maildir I have no problem - except that spam is not being filtered.
I give the output of postconf -n below.
Any advice or enlightenment gratefully received.
Output of postconf -n
[tim@alfred ~]$ cat /tmp/postconf alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases command_directory = /usr/sbin config_directory = /etc/postfix daemon_directory = /usr/libexec/postfix data_directory = /var/lib/postfix debug_peer_level = 2 debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5 home_mailbox = Maildir/ html_directory = no inet_interfaces = all inet_protocols = all mail_owner = postfix mailbox_transport = lmtp:unix:private/dovecot-lmtp mailq_path = /usr/bin/mailq.postfix manpage_directory = /usr/share/man mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain mydomain = gayleard.eu myhostname = alfred.gayleard.eu mynetworks = 192.168.0.0/24, 127.0.0.0/8 myorigin = $mydomain newaliases_path = /usr/bin/newaliases.postfix queue_directory = /var/spool/postfix readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES relay_domains = relayhost = out.alice.it sample_directory = /usr/share/doc/postfix-2.6.6/samples sendmail_path = /usr/sbin/sendmail.postfix setgid_group = postdrop smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/password smtp_sasl_security_options = smtpd_milters = unix:/var/run/spamass-milter/postfix/sock unknown_local_recipient_reject_code = 550
--
Timothy Murphy
e-mail: gayleard /at/ eircom.net
School of Mathematics, Trinity College, Dublin 2, Ireland
On 08/09/2014 11:30 AM, Timothy Murphy wrote:
I'm running postfix + dovecot on my CentOS-7 home server. When I send myself a message I get this error message in /var/log/maillog: Aug 9 12:59:57 alfred postfix/lmtp[31336]: B0D02220748: to=tim@localhost.gayleard.eu, orig_to=tim@localhost, relay=alfred.gayleard.eu[private/dovecot-lmtp], delay=475, delays=474/0.03/0.02/0.09, dsn=4.3.0, status=deferred (host alfred.gayleard.eu[private/dovecot-lmtp] said: 451 4.3.0 tim@localhost.gayleard.eu Internal error occurred. Refer to server log for more information. (in reply to RCPT TO command)) and in /var/log/dovecot I read Aug 09 13:13:03 auth-worker(31472): Error: passwd(tim@localhost.gayleard.eu): getpwnam() failed: Address family not supported by protocol Aug 09 13:13:03 lmtp(31470): Error: user tim@localhost.gayleard.eu: Auth USER lookup failed
It seems that USER is set to tim@localhost.gayleard.eu rather than tim .
I am including the line mailbox_transport = lmtp:unix:private/dovecot-lmtp in /etc/postfix/main.cf .
your (missing) doveconf -n
doesn't contain auth_username_format = %Ln.
So, edit your conf.d/10-auth.conf and set auth_username_format to %Ln.
Regards, Pascal
The trapper recommends today: cafefeed.1422118@localdomain.org
Pascal Volk wrote:
in /var/log/dovecot I read Aug 09 13:13:03 auth-worker(31472): Error: passwd(tim@localhost.gayleard.eu): getpwnam() failed: Address family not supported by protocol Aug 09 13:13:03 lmtp(31470): Error: user tim@localhost.gayleard.eu: Auth USER lookup failed
It seems that USER is set to tim@localhost.gayleard.eu rather than tim .
your (missing)
doveconf -n
doesn't contain auth_username_format = %Ln. So, edit your conf.d/10-auth.conf and set auth_username_format to %Ln.
Thanks very much - that seems to have been the whole problem. After changing %Lu (the default) to %Ln everything seems to be working, including spam being sent to ~/Maildir/.Spam.
It does seem slightly odd to me that %u stands for user + domain, while %n stands for user without domain? And why is %Lu the default? Is it just for those using an SQL user database?
--
Timothy Murphy
e-mail: gayleard /at/ eircom.net
School of Mathematics, Trinity College, Dublin 2, Ireland
participants (2)
-
Pascal Volk
-
Timothy Murphy