1. The secondary system(zimbra) needs to accept mail for accounts that are hosted on the secondary(zimbra), but must forward all other mail for accounts on this domain to the primary system(other).
On a zimbra server, you can accomplish this piece of mail routing with these commands:
$ zmprov md example.com zimbraMailCatchAllAddress @example.com
$ zmprov md example.com zimbraMailCatchAllForwardingAddress @example.com
$ zmprov md example.com zimbraMailTransport smtp:mailotherserver.example.com
-The first two commands (in combination) tell the Zimbra postfix to accept all addresses in the @example.com domain as valid addresses.
-The third command establishes default mail routing for the domain. Any users that do not exist on the Zimbra system will have their mail routed according to this rule. Be sure to use the local name if you have one, else the email will route out, then back in through your firewall, thus getting a new IP address; If this other server is configured to only accept connections/relay from local servers, this will cause it to drop the connection.
2. We also highly recommend that, in a secondary Zimbra system, you turn off DNS lookups and internet wide message routing from the secondary host and route all mail through the primary. You can accomplish this by:
$ zmprov mcf zimbraMtaRelayHost mailotherserver.example.com
$ zmprov mcf zimbraMtaDnsLookupsEnabled FALSE
Make sure to configure mailotherserver.example.com to
- accept mail relayed by zimbra.example.com.
- forward mail to zimbra.example.com for accounts hosted on zimbra. (which you already said you have done)
3. After completing the above configurations, run these commands:
$ postfix stop
$ postfix start