MX Record Troubleshooting: Fixing Mail Server Not Responding Errors

Learn how to diagnose and fix MX record issues including 'mail server not responding,' 'no MX record found,' and other mail delivery problems.

Troubleshooting

When email can't be delivered, MX record problems are often the cause. Whether you're seeing "mail server not responding," "no MX record," or "MX lookup failed," this guide helps you diagnose and fix the issue.

What Are MX Records?

MX (Mail Exchange) records tell sending servers where to deliver email for your domain. They contain:

  • Priority — Lower numbers = higher priority
  • Mail server hostname — Where to send the email

Example MX records:

example.com.  MX  10  mail1.example.com.
example.com.  MX  20  mail2.example.com.

Without properly configured MX records, no one can send email to your domain.

Common MX Record Errors

"No MX Record Found"

What it means: Your domain has no MX records published.

Causes:

  • MX records were never created
  • MX records were accidentally deleted
  • DNS propagation isn't complete
  • Wrong domain is being queried

How to check:

dig +short MX example.com

If nothing returns, you have no MX records.

"MX Lookup Failed"

What it means: DNS query for MX records failed.

Causes:

  • DNS server timeout
  • Domain doesn't exist
  • DNS configuration error
  • Network connectivity issues

"Mail Server Not Responding"

What it means: MX record exists but the mail server isn't accepting connections.

Causes:

  • Mail server is down
  • Firewall blocking port 25
  • Server hostname doesn't resolve
  • Mail server misconfiguration

"Connection Refused"

What it means: Server exists but won't accept mail connections.

Causes:

  • Mail service not running
  • Wrong port configuration
  • Server explicitly refusing connections
  • IP-based blocking

Diagnosing MX Issues

1

Check MX records exist

Query your domain's MX records using dig, nslookup, or an online tool.

2

Verify mail server hostname resolves

The hostname in your MX record must have an A record.

3

Test mail server connectivity

Try connecting to the mail server on port 25.

4

Check mail server is accepting mail

Look for SMTP banner and test basic commands.

5

Review server logs

Check mail server logs for errors or blocked connections.

Step-by-Step Diagnostic Commands

1. Check MX records:

dig +short MX example.com
# Should return: 10 mail.example.com.

2. Check mail server A record:

dig +short A mail.example.com
# Should return: 192.0.2.1

3. Test connectivity (port 25):

telnet mail.example.com 25
# Should see: 220 mail.example.com ESMTP ready

4. Test from different network: Sometimes your network blocks outbound port 25. Test from a server or use online tools.

Common Fixes

Missing MX Records

Add MX records in your DNS provider:

TypeHostPriorityValue
MX@10mail.example.com
MX@20mail2.example.com

For common email providers:

Google Workspace:

MX 1  ASPMX.L.GOOGLE.COM.
MX 5  ALT1.ASPMX.L.GOOGLE.COM.
MX 5  ALT2.ASPMX.L.GOOGLE.COM.
MX 10 ALT3.ASPMX.L.GOOGLE.COM.
MX 10 ALT4.ASPMX.L.GOOGLE.COM.

Microsoft 365:

MX 0  example-com.mail.protection.outlook.com.

Zoho Mail:

MX 10 mx.zoho.com.
MX 20 mx2.zoho.com.
MX 50 mx3.zoho.com.

Mail Server Hostname Doesn't Resolve

The hostname in your MX record needs an A record:

; MX record
example.com.      MX    10 mail.example.com.

; A record for mail server (required!)
mail.example.com. A     192.0.2.1

Firewall Blocking Port 25

Mail servers need port 25 (SMTP) open:

  • Check server firewall (iptables, ufw, firewalld)
  • Check cloud provider security groups (AWS, GCP, Azure)
  • Some ISPs block outbound port 25 for residential connections
  • Hosting providers may block port 25 on VPS by default

Mail Service Not Running

On your mail server:

# Check if mail service is running (varies by server)
systemctl status postfix
systemctl status sendmail
systemctl status exim4

# Start if not running
systemctl start postfix

MX Record Best Practices

Use Multiple MX Records

Always have backup mail servers:

example.com.  MX  10  primary.mail.example.com.
example.com.  MX  20  backup.mail.example.com.

If the primary is down, mail goes to the backup.

Don't Point MX to a CNAME

MX records should point to A records, not CNAMEs:

; WRONG
example.com.  MX  10  mail.example.com.
mail.example.com.  CNAME  someservice.com.

; CORRECT
example.com.  MX  10  mail.example.com.
mail.example.com.  A  192.0.2.1

Use Fully Qualified Domain Names

Include the trailing dot in DNS:

example.com.  MX  10  mail.example.com.  ← Correct
example.com.  MX  10  mail.example.com   ← May cause issues

Set Reasonable TTLs

  • Normal operation: 3600 seconds (1 hour)
  • During changes: 300 seconds (5 minutes)
  • After verified: Return to 3600+
PriorityUse Case
1-10Primary mail servers
20-30Secondary/backup servers
50+Tertiary/disaster recovery

Special Cases

Domains That Don't Receive Email

If your domain (or subdomain) is used only for sending — for example, a subdomain like mail.yourdomain.com used with a transactional email provider like Mailgun, SendGrid, or Amazon SES — then missing MX records are expected and not an issue. MX records are only needed for receiving email, so a "no MX record found" result on a send-only domain is perfectly normal.

For send-only domains, you have two options:

Option 1: Null MX record (RFC 7505) — explicitly signals the domain does not accept email:

example.com.  MX  0  .

Option 2: No MX record at all — with SPF and DMARC configured for sending, this works fine. Most send-only domains use this approach.

Subdomains

Each subdomain can have its own MX records:

example.com.       MX  10  mail.example.com.
support.example.com. MX  10  helpdesk.example.com.

Using a Third-Party Email Service

When using hosted email, point MX to their servers:

; Don't point to your own server
example.com.  MX  10  ASPMX.L.GOOGLE.COM.

Troubleshooting Checklist

CheckCommand/MethodExpected Result
MX records existdig +short MX domain.comReturns mail server(s)
Mail server resolvesdig +short A mailserverReturns IP address
Port 25 opentelnet mailserver 25Connects, shows banner
DNS propagationMultiple DNS checkersSame results globally
Reverse DNSdig +short -x IPReturns hostname

When to Contact Support

If you've verified:

  • MX records are correct
  • Mail server resolves
  • Port 25 is open
  • Mail service is running

But still have issues:

  • Hosted email: Contact provider support
  • Self-hosted: Check mail server logs for specific errors
  • Cloud hosting: Verify no additional restrictions (AWS SES, GCP, etc. may have limits)

Check Your MX Records

Verify your MX records are properly configured to receive email.

MX record issues prevent email delivery entirely—not just to spam, but nowhere at all. When troubleshooting email problems, always verify MX records first. They're the foundation that makes email routing possible.

Related Articles