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
3 Answers
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 examplefoo@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
![](../../users/profiles/49339.webp)
- 390
- 1
- 5
-
Mails are stuck in queue it's not delivering – Kartik Agarwal Apr 14 '18 at 09: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:[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.
![](../../users/profiles/157149.webp)
- 10,183
- 1
- 18
- 26
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".
![](../../users/profiles/408432.webp)
- 19
- 3