What Is an MX Record?
January 11, 2008 – 10:18 amAn MX record is a public record in the global DNS (Domain Name System) that specifies which servers handle mail for a given domain name. MX records also specify the priority mail servers should be given in delivery attempts. Consider the following MX records:
yourdomain.com. IN MX 10 mx1.sentinare.net. yourdomain.com. IN MX 20 mx2.sentinare.net. yourdomain.com. IN MX 30 mx3.sentinare.net. yourdomain.com. IN MX 40 mx4.sentinare.net. yourdomain.com. IN MX 50 mx5.sentinare.net.
Here you can see 5 MX records for the domain “yourdomain.com”. They specify how email to the domain “yourdomain.com” should be handled. The first column is the domain name, “yourdomain.com”. The next column is “IN”, which specifies that it is an internet resource (DNS) record. The second column will always be “IN”. The third column specifies which type of DNS resource record it is. In this case, it is “MX”. The third column will always be “MX”. The fourth column is the preference value. It specifies the order that should be used in attempting delivery. We will discuss this in more detail below. The fifth column shows the hostname to which mail should be delivered. This must be an A record. Using a CNAME as a delivery host in an MX record is strongly discouraged.
With the set of MX records above, a given email server attempting delivery to “yourdomain.com” will first try to connect to “mx1.sentinare.net” to deliver the email. If “mx1.sentinare.net” is unreachable or unavailable for some reason (like a network problem or if the server is down), then a mail server should try the one with the next “preference value”, which is “mx2.sentinare.net”. Failing a connection to “mx2.sentinare.net”, the sending server should attempt a connection to “mx3.sentinare.net”. This continues through all the MX records for the domain in order of the preference value. This provides redundancy for SMTP and ensures that a message sent to “yourdomain.com” will be delivered.
