Fix ‘My Unqualified Host Name (foo.bar) Unknown’ Problem – Sendmail Configuration Guide

email-serverhostnamehostssendmail

When trying to start sendmail or send a mail using a wordpress plugin, this error shows up in the maillog:

"My unqualified host name (foo.bar) unknown; sleeping for retry"

After Googling the best advice was, "add foo.bar to the /etc/hosts file", but it already is:

127.0.0.1     localhost localhost.localdomain
127.0.0.1     foo.bar

Best Answer

Simply changed:

127.0.0.1     localhost localhost.localdomain
127.0.0.1     foo.bar

To this

127.0.0.1     localhost localhost.localdomain foo.bar

Sendmail looks for a fully qualified domain (FQDN) name and will use the localhost.localdomain in the single line version.

Related Topic