Sendmail is a easy to use mail delivery service. I use it on my linux box for developing purposes for deliver test mails to an example.com domain to my local mail box. Very easy and effective.
Same time ago sendmail began to hang on startup apparently without any reason. I’m start it on demand through the command line, so it wasn’t an important problem because it doesn’t hang the operating system start up, but in the end I had to fix it. A look into the /var/log/maillog gave me the hint for a solution:
My unqualified host name (localhost) unknown; sleeping for retry
Obviously localhost was correctly defined in my /etc/hosts file, and everything else than sendmail seemed to work properly. I also checked the /etc/nsswitch.conf file and the host resolution settings was right (first the “file” option and then the “dns”).
Finally I found the problem in my /etc/resolv.conf file. The DHCP defined a “domain” called “lan” for my PC. So in fact the full name for my box was “localhost.lan” and was defined nowhere.
Not too bad, just added it in the /etc/hosts and everything works fine again 🙂