I have a new domain hosted on virtualmin (mydomain.com) with the mail server on exchange on another box (info@mydomain.com addresses)
The site needs to be able to send emails for verification etc but when it sens emails to info@mydomain.com 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.
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.
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).
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.
in “Services/DNS Domain” i added “Mail server” values
Name = mail.mydomain.com
TTL = default
Mail server = xxx.xxx.xxx.xxx
Prioirty = 5
And then bounced BIND
I’m still getting
Aug 24 16:01:05 host postfix/smtp[28997]: B1081240612: to=info@mydomain.com, relay=none, delay=0.11, delays=0.06/0.04/0/0, dsn=5.4.6, status=bounced (mail for mydomain.com loops back to myself)
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.