Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 431222 - mail-mta/postfix-2.9.3 makes init script status() function root-only
Summary: mail-mta/postfix-2.9.3 makes init script status() function root-only
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Net-Mail Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-13 13:21 UTC by Dirkjan Ochtman (RETIRED)
Modified: 2012-08-14 05:47 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirkjan Ochtman (RETIRED) gentoo-dev 2012-08-13 13:21:42 UTC
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.
Comment 1 Eray Aslan gentoo-dev 2012-08-13 15:22:45 UTC
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.
Comment 2 Dirkjan Ochtman (RETIRED) gentoo-dev 2012-08-13 15:27:26 UTC
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.
Comment 3 Eray Aslan gentoo-dev 2012-08-14 05:47:28 UTC
(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.