Outgoing SMTP Authentication

Overview

When you need to route all outgoing mail through your ISP's MTA, and that MTA requires that you authenticate, certain settings in postfix are required.

For this example, we will use mailrelay.example.com as the outgoing relay The authentication user will be username The password will be password

Setting a relay host

Set the relay host in the admin console, MTA tab to point to your ISPs outgoing mail server. Your ISP can tell you the proper value for this. You may have to set the port, as well.

Enabling smtp authentication

Run all these commands as the zimbra user

Create a text file mapping which name/password should be used for each given outbound destination:

 echo mailrelay.example.com username:password > /opt/zimbra/conf/relay_password

Create a postfix lookup table

 postmap /opt/zimbra/conf/relay_password

Test that the map is okay

 postmap -q mailrelay.example.com /opt/zimbra/conf/relay_password

This should return username:password if done right

Make postfix use the above

postconf -e smtp_sasl_password_maps=hash:/opt/zimbra/conf/relay_password

Restart postfix:

 postfix reload

Troubleshooting

After sending a test message, check the Log Files for the error

 SASL authentication failure: No worthy mechs found

The fix for this is:

 postconf -e smtp_sasl_security_options=

Nothing after the =

Restart postfix:

 postfix reload
Jump to: navigation, search