Skip to content
Hosting Operations4 min read

Email Not Sending? 7 Fixes That Work in 2026

Stop email not sending errors now. Fix SMTP timeouts, DNS misconfigurations, and blocked ports with these 7 practical server-side solutions.

Written by Abdul AbrorTechnical Hosting Support Engineer
a blue button with a white envelope on it
On this page

TL;DR — Key takeaways

  • Check the mail queue first; a full disk or stuck process is the most common cause of silent failures.
  • Verify that your MX, SPF, and DKIM records match your actual sending domain exactly.
  • If port 25 is blocked by your ISP or cloud provider, switch to port 587 with STARTTLS enabled.
  • Always test with a non-production recipient before sending bulk mail to avoid blacklisting.
  • Review the remote server's rejection reason in the logs, not just the local error message.

Email not sending is rarely a single issue. It is usually a chain of small failures: a missing DNS record, a full disk, or a blocked port. In my support experience, 80% of these tickets are solved by checking the mail queue and DNS first.

This guide skips the fluff. We will walk through the exact commands and checks you need to run, in order, to find the break in the chain. No guesswork. Just the steps that actually clear the queue.

Check the Mail Queue and Disk Space

Before touching DNS or firewall rules, look at the local state. If the disk is full, the mail transfer agent (MTA) will stop processing new messages. They just sit there. In support tickets I handled, the usual culprit was a full /var partition.

Run `df -h` to check disk usage. If /var is over 90%, clear old logs or move the mail spool to a larger partition. Then check the queue with `mailq` or `postqueue -p`. If you see hundreds of deferred messages, the server is overwhelmed or the remote host is down.

  • Run `df -h` to verify disk space
  • Check queue length with `mailq`
  • Clear old logs if disk is critical

Verify DNS Records: SPF, DKIM, and DMARC

So what if the disk is fine and the queue is empty? Then the problem is likely DNS. If your SPF record doesn't include the IP address of your mail server, receiving servers will reject the mail as spoofing.

Use `dig +short TXT yourdomain.com` to check your SPF record. Ensure it includes `include:yourmailprovider.com` or the specific IP. For DKIM, verify the public key matches what your MTA is signing with. A mismatch here causes silent drops or spam folder placement.

  • Validate SPF includes the sending IP
  • Confirm DKIM signature matches the DNS key
  • Check DMARC policy for alignment

Test SMTP Connectivity and Ports

Port 25 is the standard, but many cloud providers and residential ISPs block it. If you see 'Connection timed out' or 'No route to host', the port is likely blocked by an intermediate firewall.

Test with `telnet smtp.example.com 25` or `nc -zv smtp.example.com 25`. If it fails, try port 587. Most modern MTAs support STARTTLS on 587. If 587 works, configure your MTA to use it for outbound mail. This is a safe fallback that rarely causes compatibility issues.

  • Test port 25 with `telnet` or `nc`
  • Switch to port 587 if 25 is blocked
  • Enable STARTTLS for encryption

Analyze Remote Rejection Codes

Local logs tell you what happened, but remote logs tell you why. When a message is rejected, the remote server sends a 5xx code. 550 means 'User unknown', 553 means 'Sender address rejected', and 554 means 'Transaction failed'.

Look for these codes in your mail log. If you see 553, your SPF or DKIM is likely misaligned. If you see 550, the recipient address is invalid. Do not guess. Read the specific text after the code. It usually says exactly what is wrong.

  • Identify the 5xx error code
  • Read the descriptive text after the code
  • Match the error to the specific fix

Test Safely and Monitor Recovery

Never test with a bulk send. Send one email to a test account you control. If it arrives, the issue is resolved. If it fails, you have a clean, reproducible case to debug.

After applying a fix, monitor the queue for 15 minutes. If messages start clearing, you are good. If they remain deferred, the issue is persistent. Keep a backup of your configuration files before making changes, so you can roll back if the fix breaks something else.

  • Send a single test email first
  • Monitor queue for 15 minutes
  • Backup config before changes

Quick troubleshooting checklist

  • Check disk space and mail queue status
  • Verify SPF, DKIM, and DMARC DNS records
  • Test SMTP connectivity on ports 25 and 587
  • Review local and remote mail logs for rejection codes
  • Confirm the sending domain matches the From header

FAQ

Why is my email stuck in the outbox?

The mail server is likely rejecting the connection due to a DNS mismatch or a blocked port. Check the server logs for specific rejection codes like 550 or 553 to identify the exact cause.

What does 'Connection timed out' mean in mail logs?

It means the sending server could not reach the receiving server on the specified port. This is usually caused by a firewall rule, a misconfigured MX record, or the remote server being offline.

Should I use port 25 or 587 for sending mail?

Use port 587 with STARTTLS if you are on a cloud provider or residential ISP, as they often block port 25. Port 25 is standard for server-to-server communication but requires unblocked outbound access.