When I am loading ‘DNS Records’ section I am getting the following error message with red color:
Warning - errors were found in this domain’s DNS records : This domain has email enabled, but none of the MX records point to it. Either the MX records should be corrected, or the email feature disabled if mail is hosted externally.
Here is my BIND configuration:
$ttl 38400
mytestdomain.com. IN SOA mytestdomain.com. root.server1.mytestdomain.com. (
1413838061
10800
3600
604800
38400 )
mytestdomain.com. IN NS ns1.mytestdomain.com.
mytestdomain.com. IN NS ns2.mytestdomain.com.
It is important to note that this error may also be triggered due to the following fully valid/not so rare situation.
You are hosting mail for the domain on your server
Your MX records point to a spam filtering smtp service that receives all that domains email directly filters it and then directs it to your local mail server
I am hosting mail for the domain on my server and I have enabled spam filtering by default in the creation of a virtual host. Does that explain why this error:
Warning - errors were found in this domain's DNS records : This domain has email enabled, but none of the MX records point to it. Either the MX records should be corrected, or the email feature disabled if mail is hosted externally.
crops up every time I create a virtual host?
As noted above, if I change:
mydomain.com. IN MX 5 mail.mydomain.com.
to:
mail.mydomain.com. IN MX 5 mydomain.com.
The error goes away.
Does this disable spam filtering as the cost of getting rid of the error?
If not, why is the error cropping up as the default for virtual server creation?
I know this is a bit old thread. However I had the same issue and sorted out it correctly. What we need to have is a correct A record for the email.yourcoman.com as below before MX record. So it will look like below.
I’ve encountered an odd situation for a subdomain hosted on a virtualmin server where this same error is displayed.
This subdomain is hosted on a virtualmin server, and BIND on the server is the primary just for sub.domain.tld. As you can see, I’ve configured nameservers for the domain to delegate to this server’s BIND just for this hosted subdomain. This configuration works as expected.
Here’s my DNS zone for sub.domain.tld on the Virtualmin server:
$ttl 38400
sub.domain.tld. IN SOA ns1.sub.domain.tld dnsadmin.domain.tld. (
1577990093
3M
3600
604800
38400 )
sub.domain.tld. IN NS ns1.sub.domain.tld.
sub.domain.tld. IN NS ns2.otherdnsprovider.tld. ; the glue record
sub.domain.tld. IN A 10.10.0.1
ns1.sub.domain.tld. IN A 10.10.0.1
sub.domain.tld. IN MX 5 mail.sub.domain.tld.
mail.sub.domain.tld. IN A 10.10.0.1
localhost.sub.domain.tld. IN A 127.0.0.1
webmail.sub.domain.tld. IN A 10.10.0.1
admin.sub.domain.tld. IN A 10.10.0.1
sub.domain.tld. IN TXT "v=spf1 a mx a:sub.domain.tld ip4:10.10.0.1 -all"
; https://www.zytrax.com/books/dns/ch9/delegate.html
; https://www.zytrax.com/books/dns/ch8/origin.html
@ IN CAA 0 issuewild "letsencrypt.org"
@ IN CAA 0 issuewild "sectigo.com"
@ IN CAA 0 iodef "mailto:dnsadmin@domain.tld"
Originally I created the record manually in webmin, then later added the web site. I did not create the DNS zone when I set up the virtual site, instead leaving the existing minimal zonefile in place, then I executed the virtualmin enable-feature --domain sub.domain.tld --dns --associate command to allow Virtualmin to control the existing zone.
After that I added some of the other required records, as you can see above.
I’ve tried changing the order for the A and MX records, I’ve tried changing to relative records (mail.sub instead of a FQDN), no change. To me this looks like a correct and complete zone.
Is the Virtualmin record validation expecting an MX record to also be present for the ‘root’ domain.tld domain? If so that’ll never happen and isn’t correct; only the subdomain’s DNS records are hosted on the virtualmin server.