2

Every day I get the output of sudo service --status-all emailed to me using crond. The server is a CentOS 6.5 web server which I use to host a few WordPress websites. Occasionally sendmail will change from is running... to dead but subsys locked like in the example below.

crond (pid  7768) is running...
httpd (pid  2922) is running...
mysqld (pid  1314) is running...
sendmail dead but subsys locked
openssh-daemon (pid  11173) is running...

I normally fix this by restarting the service with this command sudo service sendmail restart. The change in status doesn't seem to affect sendmail at all as my WordPress sites still send emails fine (which is all I use sendmail for).

What is causing this to happen and is it a problem? How do I go about fixing it?

1 Answer 1

7

Turns out postfix and sendmail were running at the same time. Something was occasionally causing the postfix service to start which then caused the status of sendmail to jump to dead but subsys locked.

I thought I had checked that postfix wasn't running by performing sudo service --status-all. Rather confusingly the main process for postfix is listed as master not postfix. Upon scanning the output of sudo service --status-all I was expecting to see postfix (pid xxxx) is running... and as there was no such line I assumed postfix wasn't running!

To fix this I simply performed sudo service master stop followed by sudo service sendmail restart and all is well again. Now time to track down what's causing postfix to start up every now and then...

1
  • You can just use chkconfig postfix off
    – netniV
    Nov 22, 2017 at 12:48

You must log in to answer this question.