Qmail waits 30 minutes before processing a message

A recent problem with a Qmail server had our Linux technicians scratching their heads a bit. The server would accept a message to be sent from an account on that box, but it would take about 30 minutes to actually send the message to the recipient. This is what we found:

————————————————————————————-

After scouring the internet and digging through reams of text, we checked /var/qmail/queue/lock/trigger.

The trigger file did not look like it was supposed to (below).

It should look like this:

prompt# ls -l /var/qmail/queue/lock/trigger
prw–w–w- 1 qmails qmail 0 Dec 17 21:56 /var/qmail/queue/lock/trigger

The first character “p” in the `ls -l` output means that the file is a named pipe (or a “FIFO”). If it’s a regular file (“-“), doesn’t exist, or if the permissions are wrong, qmail-send won’t get an immediate notification when new messages are added to the queue, and it won’t process them until it hits its scheduled wake-up time, typically every 30 minutes.

Once we realized that this was the problem, it was easy to fix:

mkfifo /var/qmail/queue/lock/trigger
chown qmails:qmail /var/qmail/queue/lock/trigger
chmod 622 /var/qmail/queue/lock/trigger