我已经使用 mysql 设置了 postfix 但是在尝试发送邮件时遇到了问题 —— SMTP 服务器身份验证失败:
/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]
经过进一步的测试,我发现 pam-mysql 无法正确连接到我的数据库;但是,用户名和密码/etc/pam.d/smtp
是正确的。
/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: [[email protected]] [service=smtp] [realm=domain.com] [mech=pam] [reason=PAM auth error]
我不知道如何解决这个问题,所以任何帮助都将不胜感激!:)