主题: 将收到的邮件转发到其它程序处理的错误
各位技术支持大哥,大家好
有个问题希望能得到帮助。
目的:我想把收到邮件转到了某个程序(/home/sites/test/cron.sh)进行处理,我按照下面的FAQ,进行配置。
http://iredmail.org/wiki/index.php?titl … nal.Script
具体配置如下:
1. 在master.cf增加了下面两句:
external-pipe unix - n n - - pipe
flags=DRhu user=vmail:vmail argv=/home/sites/test/cron.sh -f ${sender} -d ${user}@${domain} -m ${extension}
2. 新建/home/sites/test/cron.sh文件,这个文件内容如下:
#!/bin/sh
/usr/bin/lynx -source http://*******.jp/test.php
3. 在数据库vmail的数据表mailbox的transport列修改为:external-pipe
重启postfix后测试收取邮件,出现了fatal: pipe_command: execvp /home/sites/test/cron: No such file or directory的错误。
具体错误日志如下:
Dec 20 18:09:25 ailen postfix/smtpd[17947]: connect from localhost[127.0.0.1]
Dec 20 18:09:25 ailen postfix/trivial-rewrite[17937]: warning: do not list domain ailen.biz in BOTH mydestination and virtual_mailbox_domains
Dec 20 18:09:25 ailen postfix/smtpd[17947]: 1E18F1C0D27: client=localhost[127.0.0.1]
Dec 20 18:09:25 ailen postfix/cleanup[17940]: 1E18F1C0D27: message-id=<808499.91574.qm@web100405.mail.kks.yahoo.com>
Dec 20 18:09:25 ailen postfix/qmgr[17916]: 1E18F1C0D27: from=<sh**wa@yahoo.com>, size=4105, nrcpt=1 (queue active)
Dec 20 18:09:25 ailen pipe[17948]: fatal: pipe_command: execvp /home/sites/test/cron: No such file or directory
Dec 20 18:09:25 ailen postfix/smtpd[17947]: disconnect from localhost[127.0.0.1]
Dec 20 18:09:25 ailen amavis[2773]: (02773-06) Passed CLEAN, LOCAL [183.79.28.107] [219.117.204.168] <sh**wa@yahoo.com> -> <info@ailen.biz>, Message-ID: <808499.91574.qm@web100405.mail.kks.yahoo.com>, mail_id: WF35-hkzWBjQ, Hits: -6.66, size: 3458, queued_as: 1E18F1C0D27, dkim_id=@yahoo.com,sh**wa@yahoo.com, 1575 ms
Dec 20 18:09:25 ailen postfix/pipe[17919]: 1E18F1C0D27: to=<info@ailen.biz>, relay=external-pipe, delay=0.04, delays=0.02/0/0/0.02, dsn=4.3.0, status=deferred (temporary failure. Command output: pipe: fatal: pipe_command: execvp /home/sites/test/cron: No such file or directory )
Dec 20 18:09:25 ailen postfix/smtp[17944]: 6B2FE1C0CDB: to=<info@ailen.biz>, relay=127.0.0.1[127.0.0.1]:10024, delay=1.8, delays=0.18/0/0/1.6, dsn=2.0.0, status=sent (250 2.0.0 from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 1E18F1C0D27)
Dec 20 18:09:25 ailen postfix/qmgr[17916]: 6B2FE1C0CDB: removed