linux - 如何对收到的邮件执行 PHP 脚本?

标签 linux centos6 exim dovecot

我的 centos 服务器运行着 Exim 4.87 和 Dovecot 2.2。

如何在收到特定电子邮件地址 myuser@mydomain.com 的新邮件时执行 PHP 脚本? 我在某处读到 Dovecot 的通知插件可以提供帮助,但没有关于如何使用它的文档。

最佳答案

以下是我如何设置一个脚本,以便在收到特定电子邮件地址的新邮件时执行:

MAIN CONFIGURATION SETTINGS 下的 exim.conf:

system_filter = /etc/exim/system_filter.conf

/etc/exim/system_filter.conf:

if $h_to: contains "myuser@myhost.com"
then
   unseen pipe "/usr/local/bin/my_filter.php $message_size"
endif

关于linux - 如何对收到的邮件执行 PHP 脚本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42072929/

相关文章:

linux - 对抗电子邮件服务的暴力攻击

linux - 如何在 Linux 中将更改后的文件上传到网站?

linux - `for f in *; do cp "$f ""$f "_copy; done` 没有 't work because "foo.png_copy”。如何解决?

exim - exim 4.94 中发生了什么变化,更新后行抛出错误

postgreSQL 8.4.20 : How to solve missing oldestXID in pg_control preventing use of pg_upgrade on a legacy CentOS 6. 4 服务器?

python - 无法在centos上安装python新版本2.7.8

email - 别名转发 : "550 mailbox unavailable", 接收和发送工作正常

linux - bash - 获取子进程的 io 统计信息

linux - FTP 用户的权限

c++ - centos上读取下一帧视频时出现Segmentation fault如何解决