Some of you reading this are sys admins. Some of you are programmers who have dissected email relay technologies. Others are socially cognizant Inter-net-izens who want to do the right thing. This blog post is for you. Those whose eyes glaze over and thoughts roam to Dukes of Hazard reruns with elaborate car jumps each time I start technobabbling should ask themselves the following question: If the writers are on strike, how are they re-releasing Knight Rider? New actors/sets with old scripts?

The tech question of the day is “should Internet hosts have DNS MX RR records?” They don’t have to. I know that. (If there’s no MX, RFC 974 clearly says that mailers should treat it as if they had one MX with a preference of 0 pointing back to the target host.) The question is, is it proper netiquette for hosts to have them in all cases? (ie: should your desktop have an MX record — whether it points to itself or somewhere else?)

That’s the case my cow-orker is making (that hosts should have MX records. If it means anything, mostly because he set things up this way, we historically have had them in the department and becaue of that have it today.) I say that the simple case is better — if you need an MX record to direct mail somewhere else, use it. Otherwise, simplify the DNS and don’t provide an MX record when the default case is sufficient.

The mail landscape has changed quite a bit in the last few years, with backup mail servers (higher priority MX handlers) being spam targets. Also, fewer hosts have mail servers listening on them (at least on their non-localhost entries,) so that’s changed too. I think our job will get much simpler, both on the mail relay side/configuration and DNS configuration if we just nuke the MX records for the hosts we know aren’t mail servers. If we get rid of the backup MX record entry for them, then all that would be left is an MX 0 record pointing back to themselves, and I say that’s pointless because the RFC says to do that anyway.

Can anyone provide any documentation one way or another that backs up when to use an MX record? Or even anecdotal evidence that when you worked for a major cosmopolitan ISP you NEVER setup MX for each A record in the subnets, yadda, yadda. The Internet community at large would appreciate your input.



5 Comments to “Should hosts have MX records?”

  1. David Rasch | February 6th, 2008 at 7:21 pm

    Today, we sent approximately 6.8million messages (as of 19:20 EST). Our outgoing mail servers do not have MX records, and we receive plenty of bounces from poorly-compliant servers addressed to our server names rather than the envelope sender or the return-path of our emails. These emails come directly to these servers without fail. We undergo discussions every day with ISP’s like AOL, Earthlink, MSN, TWC/RoadRunner, ComCast, etc. and haven’t ever needed to have these addresses to deliver mail nor to accept bounces.

  2. ajp | February 6th, 2008 at 10:03 pm

    I concur with you. The default behavior is sufficient for what you need so why complicate it? It also appears from the comments that David Rasch left that this pans out in reality (Occam’s razor and all that).

  3. Marc | February 7th, 2008 at 1:22 pm

    Taking off my developer hat and putting on my (lazy) sysadmin hat, I would have to concur that adding in an MX record for every A record is a waste of time and resources. The only exception that I could see to this is if you wanted to redirect all mail to anything on your network to a single mail server. This adds the complexity of having to configure the email server to accept mail from everything as well.

    There’s a reason that the RFC defines a default behavior–to save work and make things Just Work ™.

  4. Flash | February 7th, 2008 at 2:23 pm

    Seriously? New Knight Rider? When?

  5. online dating | February 8th, 2008 at 9:32 pm

    A new Knight Rider would be great but I can’t imagine Knight Rider without David Hasselhoff as Michael Knight.