Split Mail Domain


I have a Virtualmin Pro server working fine with numerous domains.

I have another fancy new mail server that I plan to offer 'advanced messaging' service (Zimbra) for additional charge.

How can I route mail for certain users in a particular Virtualmin-hosted domain to the new mail server? I don't want to do the whole domain...that would be easy. This is probably an issue that all admins of large multi-server domains are familiar with. Unfortunately I'm not.

Am I wrong in assuming this is not something I should do with a simple forwarding in the user's configuration?

The fancy new mail server has its own spam filtering.

Thanks in advance,




Howdy -- if you're looking to setup a split-domain mail setup -- I think I would do email forwarding on a per-account basis.

I would have all the email come into the Virtualmin server first, and you can then either deliver it locally, or forward it to the Zimbra server, depending on what sort of account they have.

If you set the forwarding up from within Virtualmin (as opposed to Usermin), it would bypass the spam and virus scanning, and that would occur on the Zimbra server.

A simple way to do that would be to create an email alias on your Virtualmin system, and have that forward to your other server. But you can also have email accounts forward as well.


Thanks for the quick response.

I'm a little fuzzy on how I would do the forwarding.

How would I forward from gcooper@sonoracomm.com to gcooper@sonoracomm.com on another host? Be it an alias or an existing mailbox...



If you wanted that to work, you'd have to do the forwarding based on the IP address of the server.

However, that reminds me of the pitfall of that system... that once you configure Zimbra to be able to receive email for a given domain, it then thinks that any email address in that domain would be hosted locally.

So, if a user with a Zimbra account in domain "example.com" tried to email a user who also has a "example.com" domain with a Virtualmin account, Zimbra doesn't understand that those email accounts are hosted on a different server, and would bounce the messages.

There's no good way around that when trying to do a split-domain setup, unless you also wanted to create all the accounts on both servers, and have the accounts all forward to the correct server.

I unfortunately forgot about that caveat initially -- with that downside, many folks would consider that a show-stopper, and because of that, wouldn't attempt split-domain mail hosting.

Thanks again for your quick reply.

I guess I'm asking exactly how to do the forwarding?

Zimbra has a wiki page on this issue which explains how to easily deal with the issue you raised:


Of course, I'm just testing all of this now.

The part where I'm hung is routing mail for certain users (from the Virtualmin Pro server) to another mail server that is also configured to accept mail for the same domain.



Yeah, you couldn't forward it by domain, you'd have to do it by something like the system's IP address or another domain being hosted on the server.

So, if your Zimbra server's IP address is 1.2.3.z, you'd have to configure the Zimbra account to be able to receive email using that IP address... then, go into Virtualmin, and have Virtualmin forward the email to "user@1.2.3.z".