I have two mail servers that share the same domain name how do I make zimbra relay email who isn't in the zimbra directory to the other email server
What you are describing is a split domain situation. This is well documented on the Zimbra wiki. What you want is the following:
- By default all e-mail to
example.orgis routed to Zimbra.
- If the recipient for
example.org, for example
email@example.com not exist in Zimbra, it must be routed to the other mail system.
- If it exists on the other mail system, fine. If it does not exist, then inform the sender.
Basically the commands you need in your Zimbra are the following:
$ zmprov md example.org zimbraMailCatchAllAddress @example.org
$ zmprov md example.org zimbraMailCatchAllForwardingAddress @example.org
$ zmprov md example.org zimbraMailTransport smtp:the-other-mail-server.example.org
To move mail from one server to the other you will need to set up a per email transport in your transport table. Assuming that the transport table is set up in this manner:
transport_maps = /etc/postfix/transport , you would add in a line for each email
So you would probably use something like
This will send user1's email via smtp to 192.168.1.2 (or a domain) without looking up the MX server, which may point back to your original server.
You would then run
postmap /etc/postfix/transport which will generate the DB file, and reload postfix.
Server recieving mail for ALL addresses that doesn't even exist, - is fast becoming spam target. So, better to check address existance before accepting mail.
If the second mail server is also Zimbra, you could use the built-in Zimbra capability to spread of users across the mail servers in the same domain - "Zimbra Multi-Server Installation".