Mail not being forwarder to remote mail server

I have a new domain hosted on virtualmin ( with the mail server on exchange on another box ( addresses)

The site needs to be able to send emails for verification etc but when it sens emails to they are being routed to postfix on the server and therefore not sent externally.

I’m sure this is an easy fix to make but i cant quite get my head round it.

Any help would be greatly appreciated.




You’d want to verify that the “Mail” feature for this particular Virtual Server is disabled.

Also, in Services -> DNS Domain, it sounds like you’d want the MX record to point to your Exchange box. Make sure to “Apply” the configuration so that BIND is restarted.


Thanks for the quick response.

That makes sense but disabling “mail” doesn’t seem obvious.

Under “Domain/Features and Plugins/” “Mail for Domain” does not have a check next to it, although “Default” is checked. If i click on “Show Domains” “delete selected” is an option but this looks like you deleting the whole domain (which i REALLY dont want to do).

Any pointers would be great.




Well, just to make sure you’re looking in the right place, what you’d want to do is go into “Edit Virtual Server” after choosing the domain from the drop-down on the top-left, and look in where it says “Enabled features”.

In there, you’d want to make sure that “Mail” is disabled for that Virtual Server. Disabling it there will only affect that one domain, your other Virtual Servers will continue to receive email without a problem.


Ok i’ve disabled mail for that domain. (For some reason i had to enable it in “Features and Plugins” and then disable it again)

i’m now getting the following in my postfix log:, relay=none, delay=0.08, delays=0.05/0.03/0/0, dsn=5.4.6, status=bounced (mail for loops back to myself)

Any advice?

Again thanks for you help.



I’d expect that error if Mail were disabled, but the MX record was still pointing to your server.

Can you verify in Services -> DNS Domain for that Virtual Server that the MX record is pointing to your Exchange server?

If it is, I’d restart BIND to make sure the changes are up to date.



in “Services/DNS Domain” i added “Mail server” values

Name =
TTL = default
Mail server =
Prioirty = 5

And then bounced BIND

I’m still getting

Aug 24 16:01:05 host postfix/smtp[28997]: B1081240612:, relay=none, delay=0.11, delays=0.06/0.04/0/0, dsn=5.4.6, status=bounced (mail for loops back to myself)

Very strange!


Okay, so if you log into your server, and type:

host -t MX

The address that gets returned – is it the correct address for your Exchange server?



Thanks very much for all your help. It looks as though the MX was incorrectly set at there URL. Now that’s been fixed adding the MX record in virtualmin has sorted all the issues and mail is being received.

Many thanks


That’s great news, thanks for the update!