To protect against spam, some ISPs block outgoing connections on SMTP (port 25). In order to send mail from such an ISP, the Postfix mail server must be configured as an authenticated client to the ISP's mail server on port 587 (the 'authenticated mail' port)
In /etc/postfix/main.cf, add the following to enable Postfix's authenticated mail client:
smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd smtp_sasl_security_options =
The ISP's mail server, username, and password are kept in a separate file: /etc/postfix/sasl_passwd. The format is:
Anytime you add or change the /etc/postfix/sasl_passwd file, run the following command:
Using the SMTP Mail Server configuration in the web-based configuration tool, add the ISP's mail server. In our example, smtp.broadband.rogers.com is used. To ensure the correct port is used, you then need to edit /etc/postfix/main.cf and change the default port 25 to 587; for example:
relayhost = [smtp.broadband.rogers.com]:587
and restart the SMTP server.