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: My unqualified host name (hdps01) unknown; sleeping for retry Jul 11 21:27:43 hdps01 sm-msp-queue: unable to qualify my own domain name (hdps01) -- using short name Jul 11 21:27:43 hdps01 sm-msp-queue: 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 (...) 192.168.56.101 hdpm01 192.168.56.102 hdps01 192.168.56.103 hdps02
So I checked the
[root@hdps01 ~]# cat /etc/sysconfig/network NETWORKING=yes HOSTNAME=hdps01
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/sysconfig/network) contents by adding a “fake” domain
[root@hdps01 ~]# cat /etc/sysconfig/network NETWORKING=yes HOSTNAME=hdps01.mm
[root@hdps01 ~]# cat /etc/hosts (...) 192.168.56.101 hdpm01.mm 192.168.56.102 hdps01.mm 192.168.56.103 hdps02.mm
Restarting sendmail took less than second – problem solved.