Showing posts with label postfix smtp error. Show all posts
Showing posts with label postfix smtp error. Show all posts

Saturday, July 13, 2019

Postfix : SASL authentication failed

SASL authentication failed; cannot authenticate to server smtp.server.net[52.75.xx.x]: generic failure

If you are trying to send mails through Postfix using SMTP credentials and you are getting above error, here is the solution for you.

You need to add the following line in the file /etc/postfix/main.cf
smtp_sasl_mechanism_filter = login
Restart postfix.

I am assuming, you have added following parameters in main.cf file already.
relayhost = [smtp.server.net]:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options =
smtp_tls_CAfile = /etc/postfix/cacert.pem
smtp_use_tls = yes