up vote 1 down vote favorite
share [g+] share [fb]

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
link|improve this question

50% accept rate
feedback

1 Answer

up vote 2 down vote accepted

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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.