Email delivery relies on the wide and reliable visibility of your MX record, a type of so-called DNS resource record (RR). MX stands for Mail eXchanger. Your correspondents' mailhost starts with your email address, say <you@example.com>, and tries to look up an MX record with the name "example.com". The value of the record tells it where (to what host) to deliver your mail.
Your MX record is one of several RRs stored together in a zone, a simple text file, and these records are published on the Internet, i.e. made available for searching, by one or more DNS servers. These servers must be connected to the Internet full-time, and one or another of them must be reachable by your correspondent when a piece of email starts on its journey to you.
A typical DNS zone file might look something like this:
$ORIGIN example.com.
@ IN A 1.2.3.4
IN MX 100 m1.imap-partners.net.
www IN A 1.2.3.4
This says that the records in this file have names ending in example.com ($ORIGIN); the name of the first record (@) is equal to the origin, so this first record is named example.com; it's of class IN (Internet); it's of type A (address), and its value is an IP address of 1.2.3.4. Every RR has a name, class, type, and value (and a TTL, time to live, not shown here). It's important to use the correct terms for these parts of the RR.
Note the trailing dot (.) on the value of the MX record. This is also important. It means that the domain name is complete, or "rooted" (ends at the root of the namespace): otherwise the value would have the ORIGIN appended, and end up appearing as "m1.imap-partners.net.example.com.". You can sometimes see such errors in some people's zones. If you see one in a zone on our nameservers, please let us know.
The next record starts out with a blank name, which means it has the same name as the line above it, i.e. "example.com". It's class IN (they're virtually all class IN these days); this one is an MX record; the MX has another field, called the "preference", in this case the number 100; and the MX has a value which must be a host name, not an IP address. (Different RR types have different sorts of values. A always takes an IP address; MX always takes a hostname.)
Another A record named www.example.com has a value of 1.2.3.4. Note that two A records, by two different names (example.com and www.example.com) can happen to have the same value. This is a fairly common example, so web site users don't have to stick the "www." on the front. But it also can affect email.
See also the DNS FAQ
Edited 2 time(s). Last edit at 08/19/2006 01:24PM by jxh.