1

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

HopelessN00b
  • 53,385
  • 32
  • 133
  • 208
madalinivascu
  • 123
  • 1
  • 8

3 Answers3

3

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

vtorhonen
  • 390
  • 1
  • 5
1

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:[192.168.1.2]

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.

NickW
  • 10,183
  • 1
  • 18
  • 26
-1

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

sea
  • 19
  • 3