What’s a Mail Exchanger, Again?

The idea of a mail exchanger is probably new to many of you, so let’s go over it in a little more detail. A simple analogy should help here: imagine that a mail exchanger is an airport, and instead of setting up MX records to instruct mailers where to send messages, you’re advising your in-laws on which airport to fly into when they come to visit you.

Say you live in Los Gatos, California. The closest airport for your in-laws to fly into is San Jose, the second closest is San Francisco, and the third Oakland. (We’ll ignore other factors such as price of the ticket, Bay Area traffic, etc.) Don’t see the parallel? Then picture it like this:

los-gatos.ca.us.    IN    MX    1 san-jose.ca.us.
los-gatos.ca.us.    IN    MX    2 san-francisco.ca.us.
los-gatos.ca.us.    IN    MX    3 oakland.ca.us.

The MX list is just an ordered list of destinations that tells mailers (your in-laws) where to send messages (fly) if they want to reach a given email destination (your house). The preference value tells them how desirable it is to use that destination—you can think of it as a logical “distance” from the eventual destination (in any units you choose), or simply as a “top ten"-style ranking of the proximity of those mail exchangers to the final destination.

With this list, you’re saying, “Try to fly into San Jose, and if you can’t get there, try San Francisco and Oakland, in that order.” It also says that if you reach San Francisco, you should take a commuter flight to San Jose. If you ...

Get DNS on Windows 2000, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.