emailsecops
All tools

MX lookup

Lists mail exchangers by priority with their IPs and identifies the mail provider.

About MX records

MX records name the hosts that accept mail for a domain; senders try the lowest preference number first. A domain that never receives mail should publish a null MX (0 .) so senders fail fast. MX targets must be hostnames, not IP literals, and every host should resolve.

MX lookup: questions

What does MX priority mean?+
It sets the order in which senders try your mail servers: the lowest number first. If that host cannot be reached, senders move to the next number up, and hosts with the same number share the load. Only the order matters, so priorities 10 and 20 behave exactly like 1 and 2.
What is a null MX record?+
A single MX record with priority 0 and a target of . (a dot), defined in RFC 7505, which declares that the domain accepts no email. Senders fail at once instead of queueing and retrying, and receivers may reject mail from addresses at that domain. Use it, together with v=spf1 -all and a DMARC p=reject record, on domains that never handle mail.
What happens if a domain has no MX record?+
Senders fall back to the domain's A or AAAA record and try to deliver there, which RFC 5321 §5.1 calls the implicit MX. If the domain has no address records either, mail to it fails. A domain that should receive no mail is better off with an explicit null MX than with missing records.
Can an MX record point to an IP address or a CNAME?+
No to both. An MX target must be a hostname with its own A or AAAA records: an IP address is not a valid target, and RFC 2181 §10.3 forbids MX targets that are aliases (CNAMEs). Create a hostname such as mail.example.com that points to the IP address, and use that name in the MX record.
How can I tell which email provider a domain uses?+
Look up its MX records: the hostnames usually name the provider, such as aspmx.l.google.com for Google Workspace or a host under mail.protection.outlook.com for Microsoft 365. The MX lookup recognises common providers from these names. If a security gateway filters incoming mail first, the MX records show the gateway rather than the mailbox provider behind it.