Under what circumstances (if any) should an MX record point to localhost?

HopelessN00b asked:

I’m thinking that there’s absolutely no reason or justification for this, but before I open my mouth and get some admin in deep kimchi, I thought I should ask.

Is there any circumstance in which an MX record should point to a loopback address? To me, this says any mail server that tries to send to this domain will instead send to themselves, and fail, but I’m not a mail guru, so maybe I’m missing something.

I came across the below when troubleshooting a why-aren’t-we-getting-email?? issue for a client, and I’m having trouble wrapping my head around it. Maybe I’m overthinking things, though.

enter image description here

My answer:

The relevant RFCs say:

  • The MX resource record MUST point to a fully qualified domain name (not an IP address) of a server on the public Internet which accepts mail for the domain. Note that this server does not necessarily have to be in the same domain as the MX record. RFC 1035 section 3.3.9

  • Addresses in the range MUST NOT ever appear on the public Internet. RFC 5735 section 3

Note that some mail servers will reject email from senders not in compliance with the relevant RFCs.

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.