This tip is to configure a Zimbra instance to deliver messages to Google Apps in the case the recipient email address is not found on the local server.
This is the scenario:
- you have an email domain on Zimbra with an email account: email@example.com
- you have Google Apps configured to use Zimbra as a secondary server. This means that Google Apps will be configured as the only MX dns record, and will forward all unknown recipients to Zimbra as a fallback.
- you have an email account configured on Google Apps: firstname.lastname@example.org
- when you are logged into Zimbra webmail (or use an IMAP client) in email@example.com you want to be able to forward messages to firstname.lastname@example.org
In normal conditions, Zimbra will reply with a message telling you that the recipient email@example.com is not found.
The following command will tell Zimbra to forward every message for the given domain to Google Apps:
zmprov md exelab.com zimbraMailTransport smtp:ASPMX.L.GOOGLE.com:25
I searched for ways to apply this configuration through the administration interface but I wasn’t able to find anything. So running this at the command line seems to be the only option.
Then, restart postfix:
postfix stop postfix start
From now on, every message for domain
exelab.com will be forwarded to Google Apps first.
If you are a Zimbra guru and you know a better way to do that please drop me a line in the comments.