Cranky Sendmail

Another problem I encountered with updating my living room media player from Slackware 14.1 to 14.2 is sendmail always took a long time to start. I have seen sendmail get cantankerous this way when there is no fully qualified domain name. That is fixable in the /etc/hosts file.

This was not the case this time. This was an update of 14.1 to 14.2 and not a fresh install. Nothing changed with the sendmail configuration files and hosts file.

There were no related messages in the logs. The delay was about 50 seconds.

I found a forum discussion thread about the problem. A lot of investigation about entropy pools. I was able to confirm log messages about entropy.

random: udevd: uninitialized urandom read (16 bytes read, 3 bits of entropy available)

The log message repeated several times.

The date stamps in the logs matched the time at which the sendmail script finally executed. That is, when the random/udevd messages ended, sendmail immediately launched.

While the same log entries appear in my office desktop and laptop with 14.2, neither system experiences the sendmail delay.

Curiously, when I booted into run level 1 and then ran init 3, sendmail started normally. No delays.

Additional discussion led to a conclusion that using an SSD contributes to the problem with sendmail. Creating sufficient system entropy requires moving parts, keyboards, mice, and rotating disks. In embedded systems, headless servers, and systems with SSDs, there are no moving parts. My media player fit that description. The system boots and there are no keyboard or mice to create entropy. No spinning disks with an SSD.

There were two work-arounds offered. One is to run haveged, a deamon designed to keep the entropy pool high. Another work-around is to modify the rc.sendmail script to fork into the background to avoid the boot delay.

Likely my experience with booting into run level 1 and then run level 3 avoided the entropy problem because of my nominal keyboard interaction.

There is a third option. Move to a different mail daemon.

I installed the havege daemon as a temporary work-around. Likely though I will move from sendmail to postfix. A couple of reports are that postfix does not suffer the boot delay bug. Exposure to postfix will help with work responsibilities too. I long have wanted to centralize my mail flows. Likely I will need to create an IMAP server, which means something like a dovecot/postfix tandem.

I am irritated with the sendmail delay bug, but perhaps the silver lining here is an additional motivation to move to postfix.

Broken software. That is the nature of the beast known as the Linux desktop.

Posted: Category: Usability Tagged: General, Slackware

Next: Odd AT-SPI Messages

Previous: EVIOCSKEYCODE