MYDNSREPORT RESOURCE

Email Server Troubleshooting: Complete Diagnostic Guide

Investigate a mail failure through DNS, SMTP connectivity, authentication and mailbox configuration.

Sending server: SMTP connection → Receiving server: Reply or error code → Mailbox: Delivery or filtering
Read the SMTP response to locate a failure. DNS, connectivity, authentication and mailbox policies can each affect delivery.

Common Symptoms

SymptomLikely CauseStart Here
Emails bouncingBad MX, SPF fail, blacklisted IPDNS Checks → Blacklist Check
Emails going to spamMissing DKIM/DMARC, low reputationAuthentication Issues
Cannot connect to SMTPPort blocked, TLS mismatchSMTP Diagnostics
Delayed deliveryGreylisting, queue backup, DNS timeoutQueue Management
Connection refusedFirewall, service down, wrong portSMTP Diagnostics

DNS Configuration Checks

Most email problems start with DNS. Verify these records first:

MX Records

dig MX example.com +short

Verify priorities are correct and hostnames resolve to valid IPs. Missing MX records = no email delivery.

Reverse DNS (PTR)

dig -x 203.0.113.10 +short

Your mail server IP must have a PTR record matching its hostname. Many receivers reject mail from IPs without valid rDNS.

SPF Record

dig TXT example.com +short | grep spf

Ensure your sending IPs are included. Check for the 10-lookup limit with the DNS Lookup Tool.

SMTP Diagnostics

Test SMTP connectivity directly:

Test with OpenSSL

openssl s_client -connect mail.example.com:465
# or for STARTTLS:
openssl s_client -starttls smtp -connect mail.example.com:587

Common SMTP Error Codes

CodeMeaning
421Service temporarily unavailable (try again later)
450Mailbox unavailable / greylisted
550Permanent rejection (user not found, policy block)
553Invalid sender address
554Transaction failed (often blacklist or DMARC rejection)

Use the SMTP Tools for automated connectivity testing.

Authentication Issues

SPF Failures

Check: Is the sending IP included? Are there too many DNS lookups (max 10)? Is the mechanism order correct? Use ~all for testing, -all for production.

DKIM Failures

Verify the DKIM selector DNS record exists: dig TXT selector._domainkey.example.com. Check key length (2048-bit recommended), correct body/header canonicalization, and that the signature hasn't been broken by intermediary servers.

DMARC Failures

DMARC requires either SPF or DKIM to pass AND align with the From domain. Check alignment mode (strict vs relaxed) and review aggregate reports for failure patterns.

Blacklist & Reputation

If your mail server IP is on a blacklist, many recipients will reject your email outright.

  • Check your IP with the RBL Blacklist Checker
  • Common blacklists: Spamhaus (SBL/XBL/PBL), Barracuda, SORBS, SpamCop
  • To delist: fix the root cause first, then submit a delisting request to each RBL
  • Build sender reputation gradually with email warm-up

TLS & Certificate Problems

Certificate Mismatch

The certificate CN/SAN must match the hostname used in the MX record. If MX points to mail.example.com, the cert must cover that exact hostname.

Expired Certificate

Strict senders using MTA-STS or DANE will refuse to deliver to servers with expired certificates. Set up auto-renewal monitoring.

STARTTLS Not Working

Some firewalls strip the STARTTLS command from SMTP sessions (STARTTLS stripping attack). Use port 465 (implicit TLS) as an alternative.

Mail Queue Management

Postfix

mailq                    # View queue
postsuper -d ALL         # Delete all queued mail
postsuper -r ALL         # Requeue all mail
postqueue -f             # Flush the queue

Exim

exim -bpc              # Count queued messages
exim -bp               # List queue
exim -qff              # Force delivery attempt

Diagnostic Commands Cheat Sheet

TaskCommand
Check MX recordsdig MX example.com
Test SMTP connectiontelnet mail.example.com 25
Check SPF recorddig TXT example.com
Check DKIM recorddig TXT sel._domainkey.example.com
Check DMARCdig TXT _dmarc.example.com
Check reverse DNSdig -x IP_ADDRESS
Test TLS certificateopenssl s_client -connect host:465
View mail logstail -f /var/log/mail.log

FAQ

Why are my emails bouncing?

Emails bounce for many reasons: invalid recipient (550 5.1.1), full mailbox (552), blacklisted IP (554), missing MX records, or SPF/DKIM/DMARC failures. Check the bounce DSN code for the specific reason.

How do I check if my IP is blacklisted?

Use the RBL Blacklist Checker to scan your IP across 50+ blacklists.

What does SMTP error 550 mean?

SMTP 550 is a permanent rejection. Common sub-codes: 5.1.1 (recipient not found), 5.7.1 (policy/SPF rejection), 5.7.23 (DMARC failure).