结构描述
尝试伪造发件人时会发生什么
mail -s "This is a Subject" -a "From: forged_address@example.net"会导致成功发送邮件观察到的差异
通过增加 postfix'smtpd 的详细程度观察到以下情况
FROM:可接受的值服务器 B 以相同的方式启动,但随后设法更改FROM:标头。这在 postfix smtpd 日志文件中看不到,但在最终发送的邮件中看不到:
Return-Path: <valid_address@example.com>
Delivered-To: herrhannes@example.com
Received: from mail.example.com
by mail.example.com (Dovecot) with LMTP id UuV2IVaP3lvdKAAAEby5rg
for <herrhannes@example.com>; Sun, 04 Nov 2018 07:19:02 +0100
To: herrhannes@example.com
Subject: This is a Subject
From: forged_address@example.com
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 8bit
Message-Id: <20181104061902.15A9F4A9@debian.example.com>
Date: Sun, 4 Nov 2018 07:19:02 +0100 (CET)
Authentication-Results: ORIGINATING;
auth=pass smtp.auth=valid_address@example.com
smtp.mailfrom=valid_address@example.com
body of your email
Run Code Online (Sandbox Code Playgroud)
问题
这是预期的行为,因为 SMTP信封发件人和From:标头是不同的东西。(该reject_sender_login_mismatch版本仅限于经过身份验证的用户)会阻止在 SMTPMAIL FROM命令中使用地址,除非该地址与经过 SASL 身份验证的所有者相匹配。它不关心消息 \xe2\x80\x93 中包含其标头的内容。电子邮件就是这样设计的,而且这种不匹配也有很多合理的原因。
使用时mail -a,您单独修改标题。正如您所建议的那样,之后它不会改变。无法使用 Thunderbird 执行此操作的唯一原因是它在信封和标头中使用相同的地址。它不受您的服务器的限制。
| 归档时间: |
|
| 查看次数: |
1067 次 |
| 最近记录: |