Exim seems to be “delivering” mail locally if the recipient is on the same domain as the webserver. How do I force exim to always send out the mail?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Had the same issue. Here’s what I did to troubleshoot.
See where it fails by running (change example@domain.com to your destination)
Check if your hosts are getting resolved properly by running these commands on the terminal.
If all is good, and if the block is still unroutable, force the exim configuration to route it. So edit /etc/exim/exim4.conf.template file, and find the block within .ifdef DCconfig_internet. Add this as the first rule. (Change example.com to your domain)
Run the routing test again to see if it passes now.
Note about exim4.conf.template file. This can get regenerated if you run the config utility again. To avoid this, duplicate this change in the /etc/exim/conf.d/routing/ folder as well.
I was able to resolve this issue, I had inadvertently set the hostname to the domain name. Setting the hostname to:
something.domain.com and then reconfiguring exim fixed the issue.