3.1.3. MX records
MX records are records that indicate the addresses of mail servers that accept incoming mail sent to domain mailboxes.
MX record priorities
MX record precedence allows multiple mail servers to be used for the same domain and determines the order in which attempts should be made to use them. This increases the likelihood of mail delivery and allows multiple physical servers to accept incoming mail.
All MX records must belong to the same mail serviceSpecifying MX records for different mail services can cause problems with mail delivery.
When sending a letter, the sender's mail server checks the MX records of the recipient's domain. From these, it obtains a list of mail servers and their priorities. Priorities are specified by numbers - the smaller the number, the higher the priority. Next, the sender's server goes through the list of recipient's servers in descending order of priority (from the lowest number to the highest) until it successfully delivers the letter or makes sure that it cannot be delivered.
For example, the recipient domain has two MX records:
mx10.example.com with priority
mx20.example.com with priority
20. At first, sending attempts will always be made to the server from the first entry, since it has a higher priority (lower number). If this server is unavailable, then attempts will be made to send to the server from the second entry.