我正在尝试配置后缀作为转发Gmail。我已成功配置虚拟别名对于我托管的域名以及我想重定向的域名,但 Gmail发件人策略框架 (SPF)验证失败,原因是:
Delivered-To: [email protected]
Received: by 10.25.28.147 with SMTP id c141csp88155lfc;
Sat, 11 Oct 2014 09:08:40 -0700 (PDT)
X-Received: by 10.224.70.83 with SMTP id c19mr21300511qaj.66.1413043720159;
Sat, 11 Oct 2014 09:08:40 -0700 (PDT)
Return-Path: <[email protected]>
Received: from mail1.mycompany.com (mail1.mycompany.com. [2604:xxxxxxx:b5c8])
by mx.google.com with ESMTP id d63si16549011qgd.80.2014.10.11.09.08.39
for <[email protected]>;
Sat, 11 Oct 2014 09:08:40 -0700 (PDT)
Received-SPF: softfail (google.com: domain of transitioning [email protected] does not designate 2604:xxxxxxx:b5c8 as permitted sender) client-ip=2604:180:2:2cf::b5c
我认为问题出在返回路径上。当使用其他托管商进行电子邮件转发时(例如便宜的名字) 会自动重写为:
Return-Path: <SRS0+BJjl=7C=gmail.com=realsender@eforward3e.registrar-servers.com>
有没有办法在 postfix 中执行这样的重写?谢谢
答案1
我按照以下指南使用 postsrsd 修复了这个问题:https://www.mind-it.info/forward-postfix-spf-srs/
简而言之:
下载并编译软件
cd ~
wget https://github.com/roehling/postsrsd/archive/master.zip
unzip master
cd postsrsd-master/
make
sudo make install
为 postsrsd 添加 postfix 配置参数
sudo postconf -e "sender_canonical_maps = tcp:127.0.0.1:10001"
sudo postconf -e "sender_canonical_classes = envelope_sender"
sudo postconf -e "recipient_canonical_maps = tcp:127.0.0.1:10002"
sudo postconf -e "recipient_canonical_classes = envelope_recipient"
将 SRS 守护程序添加到启动
sudo chkconfig postsrsd on
# Start SRS daemon
sudo service postsrsd restart
#Reload postfix
sudo service postfix reload
https://github.com/roehling/postsrsd2023 年仍然保持,其中提到README.rst
如果您的 Linux 发行版有足够新的 PostSRSd 包,请安装它!除非您需要新版本中的特定新功能或错误修复,否则维护负担会小得多。