Configuring Postfix to use SMTP authentication when sending mail

My ISP requires SMTP authentication before one can send email. I have reconfigured several instances of Postfix to use this method and am going to document the necessary changes here for my reference.

add the following two lines to /etc/postfix/main.cf

smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/smtp_auth

add the following lines to /etc/postfix/transport (replace “smtpauth.centurytel.net” with your ISPs smtp server)

localhost       local:
*                       smtp:smtpauth.centurytel.net:25

run “postmap /etc/postfix/transport”

add the following line to /etc/postfix/smtp_auth (replace USERNAME and PASSWORD with appropriate values)

smtpauth.centurytel.net         USERNAME:PASSWORD

run “postmap /etc/postfix/smtp_auth”

run “postfix reload”

Comments are closed.