Open your main.cf file, in my case, it’s a zimbra main.cf file:
nano /opt/zimbra/common/conf/main.cf
Now change the following settings:
relayhost = [smtp.yourrelayserver.com]:587 smtp_sasl_auth_enable = yes smtp_sasl_security_options = noanonymous smtp_sasl_password_maps = static:relayusername:relaypassword smtp_sasl_mechanism_filter = login
You need to replace 3 things here:
- smtp.yourrelayserver.com should be your original relay server.
- relayusername should be the relay authentication username.
- relaypassword should be the relay authentication password.
Once done, you may now restart your postfix to see the mail is relaying through the new relay you have added.