How to Troubleshoot Email Not Sending or Going to Spam

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

  1. systemctl status postfix — is the service running?
  2. mailq and /var/log/mail.log — what's the exact error?
  3. SPF/DKIM/DMARC — do all three pass in a Gmail header check?
  4. Reverse DNS — does dig -x return the correct hostname?
  5. Blacklist status — is the IP listed anywhere?
  6. Warm-up status — is this IP new, and is volume appropriate for its age?
  7. Content — any obvious spam triggers?

Common Errors and Their Meaning

Log MessageLikely 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
  • email troubleshooting, email not sending, email spam folder, mail log
  • 0 Usuários acharam útil
Esta resposta lhe foi útil?

Artigos Relacionados

How to Set Up a VPS for Email Marketing (Complete Guide)

Running your own email marketing infrastructure on a VPS gives you full control over...

How to Configure SPF, DKIM, and DMARC (Complete Guide)

SPF, DKIM, and DMARC are the three DNS-based email authentication standards that Gmail, Outlook,...

How to Set Up Reverse DNS (PTR/rDNS) for Email Deliverability

Reverse DNS (PTR record) maps your server's IP address back to a hostname — the opposite of...

IP Warm-Up: A Safe 30-Day Schedule for New Sending IPs

Mailbox providers like Gmail and Outlook monitor sending behavior closely and treat sudden...

Best Email Marketing Software for a VPS (MailWizz, Mautic, Listmonk & More)

Choosing the right self-hosted email marketing platform affects deliverability, ease of...