Exim4 Remote Domain Mailing

Yesterday we changed the domain on on of our services from .net to .com as well as setup Google Apps to handle email and such. Everything worked great until the web server hosting the domain tried emailing anyone at the new .com domain. It would return an error message:

remote host address is the local host

And basically would let me know the email address was not routable. I believe this was related to the fact that the domain was also listed in /etc/hosts so exim was trying to use the domain as a local domain instead of trying to deliver out the email remotely. After about 3 hours of troubleshooting I finally was able to use the hubbed_hosts router from exim to get exim to understand this was a remote domain. I edited the following file:


I changed it so it read:

debug_print = "R: hubbed_hosts for $domain"
driver = dnslookup
domains = "domain.com"
same_domain_copy_routing = yes
transport = remote_smtp</code>

So any instances of those domains would be delivered remotely. I also setup aliases so that anything like root, postmaster, www would go out to real addresses as well. To be honest I am not even sure if this is the best way to accomplish remote domain emailing, but it's working.

That said, it's definitely time to start my weekend...enjoy yours!

comments powered by Disqus

Morgan W.

Head over heels for gadgets!