Description of problem: The Postfix LSB/init script uses the standard /etc/rc.d/init.d/functions "status" function to check for the existence of a process called "master". It should really check for a PID as well, as 'master' is not really that generic a process name. I can write a sleeping shell script called master and that will fool "/sbin/service postifx status". A real world case of this is running Puppet Master through Passenger, where the spawned Ruby Rails process is also called 'master'. Haven't looked into if Postfix provides an internal health check, but for a quick fix you could change the status call to be "status -p <pid file> master" and make use of a /var/run to record a PID file. Version-Release number of selected component (if applicable): How reproducible: Pretty simple. Steps to Reproduce: [root@puppet-master-01 tmp]# cat master #!/bin/bash sleep 1000000 [root@puppet-master-01 tmp]# service postfix stop Shutting down postfix: [ OK ] [root@puppet-master-01 tmp]# ./master & [1] 18972 [root@puppet-master-01 tmp]# ps -fe | grep master root 18972 14875 0 12:07 pts/0 00:00:00 /bin/bash ./master [root@puppet-master-01 tmp]# status master master (pid 18972) is running... Actual results: Postfix LSB script can be tricked into thinking Postfix is running, which may also fool other simple utilities. Expected results: LSB script should identify if Postfix is running or not. Additional info:
Fedora and RHEL6 scripts have the following, easy to backport. lockfile=/var/lock/subsys/$prog pidfile=/var/spool/postfix/pid/master.pid status -p $pidfile -l $(basename $lockfile) master
This request was evaluated by Red Hat Product Management for inclusion in the current release of Red Hat Enterprise Linux. Because the affected component is not scheduled to be updated in the current release, Red Hat is unfortunately unable to address this request at this time. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux.
This request was erroneously denied for the current release of Red Hat Enterprise Linux. The error has been fixed and this request has been re-proposed for the current release.
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux release for currently deployed products. This request is not yet committed for inclusion in a release.
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Prior to this update the postfix init script looked for process named "master" to find out whether the postfix daemon is running. This was not robust soultion, because the script could be tricked by any other process named master which could lead to problems. Now the init script checks for PID which is more robust.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2013-0054.html