通过 postfix 转发邮件时的 SRS/发件人重写

Mik*_*age 15 email postfix

有什么方法可以使用 Postfix 执行 SRS 或类似的操作吗?

当我收到来自 user@example.org 的邮件时,我将它(通过 catchall)转发到 something@gmail.com,但 GMail 正在检查 SPF,并且发现我的服务器无权代表 example.org 发送邮件. 我想将发件人重写为 something@myserver,同时将发件人保留为 user@example.org。

小智 7

以下是从 Timo Röhling安装postrsd的步骤。这些说明似乎适用于许多 Unix 版本,包括 Ubuntu 14.04。

# Debian/Ubuntu preparations:
sudo apt-get install cmake sysv-rc-conf

# download and compile the software:
cd ~
wget https://github.com/roehling/postsrsd/archive/master.zip
unzip master
cd postsrsd-master/
make
sudo make install

# or alternatively install binary from later Ubuntu repositories
sudo apt-get install postsrsd

# Add postfix configuration parameters for postsrsd:
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"

# Add SRS daemon to startup (Red Hat 6/CentOS):
sudo chkconfig postsrsd on
# Add SRS daemon to startup (Debian/Ubuntu):
sudo sysv-rc-conf postsrsd on
# Start SRS daemon:
sudo service postsrsd restart
#Reload postfix:
sudo service postfix reload
Run Code Online (Sandbox Code Playgroud)


Hon*_*Lai 5

这里有一个关于在 Debian 上使用 Postfix 设置 SRS 的 2012 教程:http : //blog.phusion.nl/2012/09/10/mail-in-2012-from-an-admins-perspective/

这是 2013 年的 Ubuntu 教程:http : //www.ameir.net/blog/archives/71-installing-srs-extensions-on-postfix-ubuntudebian.html