ClearFoundation

Documentation Howtos SMTP Authentication To ISP

SMTP Authentication To ISP

Overview

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)

Add User Authentication Support to Mail Server Configuration

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 =

Add Username and Password Settings

The ISP's mail server, username, and password are kept in a separate file: /etc/postfix/sasl_passwd. The format is:

[hostname] username:password

For example:

[smtp.broadband.rogers.com]     bob123@rogers.com:hockey

Anytime you add or change the /etc/postfix/sasl_passwd file, run the following command:

postmap /etc/postfix/sasl_passwd

Add Outbound Relay Host

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.



Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Share Alike 3.0 Unported
Video demonstrations - Copyright © 2010 ClearCenter Corporation