Question
MX lookup doesn't work on FQDN
Hi all,
I’m setting up a mail server on an Ubuntu droplet. I had to change the droplet name to the fqdn per some other threads on this forum.
droplet name: mail.mydomain.com
dig MX mydomain.com returns the mx:
dig MX mydomain.com +short @ ns1.digitalocean.com
0 mail.mydomain.com.
dig MX mail.mydomain.com +short @ ns1.digitalocean.com
Does not return anything.
In Ubuntu,
hostname returns mail
hostname -d returns mydomain.com
hostname –fqdn returns mail.mydomain.com
In the DigitalOcean web gui, under mydomain.com I can see the records.
MX 0 mail.mydomain.com.
When I use mxtoolbox.com on mx mail.mydomain.com, I get back “No mx Records exist”
If I query mx mydomain.com I get back:
Pref Hostname IP Address TTL
0 mail.mydomain.com {No A Record} 30 min
So it’s like the mx record doesn’t work with the fqdn, but only the domain.tld
Any ideas on how to fix?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×