To begin, locate your system’s Postfix configuration files. In most distributions, these will be in /etc/postfix. If you’re having trouble finding the files try 'locate main.cf'.
Add your Easy-SMTP login credentials to /etc/postfix/sasl_passwd
$ echo "ssrs.reachmail.net accountkeyuser:password" >> /etc/postfix/sasl_passwd |
Rebuild the password hash
$ chown root:root /etc/postfix/sasl_passwd $ chmod 600 /etc/postfix/sasl_passwd $ cd /etc/postfix ;; postmap hash:/etc/postfix/sasl_passwd
Add the following to /etc/postfix/main.cf. Note that if you’re using a Postfix version less than 2.5 the configuration lines are slightly different.
... tls_export_cipherlist = SSLv3:TLSv1:!SSLv2 smtpd_tls_security_level = may relayhost = ssrs.reachmail.net smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd smtp_tls_security_level = encrypt # Force all connections to use TLS # For postfix versions < 2.5 replace the previous setting with these: #smtp_use_tls = yes #smtp_enforce_tls = yes smtp_tls_mandatory_protocols = !SSLv2, SSLv3, TLSv1 smtp_sasl_auth_enable = yes smtp_sasl_security_options = noanonymous smtp_sasl_local_domain = $myhostname ... |
Restart Postfix Note that your system command to restart Postfix may be different
$ /sbin/service postfix restart |
Special Configurations
Relay specific destinations through Easy-SMTP
If you want to use Easy-SMTP for only certain mail transactions, you can specify the destinations to relay via Easy-SMTP in the /etc/postfix/transport file. The transport configuration file entries are formatted as destination:relay-host.
Add an entry to /etc/postfix/transport.
$ echo "some-destination.com:ssrs.reachmail.net" >> /etc/postfix/transport |
Rebuild the transport database.
$ chown root:root /etc/postfix/transport $ chmod 600 /etc/postfix/transport $ cd /etc/postfix ;; postmap hash:/etc/postfix/transport
Enable transport mapping in /etc/postfix/main.cf by adding:
... transport_maps = hash:/etc/postfix/transport ... |
Restart Postfix. Note that your command to restart Postfix may be different.
$ /sbin/service postfix restart |
Comments