External mailing problem

Goodday everyone,

I ran into a little issue that I hope someone can help me with.

We have a customer with a dedicated server with the latest debian and virtualmin.
On this server he runs a lot of domains where the mail of these runs on an external exchange server in their office.

These domains use seperate nameservers from virtualmin and have been properly configured to point to this external MX record. However the problem occurs that local mail sent from the server itself does not get delivered to the correct MX record (to the exchaneg server), any other emailadres will work.

Our suspision is that there still is a hidden configuration which results into the mail being delivered locally.
We have already changed the DNS records on the virtualmin server itself to match the external mailserver configuration but no luck yet. (even though the dns shouldn’t be used)

What would be the next steps in resolving this ?

Thanks in advance.


Yeah, if the “Mail for Domain” feature is enabled (in Edit Virtual Server -> Enabled features) – Postfix will attempt to deliver emails for that domain locally. The MX records wouldn’t matter in this case, as Postfix doesn’t consider them if it thinks it’s the final destination for a domain.

So if you want a given Virtual Server to have it’s email delivered to another server, you’ll need to uncheck the “Mail for Domain” feature.