Scenario:
How to setup a Mail Relay in Zimbra 8.5?
How to use MX Outbound as a Mail Relay host for Zimbra 8.5
Solution:
Follow the guide below to configure Zimbra to use MX Outbound (MXO) as a Internet Mail Relay and SMTP Server.
Please note this knowledgebase article is for Zimbra 8.5. If you are using Zimbra 8.0.0 then please see this article instead, "How to setup a Mail Relay in Zimbra 8.0.0".
This article already assumes your Zimbra system is able to send emails externally and that you are already have a terminal connection to your server with the necessary access rights to manage and administor zimbra.
First you need to create a password file for zimbra to use. create a file called /opt/zimbra/conf/relay_password and add the following lines to that file
mxoutbound.mxtools.co.uk mxoutbound-username:password
Note: You will need to substitute mxoutbound.mxtools.co.uk with the host name you were assigned in your welcome email. Please also note the mx outbound username and password will be provided after signing up.
Once you have edited the file, a hash file needs to be created
postmap hash:/opt/zimbra/conf/relay_password
To enable zimbra to use the MX Outbound service at the shell prompt type the following
zmprov ms server.domain.com zimbraMtaRelayHost mxoutbound.mxtools.co.uk
Note: Once again you will need to substitute mxoutbound.mxtools.co.uk with the host name you were assigned in your welcome email.
zmprov ms server.domain.com zimbraMtaSmtpSaslPasswordMaps lmdb:/opt/zimbra/conf/relay_password
zmprov ms server.domain.com zimbraMtaSmtpSaslAuthEnable yes
zmprov ms server.domain.com zimbraMtaSmtpCnameOverridesServername no
zmlocalconfig -e postfix_smtp_use_tls=no
zmlocalconfig -e postfix_smtp_sasl_security_options=noanonymous zmprov ms server.domain.com zimbraMtaSmtpSaslSecurityOptions noanonymous
postconf -e smtp_sasl_mechanism_filter=plain,login
postmap /etc/postfix/relay_passwd
To enable zimbra to use the MX Outbound service with an alternative SMTP port use the following command line
zmprov ms server.domain.com zimbraMtaRelayHost mxoutbound.mxtools.co.uk:8025
Note: Once again you will need to substitute mxoutbound.mxtools.co.uk with the host name you were assigned in your welcome email.
For the above changes to take effect the zimbra service will need restarting (postix reload)
Summary of server details
Outgoing server |
As provided. |
Outgoing server protocol |
SMTP |
Outgoing server port |
25, 465, 587, 2525, 8025 or 10025 |
Authentication Type |
Basic Authentication |
Username |
As provided |
Password |
As provided |