What is an MX Server? Understanding Mail Servers and MX Records

Learn the difference between MX servers and MX records, how mail servers process incoming email, and common MX server configurations.

When discussing email configuration, you'll hear both "MX server" and "MX record" used frequently. While related, they're not the same thing. Understanding the difference helps you set up and troubleshoot email more effectively.

This guide explains what MX servers are, how they relate to MX records, and what happens when email arrives at your mail server.

MX Server vs MX Record

Let's clarify the distinction:

MX record is a DNS entry that tells other servers where to send email for your domain. It's a pointer, a piece of configuration data.

MX server (or mail server, mail exchanger) is the actual server that receives and processes email. It's a running computer system with software that handles mail.

Think of it this way: the MX record is like a sign pointing to a building, while the MX server is the building itself.

Your domain's MX record might say "send email to mail.example.com with priority 10." The MX server is the machine at mail.example.com that actually accepts the incoming message.

How MX Servers Work

When someone sends email to your domain, here's what happens at the server level:

Connection establishment. The sending server connects to your MX server on port 25 (the standard SMTP port). They exchange greetings and negotiate the connection.

Sender verification. Your MX server checks whether it should accept email from this sender. This might involve checking SPF records, verifying the sending server isn't blacklisted, and other spam prevention measures.

Recipient verification. The MX server confirms the recipient email address exists. If you email nobody@example.com and that address doesn't exist, the server rejects the message here.

Message transfer. The actual email content transfers from the sending server to your MX server. This includes headers, body text, and attachments.

Local delivery or forwarding. Your MX server either stores the message in the recipient's mailbox or forwards it to another system for processing.

This entire exchange typically takes seconds, though spam filtering and other checks can add time.

Common MX Server Types

Different organizations use different approaches to mail servers:

Cloud Email Providers

Services like Google Workspace and Microsoft 365 run the MX servers for you. When you sign up, they give you MX records pointing to their servers (like aspmx.l.google.com for Google).

Advantages:

  • No server maintenance required
  • High reliability and redundancy built in
  • Automatic spam filtering and security updates

Disadvantages:

  • Monthly subscription costs
  • Less control over mail processing
  • Data stored on third-party servers

Self-Hosted Mail Servers

Some organizations run their own mail servers using software like Postfix, Microsoft Exchange, or Zimbra.

Advantages:

  • Complete control over mail handling
  • Data stays on your own infrastructure
  • No per-user subscription fees

Disadvantages:

  • Requires technical expertise to maintain
  • You're responsible for security and uptime
  • Must manage your own spam filtering

Email Forwarding Services

Services like ImprovMX or ForwardEmail run MX servers that receive your email and forward it to another address (like a personal Gmail).

Advantages:

  • Simple setup for custom domain email
  • Often free or low cost
  • Works with existing email accounts

Disadvantages:

  • Limited features compared to full email providers
  • Adds another hop in email delivery
  • Forwarding can sometimes trigger spam filters

MX Server Redundancy

Most email setups include multiple MX servers for reliability:

Primary server handles email during normal operation. It has the lowest MX record priority number.

Backup servers take over when the primary is unavailable. They have higher priority numbers (lower preference).

When your primary server goes down for maintenance or experiences problems, sending servers automatically try your backup servers. Email keeps flowing without manual intervention.

PriorityServerRole
10primary.mail.comHandles most traffic
20backup1.mail.comFirst fallback
30backup2.mail.comSecond fallback

Cloud providers like Google handle this automatically with multiple servers at different priorities. Self-hosted setups need to configure backup servers explicitly.

Test your failover

Periodically verify that your backup MX servers actually work. Some organizations set up backups but never test them, only to discover problems during an actual outage.

What MX Servers Check

Modern MX servers do more than just receive email. They perform various checks to filter spam and malicious messages:

SPF verification. The server checks whether the sending server is authorized to send email from that domain. Check your SPF configuration at spfrecordcheck.com.

DKIM verification. The server validates cryptographic signatures on incoming email. Test your DKIM setup at dkimtest.com.

DMARC policy. The server follows the domain's DMARC policy for handling authentication failures. Verify your policy at dmarcrecordchecker.com.

Blacklist checking. The server may check if the sender's IP is on known spam blacklists. Check your own status at emailblacklistchecker.com.

Content filtering. Spam filters analyze message content for suspicious patterns.

These checks happen before email reaches your inbox, blocking most unwanted messages.

MX Server Requirements

For an MX server to function properly, several things must be in place:

Proper DNS configuration. MX records must point to the server's hostname, and that hostname must have an A record resolving to the server's IP address.

Port 25 accessibility. The server must accept connections on port 25 (SMTP) from the internet. Firewalls must allow this traffic.

Valid hostname. The server should have a proper hostname that resolves both forward (hostname to IP) and reverse (IP to hostname). Many receiving servers check this.

Adequate resources. Mail servers need sufficient CPU, memory, and storage to handle your email volume, especially during spam attacks.

Security measures. Servers exposed to the internet face constant attacks. Regular updates, proper configuration, and monitoring are essential.

Checking MX Server Health

Beyond checking MX records exist, you should verify the servers themselves work:

Connection testing. Can you establish a connection to the server on port 25? Firewalls or server problems might prevent this.

Response verification. Does the server respond with proper SMTP greetings? Misconfigured servers might accept connections but not respond correctly.

Mail acceptance. Will the server accept a test message? Some issues only appear during actual mail delivery attempts.

Processing speed. Is the server responding quickly? Slow responses can cause sending servers to give up.

Our MX checker tests server responsiveness along with verifying DNS records, giving you a complete picture of your mail server health.

When MX Servers Fail

Understanding failure scenarios helps you prepare:

Complete server outage. The MX server is unreachable. Sending servers will try backup MX servers if available, or queue the message for retry.

Partial failure. The server accepts connections but can't process mail properly. This can cause more problems than complete outages because messages appear to send but never arrive.

DNS problems. MX records become unavailable due to DNS issues. Sending servers can't find where to deliver email.

Certificate issues. If the server requires TLS and has certificate problems, some senders may refuse to connect.

Disk full. The server can't store new messages. It may reject incoming email or accept it but fail to save.

Monitoring helps catch these issues before they cause extended email outages.

Monitor Your MX Records

Checking once is good. Monitoring continuously is better. The Email Deliverability Suite watches your SPF, DKIM, DMARC, and MX records daily and alerts you when something breaks.

Never miss an MX issue

Monitor your SPF, DKIM, DMARC and MX records daily. Get alerts when something breaks.

Start Monitoring