I need to send mail from sub.domain.com but delivery to one address fails with an error "R=lookuphost defer (-1): host lookup did not complete".
Additional information that might be relevant:
My /etc/resolv.conf contains nameservers of a VPS provider (different from domain provider's nameservers).
I also checked DNS records of the addressee and found out there was no MX record for it.
Best Answer
check if MX DNS resolution fails from your side or not with mxtoolbox.com
use
exim -bt -d-resolver user@example.org
to diagnose exim mail routingrun
nslookup -type=MX example.org
on your server. and check if you get MX records answers.if not, try the same request but specify a well known nameserver, like google public dns:
nslookup -type=MX example.org 8.8.8.8
you should now get some MX results, and it means your nameserver is not working properly. So you can change your resolv.conf to a nameserver that works properly (provider, google dns, what you want, ..) or setup your own