Exim on cPanel is configured with conservative defaults that assume a quiet mail flow. When a customer fires a newsletter to 50,000 recipients, or a transactional service retries deferred mail in waves, the queue grows faster than the runners can process it. The mail itself is fine; the delivery is just delayed by hours or days. The fix is to size queue runners and parallelism to the actual workload, not the default.
What’s happening
Exim’s queue_run is what processes deferred or queued messages. By default, cPanel runs exim -q1h every hour — one queue run per hour, single-threaded. On a quiet host that is fine. On a host where a customer just queued 50,000 messages, that is one run per hour processing maybe 1000 messages each — 50 hours to clear the queue.
The relevant Exim knobs are: queue_run_max (how many parallel runners), remote_max_parallel (concurrent SMTP deliveries per host), smtp_accept_max_per_connection, and the cron interval. cPanel sets some of these from WHM > Exim Configuration Manager. Others require editing /etc/exim.conf.local.
How to verify
Current queue size and age distribution:
exim -bpc
exim -bp | head -20
exim -bp | awk '{print $1}' | sort | uniq -c
Per-message queue runner stats:
ps auxf | grep 'exim -q'
tail -200 /var/log/exim_mainlog | grep 'starting queue run'
exim -bp -bpr | head -20
If you see only one exim -q process running and the queue size is in the tens of thousands, you have a runner-count problem. If you see many exim -q processes but the queue is still growing, the bottleneck is downstream (slow remote MTA, DNS resolution, TLS handshake).
The fix
- Raise queue runner parallelism. In WHM > Exim Configuration Manager > Advanced Editor, set
queue_run_max = 30(or higher; up to ~50 on a busy host). - Raise concurrent remote deliveries.
remote_max_parallel = 20lets a single runner send to 20 recipients in parallel. Combined withqueue_run_max, the host can have hundreds of concurrent outbound connections. - Adjust the cron interval. cPanel’s default
/etc/cron.d/eximrunsexim -q1h. For a bursty host, switch to*/15 * * * * exim -q— a queue run every 15 minutes. - Smart-host the heavy senders. A customer doing 50k+ messages per day should not deliver direct-to-MX from a shared cPanel host. Route them through Postmark, Sendgrid, or a dedicated SMTP relay. The cPanel-side change is a single transport rule.
- Watch deferred-vs-frozen split.
exim -bpshows messages with a*(frozen) flag separately. A growing frozen queue means delivery failures that need attention, not just slow runners.
After tuning, watch the queue size every 5 minutes during a burst event. Steady or shrinking = configuration is sized right; growing = need more parallelism or a different routing strategy. Stack Harbor handles mail flow tuning as part of cPanel/WHM management.