Is there a "how to" doc on setting up a virtual host that handles its own email via standard subdomains like mail.*, etc?

I would expect a common use case for Virtualmin would be setting up a virtual host that handles email as well as web traffic. Among the basics would be setting up subdomains like ‘mail’, etc. Is there a “how to” that goes through the work flow involving the domain registrar as well as the Virtualmin interface?

It doesn’t appear to be that straight forward primarily because of the way DNS is negotiated between the domain registrar and the default BIND configuration. There is something about “glue” I’ve run across in the docs. When I try to follow those directions, it wants to create ‘ns1’, ‘ns2’ etc subdomains with the host IP address of the virtual host, but even if I go in and manually add ‘’ to the DNS records located on the virtual host, dig doesn’t locate that subdomain from anywhere on the net (including on the host itself), hence the registrar can’t pass DNS queries along.


If you’re planning to use your Virtualmin server as a nameserver, this information here should provide some insight into getting the DNS setup properly: