Using your ISP's SMTP server with postfix
by jenny on 1 December 2007 - 9:49pm in
Unlike esmtp, using your ISP's SMTP server with postfix will still allow local mail to be delivered. Any hosts listed in the mydestination option will be exempt from the SMTP relay.
Set up ISP info
Create /etc/postfix/sasl_passwd, like so:
mail.my-isp.org username:passwordProtect this file, since it has a plaintext password:
chown root.root /etc/postfix/sasl_passwd && chmod 600 /etc/postfix/sasl_passwdCreate sasl_passwd DB file
postmap hash:/etc/postfix/sasl_passwdTell Postfix about the new setup
In /etc/postfix/main.cf, change the relayhost option to your ISP's SMTP server:
relayhost = mail.my-isp.org...and add these options:
# The following options allow relaying through the ISP's SMTP server
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options =Reload settings
/etc/init.d/postfix reload