SMTP authorization does not work on Plesk 11

I was having this issue today and wasted quite a lot of time trying to figure out what was going wrong. The client’s server was running Plesk 11 and had SMTP running with port 25 open. IMAP was working flawlessly but Outlook kept returning the login box with “Login Failed” error pointing towards wrong credentials. But I knew the password was correct so I started haunting.

I logged in as root user and checked the mail log file at:
/usr/local/psa/var/log/maillog

And there I found a lot of warnings but one stood out:

postfix/smtpd[31280]: warning: SASL authentication failure: realm changed: authentication aborted
postfix/smtpd[31280]: warning: SASL DIGEST-MD5 authentication failed: authentication failure
postfix/smtpd[31280]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
postfix/smtpd[31280]: warning: SASL LOGIN authentication failed: generic failure

“No such file or directory”? Interesting.

I did a quick edit of the smtpd.conf by running:
nano /usr/lib64/sasl2/smtpd.conf

And there I saw the problem. The saslauthd_path and sql_database were wrong paths:

pwcheck_method: auxprop saslauthd
auxprop_plugin: sql_sqlite3
saslauthd_path: /postfix/private/plesk_saslauthd
mech_list: DIGEST-MD5 CRAM-MD5 PLAIN LOGIN
auto_transition: yes
sql_engine: sqlite3
sql_hostnames: localhost
sql_database: /postfix/plesk/passwd.db
sql_select: SELECT `%p` FROM domains d, users u WHERE u.name='%u' and d.name='%r' and d.status=0 and u.status=0 and u.dom_id=d.id
sql_verbose: yes
log_level: 9

I just added the “/var/spool/postfix” before the paths and the correct file looks like:

pwcheck_method: auxprop saslauthd
auxprop_plugin: sql_sqlite3
saslauthd_path: /var/spool/postfix/private/plesk_saslauthd
mech_list: DIGEST-MD5 CRAM-MD5 PLAIN LOGIN
auto_transition: yes
sql_engine: sqlite3
sql_hostnames: localhost
sql_database: /var/spool/postfix/plesk/passwd.db
sql_select: SELECT `%p` FROM domains d, users u WHERE u.name='%u' and d.name='%r' and d.status=0 and u.status=0 and u.dom_id=d.id
sql_verbose: yes
log_level: 9

Saved and got out, restarted the postfix:
/etc/init.d/postix restart

And hit the Send/Receive button and guess what… it worked! Please share this post and leave a comment if this worked for you.

Flattr this!