Postfix queue keeps growing: many deferred messages (postqueue -p, flush, find the reason)

Mail piles up in the deferred queue because deliveries keep failing temporarily.

Exact message you may see Postfix deferred queue growingpostqueue -p thousands of messages deferred(delivery temporarily suspended: connect to ...: Connection timed out)mailq shows many deferred emailsPostfix queue full of deferred mail
Seen on: Postfix Linux SMTP

Meaning

Read the reason on each deferred message (postqueue -p, postcat -q ID, mail.log): connection timed out, DNS, blocked port 25, greylisting, remote 4xx. Fix the cause, then postqueue -f to retry. Use postsuper -d ALL deferred only for spam floods. Limit concurrency and set sensible lifetimes.

Common causes

  • Outbound port 25 blocked
  • DNS resolver failing
  • Remote server rejecting with 4xx (greylist/rate limit)
  • Compromised account flooding the queue
  • Disk/IO problems

⚡ Quick fix

  1. postqueue -p | head and read the deferral reasons
  2. Fix DNS/firewall/reputation, then postqueue -f
  3. Remove spam: postsuper -d ALL deferred

Detailed fix by platform

Shell

  1. bash
    postqueue -p | tail -5
    mailq | grep -c "^[A-F0-9]"
    sudo postqueue -f

How to diagnose

  1. Reason — Which?
  2. Size — Growing?
  3. Source — Spam?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Network. Errors that are often confused with or caused by this one (click to open):

4.4.7 — 554 4.4.7 Message expired: unable to deliver in 840 minutes (delivery timeout) (Email / SMTP)4.4.7Exim retry — Exim: retry time not reached for any host (message deferred, previous failure still in the retry window) (Email / SMTP)Exim retryfrozen — Exim: message is frozen — recipient or sender can't be bounced (frozen bounce messages pile up) (Email / SMTP)frozenloops back — Postfix: mail for example.com loops back to myself (status=bounced, local loop) (Email / SMTP)loops backMaxAttemptsExceededException (queue job) — Laravel Queue: Illuminate\Queue\MaxAttemptsExceededException: App\Jobs\SendReport has been attempted too many times or run too long (Laravel)MaxAttemptsExceededEx…milter — Postfix: warning: connect to Milter service inet:localhost:8891: Connection refused (OpenDKIM/OpenDMARC not running) (Email / SMTP)milterModelNotFoundException in queued job — Laravel Queue: Illuminate\Queue\SerializesModels: No query results for model [App\Models\Order] 42 (job failed) (Laravel)ModelNotFoundExceptio…Outbound port 25 blocked — SMTP: telnet smtp.example.com 25 — Connection timed out (cloud provider blocks port 25) (Email / SMTP)Outbound port 25 bloc…mailq

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.