saslauthd auth failure in CentOS postfix/mysql setup

Discussion in 'Server Operation' started by jimjxr, Oct 21, 2009.

  1. jimjxr

    jimjxr New Member


    I followed the howto to setup postfix/sasl/postfixadmin/mysql on CentOS 5.2, everything works except the auth part, I can use telnet to send email to virtual user in mysql without problem. The only problem is I couldn't do authentication, I got the following error when trying "testsaslauthd -s smtp -u test@mydomain -p mypass -f /var/run/saslauthd/mux":
    auth.log shows

    I suspect this is because pam is not authenticating against mysql, so I installed pam_mysql, and changed
    /etc/pam.d/smtp from

    and restarted saslauthd. However testsaslauthd still failed, with a slightly different error in auth.log:

    Any ideas?

  2. jimjxr

    jimjxr New Member

    It's amazing what a good night sleep can do:
    1. Enable mysql query logging in /etc/my.cnf
    2. Confirmed mysql is being queried when testsaslauthd is run, so pam_mysql is doing its job.
    3. Conclusion: password doesn't match is the only explanation.
    4. Fix: Check postfixadmin's, $CONF['encrypt'] is set to 'md5crypt', realized this incompatible with pam_mysql's crypt=3, changed it to 'md5', authentication works now!

Share This Page