Ubuntu服务器,monit电子邮件,postfix管道

时间:2013-11-29 07:48:56

标签: postfix-mta monit

我有一个特定的设置来管理ubuntu服务器上的传入电子邮件。当电子邮件发送到name@myserver.com时,它们会被过滤并通过管道传输到php脚本 此管道的后缀特定配置如下(简要):

**main.cf:**

...
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination, check_recipient_access hash:/etc/postfix/access
...


**master.cf**

mydestination =  myserver.com, localhost.myserver, localhost
...
smtp      inet  n       -       -       -       -       smtpd
        -o content_filter=myhook:dummy

...
pickup    fifo  n       -       -       60      1       pickup
cleanup   unix  n       -       -       -       0       cleanup
qmgr      fifo  n       -       n       300     1       qmgr
#qmgr     fifo  n       -       -       300     1       oqmgr
tlsmgr    unix  -       -       -       1000?   1       tlsmgr
...

myhook      unix  -       n       n       -       -       pipe
  flags=F user=www-data  null_sender=  argv=//admin/get_mail.php   ${sender} ${size} ${recipient}

**access file:**

name@myserver.com FILTER myhook:dummy

现在,当电子邮件发送到“myserver.com”时,一切正常。过滤消息并触发php脚本。

问题在于服务器上运行的监视服务。 当电子邮件由服务发送并发送到管道php脚本时,monit从myserver.com发送的电子邮件被myhook过滤,而不应该直接发送给收件人...

看起来后缀过滤器设置在这种情况下不起作用。 奇怪的是,发送的电子邮件是来自服务器的其他Web应用程序,并且应该按照应有的方式发送(来自www-data@myserver.com)。

minitrc的具体配置是:

set mailserver localhost
set mail-format { from: monit@myserver.com }
set alert monit@anotherdomain.com

你能帮助我弄清楚monit和postfix之间可能存在什么冲突吗?

谢谢你。

0 个答案:

没有答案
相关问题