At PrenHost, we pride ourselves on maintaining high-performance server environments. However, even the most robust systems can encounter “routing ghosts” after migrations or IP changes. Today, we’re diving into a common Exim mail server error that can bring your client’s communication to a halt.
The Symptom
You might see entries like this in your exim_mainlog:
defer (-54): retry time not reached for any host for 'example.com'
Or even a rejection:
Result: remote host address is the local host
The Cause: Identity Crisis
This typically happens when your server is confused about where a domain “lives.” If the server thinks a domain is Remote (hosted elsewhere) but the DNS points to its own IP, it creates a loop. This is often caused by:
-
Static Routes: Leftover entries in manual routing files (like
/etc/manualmx). -
Incorrect Routing Settings: The domain being set to “Remote Mail Exchanger” in cPanel/WHM when it should be “Local.”
The Solution
1. Identify and Remove Static Routes
Check if your server is being forced to use an old IP. Search your configuration for the domain:
grep -r "example.com" /etc/manualmx
If found, remove the entry so the server can rely on fresh DNS and local routing.
2. Configure Local Mail Exchanger
In WHM, navigate to Email Routing Configuration. Ensure that domains hosted on your server are set to Local Mail Exchanger. This tells the server: “I am the final destination; don’t try to send this mail back out to the internet.”
3. Clear the Exim Retry Database
Exim remembers failures to protect your server’s reputation. To force it to try again immediately after your fix, clear the hint databases:
exim_tidydb -t 0d /var/spool/exim retry > /dev/null
exim_tidydb -t 0d /var/spool/exim wait-remote_smtp > /dev/null
systemctl restart exim
Conclusion
By aligning your internal routing with your actual server IP, you eliminate “ghost” routes and ensure 100% mail delivery. If you’re looking for server management that handles the deep-level technicalities for you, explore our managed services at PrenHost.