我在 Debian 上运行了 Exim4,用于接收来自其他受 CloudFlare 保护的服务器的事务性电子邮件。从它发送的每封事务性电子邮件都有一个发件人的 IP 地址 (1.2.3.4) 和一个 SMTP 用户名 ([电子邮件保护]) 在邮件标题中,我想隐藏或替换它们:
Received: from CF-protected-domain.com ([1.2.3.4])
by mailserver.com with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92)
(envelope-from <[email protected]>) id 1kL3QG-0000Ew-9p for [email protected];
Wed, 23 Sep 2020 14:58:56 +0300
Date: Wed, 23 Sep 2020 07:58:54 -0400
From: "#Site name" <[email protected]>
我是否可以删除或用邮件服务器的 IP 地址(例如 7.8.9.0)替换 IP 地址(1.2.3.4)?并将信封发件人替换为“发件人:”电子邮件地址([电子邮件保护])? 像这样:
Received: from CF-protected-domain.com ([7.8.9.0])
by mailserver.com with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92)
(envelope-from <[email protected]>) id 1kL3QG-0000Ew-9p for [email protected];
Wed, 23 Sep 2020 14:58:56 +0300
Date: Wed, 23 Sep 2020 07:58:54 -0400
From: "#Site name" <[email protected]>
答案1
我已成功Received
通过添加以下内容删除标题/etc/exim4/exim4.conf.localmacros
:
REMOTE_SMTP_TRANSPORTS_HEADERS_REMOVE = Received
通过此设置,Exim4 不再向收件人泄露我的 IP 地址。