我需要在本地主机上configurationpostfix作为中继到smtp服务器。 这个外部smtp服务器要求From:标题与authentication的用户名一致。 我想修复源于本地计算机的所有消息的From:头部,以表示[email protected]
我尝试了以下内容:
sender_canonical_maps问题是:它似乎是覆盖Reply-To:头,我不需要这个,相反,我想广泛使用它。 我如何检查这个:
sender_canonical_maps = regexp:/etc/postfix/sender_canonical REPLYTO="[email protected]" mail [email protected] Reply-To至[email protected] VS:
sender_canonical_maps REPLYTO="[email protected]" mail -r [email protected] [email protected] Reply-To 问题是没有-r [email protected]这是行不通的。
header_checks :显然不适用于From:字段( http://www.postfix.org/header_checks.5.html请参阅Bugs:部分) 我怎样才能简单地强制所有外发邮件上的From:标题,但离开Reply-To:为本地用户指定?
当postfix通过smtp继电器时强制发件人地址
/etc/postfix/main.cf文件:
smtp_header_checks = regexp:/etc/postfix/header_check
/等/后缀/ header_check:
/From:.*/ REPLACE From: [email protected]
经testing:
mail -s test -a 'Reply-To: [email protected]' [email protected] <<< test
客户端头:
From: [email protected] Reply-To: [email protected] To: <[email protected]>
在syslog中,你可以看到
Nov 1 17:20:50 huuu postfix/smtp[4716]: 1B65481FAB18: replace: header From: root@huuu (root): From: [email protected]
查看“传出SMTP邮件的通用映射”: http : //www.postfix.org/ADDRESS_REWRITING_README.html
石榴石。 R.