Postfix - Name service error for type=MX: Host not found


The following postfix error occurs in /var/log/mail after attempting to send a mail.

node01 postfix/master[29890]: reload configuration
node01 postfix/pickup[25736]: 9D7A419DC: uid=0 from=
node01 postfix/cleanup[25754]: 9D7A419DC: message-id=<>
node01 postfix/qmgr[25737]: 9D7A419DC: from=<>, size=451, nrcpt=1 (queue active)
node01 postfix/smtp[25756]: 9D7A419DC: to=<>, 
relay=none, delay=0, status=deferred (Host or domain name not found. 
Name service error for type=MX: Host not found, try again)

/etc/postfix/ had the correct relayhost entry for the mail server such as

relayhost =

However DNS was not configured on the mail client as there was no DNS server configured on the network and therefore the mail client was using /etc/hosts for name resolution.

The errors were caused by the following line in

disable_dns_lookups = no

Change this setting to yes and reload the configuration by using the following command

postfix reload

Now try to send a mail, it should hopefully reach its destination now, or at least the above errors should have gone.