Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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:

/var/log/mail.log:

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

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.

/var/log/auth.log:

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: [user=user@domain.com] [service=smtp] [realm=domain.com] [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

1 Answer 1

up vote 1 down vote accepted

I believe the MySQL authentication data is typically stored in:

/etc/postfix/sasl/smtpd.conf

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

 
discard

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.