Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

up vote 11 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.

share|improve this answer
    
fixed my problem. Just want to be clear, it is the hostname that should be put in this line. So first use hostname command find it, than add it to this line in \etc\hosts . Thanks, man. –  leon Jul 4 '13 at 6:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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