qmail alert: cannot start: unable to open mutex

For some reason the mail log was showing lots of:

Sep 23 09:40:03 hostname qmail: 1253695203.637058 alert: cannot start: unable to open mutex
Sep 23 10:32:16 hostname qmail: 1253698336.515510 alert: cannot start: unable to open mutex
Sep 23 10:32:21 hostname qmail: 1253698341.425333 alert: cannot start: unable to open mutex

and qmail was not working properly.

It turns out that for some reason /var/qmail/queue/lock/ was missing along with the file /var/qmail/queue/lock/sendmutex.  Had to recreate these with:

[[email protected] ~]# mkdir /var/qmail/queue/lock/
[[email protected] ~]# chown qmailq:qmail /var/qmail/queue/lock/
[[email protected] ~]# touch /var/qmail/queue/lock/sendmutex
[[email protected] ~]# chown qmails:qmail /var/qmail/queue/lock/sendmutex

Then qmail would start fine.

URL: