Symptoms
When sending an email, you may find that the recipient did not receive the email. You will also find the email failed to send in WHM >> Mail Delivery Reports with the result:
host lookup did not complete
You will also see this error when testing mail deliverability to the recipient via SSH:
# exim -bt user@domain.tld
user@domain.tld cannot be resolved at this time: host lookup did not complete
Description
This occurs when the server is unable to resolve the recipients' domain and is typically due to the nameservers that are configured in /etc/resolv.conf or WHM >> Resolver Configuration. This can also occur if the host in the MX record of the recipients' domain does not resolve to an IP address.
Workaround
Use WHM >> Resolver Configuration to remove the current nameservers from /etc/resolv.conf and add new nameservers that can resolve remote domains. Please use your hosting provider or internet service providers' DNS servers when possible.
Another option would be to use public DNS servers, such as Google's public DNS servers 8.8.8.8 and 8.8.4.4. However, please keep in mind that using public DNS servers may cause RBL's such as Spamhaus to not function correctly.
Optionally, you can edit /etc/resolv.conf via SSH by following these steps:
1. Connect to the server via SSH as the root user.
2. Open the /etc/resolv.conf file using any command-line text editor you prefer (example: vi, vim, nano, etc.)
3. Comment out the current nameservers by adding a '#' in front of each nameserver and add the new nameserver entries:
Example:
#nameserver 192.168.0.1
#nameserver 192.168.0.2
nameserver 8.8.8.8
nameserver 8.8.4.4
4. Save and close the file.