Symptoms
-
There are deferred (unsent) emails in Plesk > Tools and Settings > Mail Server Settings > Mail Queue, that failed to be sent to
@example.com
address. -
The following error is shown in
/var/log/maillog
:status=deferred (Host or domain name not found. Name service error for name=example.com type=MX: Host not found, try again
-
The remote may be resolved from Plesk server:
# dig example.com +short
# dig example.com mx +short -
The remote host can be resolved from a different server:
# dig example.com +short
203.0.112.2
# dig example.com mx +short
10 mail.example.com
Cause
The server is configured to use a DNS resolver that cannot be reached or cannot resolve DNS names. Alternatively, it might be possible that there are no DNS servers configured in /etc/resolv.conf
.
Resolution
-
Connect to the server via SSH
-
Add proper resolver to
/etc/resolv.conf
. For example:# cat /etc/resolv.conf
nameserver 8.8.8.8Note: If in
/etc/resolv.conf
there are more nameservers, please set it on top of the nameservers list. Nameservers list order matters.Warning: Make sure that the nameservers configured in the server are reachable from the server network
Additional information
Postfix has stopped sending emails: status=deferred, Host or domain name not found