After doing a major Ubuntu dist upgrade from 10.04 to 12.04, my virtual-user postfix / dovecot installation only offers "PLAIN" SMTP Authentication mechanism.
It used to offer PLAIN + LOGIN mechanisms, and I have tried everything under the sun to get the the LOGIN one back again, but it just won't do it.
Without the "LOGIN" version, a lot of MS-based clients (windows live, outlook express) can no longer send mail using SMTP Auth. I've had to put their IP addresses in to my 'mynetworks' list.
I even tried setting up a from-scratch postfix+dovecot+virtual users smtp server with 12.04.1, thinking that it had to be something to do with the upgrade, but can't get anything more than AUTH PLAIN to be offered on the new system either.
Has anyone successfully set up a working postfix + dovecot + virtual users mail server on 12.04 that properly does SMTP Auth?
My current dovecot config: http://pastie.org/5651874
and current postfix config: http://pastie.org/5651882
.
FYI here are the excerpts of configurations I've tried:
(A):
/etc/dovecot/conf.d/10-auth.conf:
auth_mechanisms = plain login
/etc/dovecot/conf.d/10-master.conf:
service auth {
unix_listener auth-userdb {
}
inet_listener {
port = 12345
}
}
/etc/postfix/main.cf
smtpd_sasl_auth_enable = yes
smtpd_sasl_exceptions_networks = $mynetworks
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_sasl_path = inet:127.0.0.1:12345
Results in
... warning: SASL: Connect to inet:127.0.0.1:12345 failed: Connection refused
... fatal: no SASL authentication mechanisms
from my logs.
.
.
And (B):
/etc/dovecot/conf.d/10-auth.conf:
auth_mechanisms = plain login
/etc/dovecot/conf.d/10-master.conf:
service auth {
unix_listener auth-userdb {
}
unix_listener /var/spool/postfix/private/auth {
mode = 0666
user = postfix
group = postfix
}
}
/etc/postfix/main.cf
smtpd_sasl_auth_enable = yes
smtpd_sasl_exceptions_networks = $mynetworks
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
Results in only the PLAIN mechanism being offered.
.
The documentation that adaptr referenced in his answer doesn't have any example of the UNIX socket style config for Dovecot 2, so I'm hoping that someone with more experience can guide me here.
As documented, dovecot must advertise the appropriate mechanisms.
Well, from what I see in your posted configuration you never set Dovecot's
auth_mechanisms = plain login
, thus the default ofauth_mechanisms = plain
is used. Try updating that setting and restarting Dovecot, afterwards re-check the output ofdoveconf -n
.Your auth socket settings seem correct to me, Postfix should be able to do SASL authentication against Dovecot.
I was having this same problem on CentOS 6 and the cause of my problem was different:
Having the setting:
in main.cf stripped
from EHLO output during a telnet session. Putting it in master.cf restored the output and intended behavior:
I felt it was worth sharing this solution since at least three tutorials I found online suggested that it was okay to include this setting in main.cf.