Key points
- Each MX has a priority number; lower numbers are tried first.
- The MX must point to a host name with an A or AAAA record, never directly to an IP or to a CNAME.
- Several MX records with the same priority spread the load between them.
- Changing the MX is how a domain moves to a new mail server or puts a filter in front of it.
- RFC 7505 defines a null MX for domains that never receive mail.
How does a sending server use the MX?
The sender queries the MX records of the recipient domain, sorts them by priority and opens an SMTP connection to the first host on port 25. If that host is unreachable, it tries the next one. If no MX exists, the standard says to fall back to the A record of the domain itself.
Records with equal priority are chosen at random, which lets a domain balance traffic among servers.
What are the common MX mistakes?
Three mistakes show up again and again. The first is pointing the MX to an IP address or to an alias. The second is keeping an old backup MX that accepts mail without filtering, which becomes the favorite door for spam.
The third is forgetting the final dot in a zone file, which turns mx.example.com into mx.example.com.example.com and breaks delivery.
How long does an MX change take?
It depends on the TTL of the old record. Senders that cached it keep using the previous host until the TTL expires, so lowering the TTL a day before the change shortens the transition. Keeping the old server accepting mail during that window avoids losses.
Example MX records
example.com. 3600 IN MX 10 mx1.example.com.
example.com. 3600 IN MX 20 mx2.example.com.How AHSU 360 handles this
AHSU 360 is activated per domain by pointing the MX to it, so mail is filtered before it reaches the mail server. To go back, the original MX is restored.
