DNS Electronic Mail Support and Mail Exchange (MX) Resource Records
(Page 2 of 2)
The Mail Exchange (MX) Record and Its Use
To allow the flexibility needed for these situations, a special DNS resource record type is defined called a mail exchange (MX) record. Each MX record specifies a particular mail server that is to be used to handle incoming e-mail for a particular domain. Once this record is established, resolution of electronic mail messages is pretty much similar to how it works for regular resolution. Suppose we want to send an e-mail to firstname.lastname@example.org. The process, roughly, is as follows:
Of course, the e-mail client can't actually send anything to mail.xyzindustries.com; it needs its IP address. So, it would then have to resolve that name. Of course, this resolution request will likely end up right back at the same DNS name server that just handled the MX request. To eliminate the inefficiency of two separate resolutions, the DNS name server can combine the information. In our example above, ns1.xyzindustries.com will include the A (Address) resource record for mail.xyzindustries.com in the Additional section of the DNS message that it sends in step 3 above.
It is also possible to specify multiple MX records for a particular domain, each pointing to a different mail server's name. This provides redundancy, so if there is a problem with one mail server, another can pick up the slack. DNS allows each mail server to be specified with a preference value, so you can clearly indicate which is the main mail server, which is the first backup, the second backup, and so on. The DNS server will choose the mail server with the lowest preference value first, then the next highest one, and so on.
Note that RFC 1035 originally defined several other resource record types related to electronic mail as well: the mailbox (MB), mail group (MG) and mail rename (MR) resource records. These are called experimental in the standard. I think the experiment failed, whatever it was, because I don't believe these are used today. There are also two even older mail-related resource records, mail destination (MD) and mail forwarder (MF), which must have been used at one time but were already obsolete at the time RFC 1035 itself was written.
Home - Table Of Contents - Contact Us
The TCP/IP Guide (http://www.TCPIPGuide.com)
Version 3.0 - Version Date: September 20, 2005
© Copyright 2001-2005 Charles M. Kozierok. All Rights Reserved.
Not responsible for any loss resulting from the use of this site.