Postfix SMTP Authentication Failed

nikolas asked:

I’ve configure postfix for mandrill as follows

in /etc/postfix/sasl_passwd
[smtp.mandrillapp.com]:587 myusername:apikey

then ran postmap /etc/postfix/sasl_passwd

In /etc/postfix/main.cf I added

myhostname = webmail.mysite.com
mydestination = localhost

smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous

relayhost = [smtp.mandrillapp.com]:587

But mail sending failed log shows
SASL authentication failed; server smtp.mandrillapp.com[52.7.100.156] said: 435 4.7.8 Error: authentication failed:

My answer:


In your smtp_sasl_password_maps map, the key should be only the hostname, without brackets or port number.

smtp.mandrillapp.com    nikolas@example.com:Y1gkQRajCjusxkvEXwv1Z

View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.