A stuck WHM mail queue is one of the most disruptive issues a cPanel server can face. Emails pile up, clients report that messages aren't arriving, and the problem compounds by the hour. The good news: most stuck mail queue issues are fixable within minutes once you know where to look. This guide covers every method — from the WHM graphical interface to advanced Exim command-line fixes — plus how to find and eliminate the root cause so it doesn't come back.
What Causes the WHM Mail Queue to Get Stuck?
The Exim mail transfer agent (MTA) used by cPanel manages all outgoing email. When the queue backs up, it's almost always one of these causes:
- DNS resolution failures: Exim can't look up the MX record for the destination domain — messages queue while retrying
- Remote server rejections: The destination mail server is down, blacklisting your IP, or enforcing rate limits
- Frozen messages: Exim marks messages as "frozen" after repeated delivery failures — frozen messages stop retrying entirely
- Mail bomb or spam loop: A compromised account or script is flooding the queue with thousands of messages
- Exim misconfiguration: Incorrect relay settings, missing SPF/DKIM, or conflicting mail routing rules
- Server resource exhaustion: High load, disk full, or memory pressure preventing Exim from processing the queue
💡 None of these worked? Skip the guesswork.
Get Expert Help →Fix 1: Manage the Queue via WHM Mail Queue Manager
The fastest first step is the WHM Mail Queue Manager — no command line needed.
Log into WHM, then navigate to Email → Mail Queue Manager (or search "queue" in the WHM search bar).
You'll see a list of queued messages with their status (frozen, active, deferred) and destination addresses. Look for patterns: hundreds of messages to the same domain, or a flood of bounces, both indicate a specific root cause.
- Attempt Delivery: Forces an immediate retry for selected messages
- Deliver All: Forces delivery of the entire queue right now — useful when Exim was paused or just misconfigured
- Delete Selected: Remove specific messages (e.g., spam or undeliverable bounces)
- Delete All: Nuclear option — wipes the entire queue. Only use this if the queue is full of spam you're sure you don't need.
# Find the top senders in the current queue
exim -bp | exiqsumm | sort -rn | head -20
# Find all messages from a specific sender
exiqgrep -f "[email protected]" -i
exiqgrep -f "[email protected]" -i | xargs exim -Mrm
In WHM, go to Account Functions → Manage Shell Access to disable shell for compromised users, or temporarily suspend the cPanel account under Account Functions → Modify an Account.
Enable BoxTrapper or configure Exim rate limits in WHM under Exim Configuration Manager → Advanced Editor. Set smtp_accept_max_per_host and ratelimit ACL conditions to throttle any single account.
Prevent Future Mail Queue Issues
A few proactive steps will dramatically reduce mail queue problems going forward:
- Set up DKIM, SPF, and DMARC: Proper email authentication reduces the chance of your IP being blacklisted
- Enable SpamAssassin: Catches spam before it queues — configure a threshold of 5–6 in WHM's Apache SpamAssassin Configuration
- Set Exim rate limits: Limit how many messages any single account can send per hour via the Exim Configuration Manager
- Monitor queue size daily: Use
exim -bpcin a cron job and alert yourself if the count exceeds a threshold (e.g., 500 messages) - Keep DNS resolvers fast: Use
8.8.8.8and1.1.1.1in/etc/resolv.conffor reliable lookups
If your mail queue keeps stalling despite these fixes, the issue may be more complex — an Exim configuration conflict, a persistent spam source, or a blacklisted IP that needs formal delisting. CloudHouse's server management team can audit your Exim configuration, clear blacklistings, and implement rate-limiting to permanently resolve repeated mail queue problems.