How to setup Zimbra to forward missing recipients to Google Apps

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: foo@example.org
  • 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: bar@example.org
  • when you are logged into Zimbra webmail (or use an IMAP client) in foo@example.org you want to be able to forward messages to bar@example.org

In normal conditions, Zimbra will reply with a message telling you that the recipient bar@example.org 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.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s