php - 使用 Postfix 传输电子邮件

标签 php email pipe postfix-mta

我正在尝试为特定电子邮件地址设置管道。我正在关注我所看到的here ,但在 newaliases 之后,我得到以下信息:

postalias: warning: /etc/postfix/aliases, line 1: name must be local

我的/etc/postfix/aliases:

pipe@example.com: "| /usr/bin/php -q /home/path/to/file/pipe.php"

当我尝试发送电子邮件时,它返回可交付结果。我做错了什么?

最佳答案

来自后缀 aliases(5) man page :

  o    An alias definition has the form
            name: value1, value2, ...

The name is a local address (no domain part). Use double quotes when the name contains any special characters such as whitespace, #',:', or `@'. The name is folded to lowercase, in order to make database lookups case insensitive.

要转发任意域地址的电子邮件,请阅读 virtual(5)相反。

关于php - 使用 Postfix 传输电子邮件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11526706/

相关文章:

php - 将子目录中的 JSON 索引文件重定向到 PHP Controller

php - 遍历 $_POST 变量

php - 从 Tinyint 中检索并转换为 html 中的文本

html - mailto HTML 最佳实践

angular - 可选的异步管道或默认

linux - 将数据管道传输到需要 TTY(终端)的 Linux 程序

linux - 无法让 php mail() 在 linux ubuntu 上工作

使用 Bamboo 而不是凤凰的电子邮件模板

php - 如何处理群发邮件

C - 不使用 popen 的管道