These are the basic steps to set up Postfix to use SMTP Authentication to send mail through a relay host.
- Set up a password maps file (/etc/postfix/sasl_passwd) as follows:
- chown root:root /etc/postfix/sasl_passwd; chmod 600 /etc/postfix/sasl_passwd
- postmap /etc/postfix/sasl_passwd
- In /etc/postfix/main.cf:
relayhost = mail.ispserver.com
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
- postfix reload
Also, if this is the first SASL service installed on the machine, make sure there's an appropriate SASL plugin installed:
- urpmi --media main libsasl2-plug-login libsasl2-plug-plain
That should do it! Postfix will log into the relay host using the smtp auth username and password. It's possible to set different logins for different servers, by adding more lines to the map file. Security options must be cleared to allow plaintext logins.