Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

It takes ~15 seconds to send single e-mail using sendmail.

/var/log/mail.log:

Jul 31 09:52:42 piotr-probook sendmail[2912]: My unqualified host name (piotr-probook) unknown; sleeping for retry

/etc/hostname:

piotr-probook

/etc/hosts:

127.0.0.1   piotr-probook localdev localhost
192.168.1.1 router

/etc/mail/sendmail.cf:

# hosts file (normally /etc/hosts)
O HostsFile=/etc/hosts

Obviously I can ping piotr-probook host and HTTP server popups in browser when i type url http://piotr-probook

What am I doing wrong? How to fix the problem?

share|improve this question
up vote 19 down vote accepted

Sendmail requires that the result of "hostname" be a fully qualified domain name to start cleanly.

Set the hostname to something like piotr-probook.localdomain and update /etc/hosts.

/etc/hosts

127.0.0.1   piotr-probook.localdomain piotr-probook localdev localhost
share|improve this answer
1  
Thank you! It works! Btw. it works without changing machine hostname. I just added piotr-probook.localdomain to /etc/hosts and everything is ok – user21886 Jul 31 '13 at 13:27
    
Thanks so much, Btw, I add a newline 127.0.0.1 piotr-probook.localdomain seems not work, but merge it to ONE line, it works!! – liuyang1 Mar 19 '15 at 9:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .