加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

linux – 如何更改Postfix中的Envelope?

发布时间:2020-12-13 17:56:17 所属栏目:Linux 来源:网络整理
导读:使用Postfix通过Amazon SES发送邮件的 Linux服务器.从Wordpress发送电子邮件时,由于信封地址不正确,电子邮件将被拒绝. 如何配置Postfix以始终将myemail@mydomain.com用作Envelope From地址? 我正在寻找我可以配置的默认属性,而不是基于代码的解决方案. 解决
使用Postfix通过Amazon SES发送邮件的 Linux服务器.从Wordpress发送电子邮件时,由于信封地址不正确,电子邮件将被拒绝.

如何配置Postfix以始终将myemail@mydomain.com用作Envelope From地址?

我正在寻找我可以配置的默认属性,而不是基于代码的解决方案.

解决方法

将以下内容放在/ etc / postfix / canonical中:
# Use the empty regexp to map *any* address to the desired envelope sender.
// my-fixed-envelope-sender@example.org

将以下内容附加到/etc/postfix/main.cf:

canonical_maps = regexp:/etc/postfix/canonical
canonical_classes = envelope_sender

重新加载Postfix:

postfix reload

请注意,这只会重写信封发件人(按要求),而不是“发件人:”标题.此外,如果您在接收来自外部世界的邮件的主机上设置此项,则可能会发生严重破坏.

有关详细信息,请参阅canonical(5)和canonical_maps和canonical_classes选项的文档.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读