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?


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

This comment has been deleted

I added the A record and mxtools completes the lookup for the domain.tld

Thank you for the follow ups!

Overall, it was my error on thinking the mx lookup should also work against the fqdn. Thanks again!

You need an A record for “mail.256k.com”. In DO control panel add an A record Should end up looking like your 256k.com A record

mail.256k.com. 1800 IN A 107.170.38.67