Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have set up postfix using mysql but am running into a problem when trying to send mail out -- the SMTP server fails on authentication:


localhost postfix/smtpd[16637]: connect from localhost.localdomain[]
localhost postfix/smtpd[16637]: warning: localhost.localdomain[]: SASL LOGIN authentication failed: authentication failure
localhost postfix/smtpd[16637]: lost connection after AUTH from localhost.localdomain[]
localhost postfix/smtpd[16637]: disconnect from localhost.localdomain[] 

With further testing, it seems to me that pam-mysql is not connecting to my database properly; however, the username and password in /etc/pam.d/smtp are correct.


localhost saslauthd[17901]: pam_mysql - MySQL error (Access denied for user 'mail_admin'@'localhost' (using password: YES))
localhost saslauthd[17901]: DEBUG: auth_pam: pam_authenticate failed: Authentication service cannot retrieve authentication info
localhost saslauthd[17901]: do_auth         : auth failure: [] [service=smtp] [] [mech=pam] [reason=PAM auth error]

I am stumped as to how to solve this, so any assistance would be greatly appreciated! :)

share|improve this question
up vote 1 down vote accepted

I believe the MySQL authentication data is typically stored in:


Postfix and SASL Docs

share|improve this answer
I've got that file set up with the correct data as well. However, when I change the username it's using in /etc/pam.d/stmp it is reflected in the error message so I don't think that's the problem. – Daniel Vandersluis Mar 2 '10 at 21:51
At least right now, it's definitely the issue. The permissions, username, and/or password are incorrect. Once the database authentication issue is corrected, if things aren't working as expected, it's on to the next issue. – Warner Mar 2 '10 at 21:53
You're right, I had two u's in the password, one uppercase and one lowercase, and they were typed in the wrong order. Thanks for making me look again. – Daniel Vandersluis Mar 2 '10 at 22:07

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.