An MX record, or mail exchange record, is a type of DNS (Domain Name System) resource record that specifies the mail server responsible for accepting email messages on behalf of a domain. When someone sends an email to user@examplesite.com, the MX record directs the sending server to the appropriate mail server—such as Google's Gmail servers or Microsoft's Exchange Online—where email for that domain is hosted.
How MX records work
When an email is sent, the sending mail server performs an MX lookup, querying the DNS to retrieve the MX records for the recipient's domain to determine the appropriate destination for the message. The sending server then establishes an SMTP connection to the mail server specified in the MX record and delivers the message.
Key characteristics of MX records
Priority Values: MX records can specify multiple mail servers with different priority values (lower numbers indicate higher priority). This allows organizations to designate primary and backup mail servers for redundancy. If the primary server is unavailable, email is automatically routed to the backup server.
Load Balancing: Multiple MX records with equal priority values enable load balancing across multiple mail servers, distributing incoming email traffic.
TTL (Time to Live): Like other DNS records, MX records have a TTL value that determines how long the record is cached by DNS resolvers before being refreshed.
Security Relevance: MX records are important for email security because they help identify legitimate mail servers for a domain. Email authentication protocols like SPF reference MX records, and unusual changes to MX records can indicate a domain hijacking attack. MX record monitoring is an important component of email security posture management.
Pangratis connects via API to cloud email environments, working with the full email delivery infrastructure including MX-based routing to provide comprehensive protection for organizational email.