DNS – Type of the record MX

  DNS, DNS theory, Records of DNS

Record specifies the domain name of mailserver, where to deliver e-mail for domain. Before the server name is given the priority, that has significance if it is more MX records for one name. In this case, the servers are tested by increasing priority numbers (ie. server with the lowest number has the highest priority). If the server does not respond to us, it will try another. The second and other servers if they are present, serves as backup mail servers.

If you want to send e-mail message to jan.novak@mff.cuni.cz, we ask „mff.cuni.cz“ about the MX records for the domain and we will get the following:

mff.cuni.cz.   28800  IN   MX   20 smtp1.ms.mff.cuni.cz.
mff.cuni.cz.   28800  IN   MX   20 smtp2.ms.mff.cuni.cz.
mff.cuni.cz.   28800  IN   MX   40 smtp1.kolej.mff.cuni.cz.

Here we can see the situation where two servers have the same priority, which means that it does not matter which of them will try to deliver the message. If neither one of them does not respond, we will try to deliver the message to a third server. Of course, before any communication with them, we must at first resolve the names of mailserver IP addresses.