With 2.9.3, /usr/sbin/postfix status dies: djc@huygens postfix $ /etc/init.d/postfix status * postfix: error: to submit mail, use the Postfix sendmail command postfix: fatal: the postfix command is reserved for the superuser [ !! ] This used to work in 2.8.x.
Yes, known regression but this is a more robust implementation that gives the correct answer all the time whereas the previous version gave the correct answer some of the time. Bad use case was: * write a bad/nonsensical setting in main.cf * /etc/init.d/postfix start * postfix/master daemon starts up and the init script returns successfully * master daemon starts other postfix daemons as necessary * daemon sees the bad setting and master daemon throttles the mail system * server stops sending/receiving/picking up/whatever mail * /etc/init.d/postfix status still gives started positive response Unless I am missing something, I would like to keep it as it is.
Well, is there no non-root way of querying postfix for this state? That seems like something that should be remedied upstream... We're using this for a monitoring setup (zabbix, in my case), which seems common enough. Also, your solution flies in the face of the init script status function being user-executable for most (if maybe not all) init scripts, so you're violating implicit assumptions.
(In reply to comment #2) > Well, is there no non-root way of querying postfix for this state? No, not in any sane way afaik. > That seems like something that should be remedied upstream... I'll see what I can do. > We're using this > for a monitoring setup (zabbix, in my case), which seems common enough. Please note that you can't trust the output of the previous version. "It works most of the time" is not good enough.