Introduction
Exim uses a retry database (also known as the hints database) to track temporary email delivery failures. When an email cannot be delivered due to issues such as SMTP errors, DNS failures, or temporary remote server unavailability, Exim defers the message and schedules a retry.
Even after the underlying issue is resolved, Exim may continue to defer messages with the error “retry time not reached for any host.”
In such cases, clearing the Exim retry database allows the mail server to immediately retry delivery using the updated configuration.
Procedure:
Step 1: Log in as Root
Access the server via SSH as the root user or use the Terminal option in WHM.
Step 2: Clear the Retry Database
Run the following cPanel-supported and safe command:
/usr/local/cpanel/scripts/exim_tidydb -t 1m /var/spool/exim retry
What This Command Does:
- Removes retry records older than 1 minute
- Forces Exim to recalculate retry schedules
- Preserves all queued emails
- Safely rebuilds the retry database files
This is the recommended method for clearing the Exim retry database on cPanel servers.
Step 3: Restart Exim
Restart the Exim service to ensure all retry states are refreshed:
systemctl restart exim
Step 4: Force Immediate Mail Delivery
To immediately retry all queued messages, run:
exim -qff
Conclusion
The Exim retry database plays a critical role in handling temporary email delivery failures. However, stale retry entries can cause prolonged deferrals and incorrect mail routing even after SMTP or DNS issues are resolved.
Clearing the retry database using exim_tidydb is a safe, supported, and effective way to restore normal mail flow on cPanel servers. Whenever email delivery does not resume as expected after fixing configuration or connectivity issues, clearing the Exim retry database should be one of the first troubleshooting steps.