Problem with very slow sendmail startup

I was playing a bit with some virtual machines I need for testing, when after a reboot I noticed that sendmail is starting very slow – it took about 3-4 minutes to have it working. I’ve checked the log too see what’s wrong:

[root@hdps01 ~]# tail /var/log/maillog
Jul 11 21:26:43 hdps01 sm-msp-queue[1266]: My unqualified host name (hdps01) unknown; sleeping for retry
Jul 11 21:27:43 hdps01 sm-msp-queue[1266]: unable to qualify my own domain name (hdps01) -- using short name
Jul 11 21:27:43 hdps01 sm-msp-queue[1289]: starting daemon (8.14.4): queueing@01:00:00

So, what was the problem?

I was expecting that the problem was with multiple entries for the same hostname in /etc/hosts, but it was pretty OK.

[root@hdps01 ~]# cat /etc/hosts
(...)	hdpm01	hdps01	hdps02

So I checked the /etc/sysconfig/network:

[root@hdps01 ~]# cat /etc/sysconfig/network

I realized that my hostnames were not FQDNs (Fully Qualified Domain Name) – stupid mistake caused by the “it’s temporary” syndrome. To be clear – valid hostnames (as i.e. sendmail requires it to extract some info) should be at least something like this:


Obvious thing, but I forgot about it. So I’ve fixed both files’ (/etc/hosts and /etc/sysconfig/network) contents by adding a “fake” domain .mm:

[root@hdps01 ~]# cat /etc/sysconfig/network
[root@hdps01 ~]# cat /etc/hosts

Restarting sendmail took less than second – problem solved.

Comments are closed.