限制pipe理员用户的postqueue访问权限

我在Gentoo上运行postfix作为邮件服务器守护进程。 在调查某些队列堆积的过程中,我发现/usr/sbin/postqueue可以被系统上的所有用户执行,它可以为所有用户愉快地输出当前邮件队列(带-q )。

它看起来像是或多或less的devise: postdroppostqueueset-gid与组postdrop二进制文件。

 -rwx--s--x 1 root postdrop 15K Apr 10 23:49 postdrop -rwx--s--x 1 root postdrop 15K Apr 10 23:49 postqueue 

他们也可以执行otherpostfix似乎需要( postfix check输出):

 postfix/postfix-script: warning: not set-gid or not owner+group+world executable: /usr/sbin/postqueue 

我可能错过了一些内部工作,但据我所见,普通用户不应该有权访问队列,特别是因为在这个configuration中,所有的地址和域都是虚拟的(通过数据库)。 如果用户定期轮询postqueue ,他可以组装一个<from>,<to>地址对的列表( postcat被限制,用户不能访问邮件的内容)。

exim有一个名为queue_list_requires_admin的configuration选项,但是我找不到像postfix这样的东西。 是否有可能限制队列访问与后缀

Postfix不使用Unix权限function来限制对postqueue访问。 相反,它使用像'authorized_mailq_users'

authorized_mailq_users(静态:任何人)

有权查看队列的用户列表。

所以,如果你想限制到特定的用户,例如:root,你可以使用

 authorized_mailq_users = static:root 

欲了解更多信息,请参阅man 1 postqueue