Exim R=lookuphost defer (-1): host lookup did not complete

If you’re getting this error when sending mail with exim, this will be one of two problems:

The mail-sending server isn’t set up to check DNS properly. Check your /etc/resolv.conf file. If it says something like localhost or you’re in trouble. This should typically be set to the DNS servers of your hosting provider, but if in doubt set them to those used by OpenDNS:


If your nameservers are all working, but you’re still getting the error, this probably means there’s a problem with the remote host’s MX records. To make sure its not just you, go to CheckDNS and put in the domain name you can’t send email to. If you see MX record errors, it’s them, not you.

A handy quick command to run is:

exim -bt email@address.com

which will test exim’s ability to route to the address you specify. For extra debug information add the -d-resolver argument. This will help diagnose which router exim uses to send the email.

It’s possible you have an entry for the external domain in your /etc/localdomains file – possibly an old domain you’ve now hosted elsewhere? If that’s the case exim will be trying to route it locally and that’s why it’s not working. Worse still, if the domain is still configured on the local server you may well find it’s getting routed into a local mailbox instead of the target domain, but you wouldn’t get an error for that!

If you’re running CPanel and desperately want to know why the Mail Troubleshooter (which allows you to trace email addresses for diagnosis) for your desired name is merely saying ‘lookuphost via lookuphost’, this just relates to the problems above. It’s trying to use the lookuphost router (which is fine and correct for an externally-bound email), but its failing to resolve the DNS, so follow the steps above.

Exim is quite vast and difficult to understand – I hope this information helps you troubleshoot your routing issues. I thought I had one tonight when an email with multiple cc:’s could not do DNS lookup for several of the recipients. Naturally I assumed my server was to blame, but an eventual DNSCheck of each found that, surprisingly, it was merely defunct or an ‘Error 451: Temporary local problem, please try later‘ error (which probably means that the domain you’re trying to send to is on a shared host which has a working MX relay, but isn’t configured to accept email for that particular domain).

, , , , , ,

%d bloggers like this: