The default Exim retry schedule is generic. It works fine for typical destinations and badly for the awkward ones — corporate Exchange that greylists for six hours, a partner who throttles to 10 messages per minute, or a destination whose MX returns 4xx during their evening backups. Without tuning, mail to those hosts either bounces too quickly or stays in queue past the customer’s tolerance. The retry config is the lever.
What’s happening
Exim’s retry rules live in /etc/exim.conf.local and /etc/exim.conf.localopts on cPanel hosts. They specify how long Exim waits before retrying a deferred message and when it gives up. The default is something like 15-minute intervals for the first two hours, then hourly retries up to the bounce window (typically 5 days). When a remote MX returns 421 or 451, Exim defers and retries on the schedule. When the schedule is wrong for the destination’s actual rhythm, mail gets stuck behind the retry cadence.
How to verify
Inspect the active retry config:
exim -bP retry
Then look at the deferred queue for a specific destination:
exim -bp | grep example.com
For each frozen or deferred message, inspect its retry record:
exim -Mvl <message-id>
The retry record shows the last attempt time, the failure reason from the remote, and the next scheduled attempt.
The fix
-
Identify the pattern in the remote’s failures. Pull the
exim_mainlogentries for the destination. Distinguish between transient (4xx) defers, hard (5xx) bounces, and timeouts. Each calls for different retry behavior. -
Set a destination-specific retry rule in
/etc/exim.conf.local. Example for a slow corporate Exchange:exchange-partner.example.com * F,2h,15m; G,16h,1h,1.5; F,5d,6hThis retries every 15 minutes for 2 hours, then hourly (with exponential backoff) for 16 hours, then every 6 hours for 5 days.
-
For greylisting hosts, push the first retry out to 30 or 60 minutes. Greylisting expects you to retry but not aggressively — hitting it every 5 minutes gets you on the wrong list.
-
For throttled partners, coordinate with their ops team on a sending rate and configure smtp_accept_max_per_host and queue_run_max in cPanel’s Exim configuration to respect it.
-
Document each custom retry rule with the destination, the reason, and the date — these decisions are easy to forget and confuse later.
When several cPanel servers handle outbound mail for the same business and the retry profiles need to stay in sync, Stack Harbor maintains them under environment management.