Bootstrap FreeKB - Postfix (Email) - Resolve "Host or domain name not found"
Postfix (Email) - Resolve "Host or domain name not found"

Updated:   |  Postfix (Email) articles

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

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


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