DNS - MX record (Mail Exchanger Record)
Table of Contents
1 - About
The MX DNS is a DNS record that is defining a email server.
The name of the MX record is the last part of an email address and design the host where the email should be delivered.
When an email is send, the server (MTA) sending the email lookups the MX record to find out the destination server.
2 - Articles Related
3 - Set
When you add multiple MX records, the servers they point to must belong to the same service provider.
4 - Query
You can query them. For instance, the mail server of gmail can be found with the following nslookup command
nslookup -type=MX gmail.com
gmail.com MX preference = 10, mail exchanger = alt1.gmail-smtp-in.l.google.com
gmail.com MX preference = 20, mail exchanger = alt2.gmail-smtp-in.l.google.com
gmail.com MX preference = 5, mail exchanger = gmail-smtp-in.l.google.com
gmail.com MX preference = 40, mail exchanger = alt4.gmail-smtp-in.l.google.com
gmail.com MX preference = 30, mail exchanger = alt3.gmail-smtp-in.l.google.com