A step-by-step diagnostic checklist for the two most common email problems: messages that don't send at all, and messages that send successfully but land in spam.
Problem 1: Email Not Sending
Step 1 — Check the Mail Service Is Running
sudo systemctl status postfix
Step 2 — Check the Mail Queue
mailq
A growing queue means mail is accepted but not being delivered — check the logs for the specific rejection reason.
Step 3 — Check the Mail Log
sudo tail -100 /var/log/mail.log
Look for the specific error next to the failed message — this almost always identifies the exact cause.
Step 4 — Test Port 25 Connectivity
telnet gmail-smtp-in.l.google.com 25
If this hangs or refuses, outbound port 25 may be blocked by your provider — a common cause of "stuck" mail, requiring the provider to unblock it for legitimate sending.
Step 5 — Verify DNS Resolution
dig MX gmail.com
If your server can't resolve recipient domains, mail delivery will fail entirely.
Problem 2: Email Sends but Goes to Spam
Step 1 — Verify SPF, DKIM, and DMARC All Pass
Send a test to Gmail, open the message, and select "Show original." All three should show PASS. If any fail, see How to Configure SPF, DKIM, and DMARC (Complete Guide).
Step 2 — Verify Reverse DNS
dig -x YOUR_SERVER_IP +short
Should return your mail hostname. If missing or incorrect, see How to Set Up Reverse DNS (PTR/rDNS) for Email Deliverability.
Step 3 — Check Blacklist Status
See How to Check and Remove Your IP from Email Blacklists (RBL).
Step 4 — Check IP Warm-Up Status
A brand-new, unwarmed IP sending significant volume is one of the most common causes of spam-folder placement — see IP Warm-Up: A Safe 30-Day Schedule for New Sending IPs.
Step 5 — Review Content for Spam Triggers
- Excessive capitalization or exclamation marks
- Spam-associated words in the subject line ("FREE", "ACT NOW", "GUARANTEED")
- Very high image-to-text ratio
- Suspicious or shortened links
Step 6 — Check List Quality
High bounce or complaint rates from a poor-quality list directly damage sender reputation — see Email Marketing Best Practices & Common Pitfalls to Avoid.
Full Diagnostic Checklist
systemctl status postfix— is the service running?mailqand/var/log/mail.log— what's the exact error?- SPF/DKIM/DMARC — do all three pass in a Gmail header check?
- Reverse DNS — does
dig -xreturn the correct hostname? - Blacklist status — is the IP listed anywhere?
- Warm-up status — is this IP new, and is volume appropriate for its age?
- Content — any obvious spam triggers?
Common Errors and Their Meaning
| Log Message | Likely Cause |
|---|---|
| "Connection timed out" | Port 25 blocked, or recipient server unreachable |
| "Relay access denied" | Postfix relay permissions misconfigured |
| "550 5.7.1 ... not authorized" | Missing or failing SPF/DKIM authentication |
| "421 4.7.0 ... rate limited" | Sending too fast for an unwarmed or low-reputation IP |
Related Articles
- How to Configure SPF, DKIM, and DMARC (Complete Guide)
- How to Set Up Reverse DNS (PTR/rDNS) for Email Deliverability
- How to Check and Remove Your IP from Email Blacklists (RBL)
- How to Install and Configure Postfix as a Mail Transfer Agent
