Postfix SASL SMTP Authentication problem
I've got a Debian Etch mail server that I'm trying to get Cyrus-SASL to work on. I'm using Postfix 2.5.5 and 2.1.22 of saslauthd. No matter what I do, I can't seem to get any SMTP authentication to work.
I have the following in /etc/postfix/sasl/smtpd.conf:
Here is the relevant part of my main.cf for postfix:
mech_list: plain login digest-md5 cram-md5
Here is what I have in /etc/defaults/saslauthd:
smtpd_sasl_path = /etc/postfix/sasl:/usr/lib/sasl2:/usr/lib
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
I have saslauthd authenticating to my IMAP server, and it seems to work fine. I can authenticate all my users both by directly logging in to the IMAP server, and using the testsaslauthd command. However, when I telnet to port 25 of my server and try to login in, I get an authentication failed error. I login by using the string from this command (replacing username and password with my own credentials, of course):
MECHANISMS="rimap -O localhost"
perl -MMIME::Base64 -e 'print encode_base64("username\0username\0password");'
Then, when I try to log in this is the error I get:
This is what I get in /var/log/maillog:
220 clamato.whatsmykarma.com ESMTP Postfix (Debian/GNU)
250-AUTH DIGEST-MD5 LOGIN NTLM CRAM-MD5 PLAIN
250-AUTH=DIGEST-MD5 LOGIN NTLM CRAM-MD5 PLAIN
AUTH PLAIN dXNlcm5hbWUAdXNlcm5hbWUAcGFzc3dvcmQ=
535 5.7.8 Error: authentication failed: authentication failure
I thought at first it could be that Postfix is running in a chroot and can't access the sasl mux, but it should be able to reach it from where I have it set. Also, the error doesn't really suggest that's the case. Any ideas? I've been struggling with this for a while.
May 21 16:19:41 clamato postfix/smtpd: warning: localhost[127.0.0.1]: SASL PLAIN authentication failed: authentication failure
May 21 16:20:02 clamato postfix/smtpd: disconnect from localhost[127.0.0.1]