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.org is routed to Zimbra.
  • If the recipient for example.org, for example foo@example.org does 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

| improve this answer | |
  • Mails are stuck in queue it's not delivering – Kartik Agarwal Apr 14 '18 at 9:45

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 user@domain.tld transport:[nexthop]

So you would probably use something like

user1@example.com smtp:[]

This will send user1's email via smtp to (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.

| improve this answer | |

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".

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.