Redirect Mail

Hi - I have multiple domains on my Virtualmin GPL server. I use my domain with email&web. I also have a domain for a friend of mine - however his email is run elsewhere; I only host his website.

Instead of the Virtualmin server sending the email to the external host, it thinks the mail server is local and then fails as the user account doesn’t exist. How can I tell Virtualmin to do a true MX DNS lookup and get the correct server?

I guess I could set my server to use an external DNS server instead of itself but I recall having some issue with that setup… How do others handle situation?

Well, it should indeed work just fine with DNS hosted locally, so long as the MX record setup in Virtualmin points to the external server.

The thing you’ll want to verify is to go into “Edit Virtual Server” for his domain, and make sure that in “Enabled Features”, the “Mail for domain enabled” feature is disabled.

If the “Mail” feature is enabled, and Postfix thinks it’s supposed to receive email for that domain, it won’t do a DNS lookup, it’ll simply attempt to deliver the email locally.


I have some email hosted elsewhere while I have the Web server and I move systems around - so I didn’t want to replicate everything locally and miss a change. What I did as a solution was to make Virtualmin use an external DNS server instead of looking locally - done in WebMin/Networking. I had to set the DNS info correctly for the local hostname and make it match the DNS lookup of the local IP address or else Virtualmin wouldn’t accept email, thinking it was not the intended recipient. So it’s all working well now.

Let me know if they see a problem with my configuration.