Host or domain name not found in the Postfix mail logs

Home > Search
  by

If you are viewing this article, you probably are already looking at the Postfix mail logs. In this first example, the most important part of the error message is the last three words, "Host not found." This error means we could not connect to a DNS server to resolve the domain name to an IP addresses.  This means that the DNS settings in Linux are not properly configured.  Follow the article on how to configure DNS in Linux (resolv.conf).

Jan 1 00:00:01 mail postfix/smtp[1234]: 12A95860867: to=<user1@example.com>, relay=none, delay=68, delays=68/0.01/0.24/0, dsn=5.4.4, status=bounced (Host or domain name not found. Name service error for name=example.com type=AAAA: Host not found)

 


 

In this second example, notice the last sentence of the error message is "Host found but no data record of requested type."

Jan 1 00:00:01 mail postfix/smtp[1234]: 12A95860867: to=<user1@example.com>, relay=none, delay=68, delays=68/0.01/0.24/0, dsn=5.4.4, status=bounced (Host or domain name not found. Name service error for name=example.com type=AAAA: Host found but no data record of requested type)

 

When using telnet to send an email to the Postfix server, let's say the domain name is example.com.

rcpt to: user1@example.com

 

The /etc/postfix/main.cf file will need to recognize example.com as a domain in mydestination. "Host found but no data record of requested type" will appear if mydestination does not include example.com.

myhostname     = mail.example.com
mydomain       = example.com
mydestination  = $myhostname, localhost

 

To resolve this, we can either add example.com or $mydomain to mydestination.

myhostname     = mail.example.com
mydomain       = example.com
mydestination  = $myhostname, $mydomain, localhost

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter in the box below so that we can be sure you are a human.




Comments