Postfix + procmail – 传递失败,因为“无法创build用户输出文件” – 在CentOS 6.2上

我证实我的后缀安装/中继设置工作。 现在我遇到了procmail问题。 我用下面的命令把它连接到postfix

mailbox_command = /usr/bin/procmail -f -a "$USER" 

我没有在我的procmailconfiguration,但以下内容:

 LOGFILE=/var/procmailrc/log 

我发送一封电子邮件给以前工作的收件人(在我附加procmail之前)。 现在它失败,错误:

 Apr 6 14:07:05 localhost postfix/qmgr[15194]: D0C3DFF6E1: from=<[email protected]>, size=938, nrcpt=1 (queue active) Apr 6 14:07:05 localhost postfix/local[1953]: D0C3DFF6E1: to=<[email protected]>, orig_to=<postmaster>, relay=local, delay=0.05, delays=0.02/0.01/0/0.02, dsn=5.2.0, status=bounced (can't create user output file. Command output: procmail: Couldn't create "/var/spool/mail/nobody" procmail: Couldn't read "//root" ) Apr 6 14:07:05 localhost postfix/bounce[1955]: warning: D0C3DFF6E1: undeliverable postmaster notification discarded Apr 6 14:07:05 localhost postfix/qmgr[15194]: D0C3DFF6E1: removed 

似乎有某种权限问题,但我不知道问题是什么,也不知道如何进一步诊断。 我指定的日志文件是空的,顺便说一下。

我如何使procmail + postfix的工作?

我只是进入相同的,find答案

 $ sudo chmod g+s /usr/bin/procmail 

答案是在
http://www.irbs.net/internet/postfix/0202/1677.html

用户很可能没有写入/var/procmailrc权限。

如果你真的坚持把所有交付的中央logging下来,你可能需要在logger(8)或本地等价物上进行某种安排来运行Procmail。

它看起来像后缀没有传递名称procmail,或发送任何人(但我会说第一个更有可能)。 如果您的用户是虚拟的,则需要以特定的方式设置procmail,如果用户是实际的系统用户,则应该以不同的方式configurationprocmail。