电子邮件未传送到 hotmail,以及额外 headers

Email not delivering to hotmail, and extra headers

我正在设置一个 e-mail 服务器,但在尝试修改 header 并将其发送到 e-mail hotmail 时遇到了困难。

这是来自 mail-tester.com 的完整 header:

Received: by mail-tester.com (Postfix, from userid 500)
    id EBF72A56C8; Tue, 20 Mar 2018 22:12:50 +0100 (CET)
Authentication-Results: mail-tester.com;
    dkim=pass (1024-bit key; unprotected) header.d=example.com header.i=@example.com header.b=CktBFAHr;
    dkim-atps=neutral
X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail-tester.com
X-Spam-Level: 
X-Spam-Status: No/-0.1/5.0
X-Spam-Test-Scores: DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,
    SPF_PASS=-0.001,T_RP_MATCHES_RCVD=-0.01
X-Spam-Last-External-IP: XXX.XX.X.XXX
X-Spam-Last-External-HELO: mail.example.com
X-Spam-Last-External-rDNS: mail.example.com
X-Spam-Date-of-Scan: Tue, 20 Mar 2018 22:12:50 +0100
X-Spam-Report: 
    * -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay
    *      domain
    * -0.0 SPF_PASS SPF: sender matches SPF record
    * -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's
    *       domain
    * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
    *  0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily
    *      valid
Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=XXX.XX.X.XXX; helo=mail.example.com; envelope-from=diana@example.com; receiver=someid@mail-tester.com 
DMARC-Filter: OpenDMARC Filter v1.3.1 mail-tester.com 8D270A56BF
Authentication-Results: mail-tester.com; dmarc=pass header.from=example.com
Authentication-Results: mail-tester.com;
    dkim=pass (1024-bit key; unprotected) header.d=example.com header.i=@example.com header.b=CktBFAHr;
    dkim-atps=neutral
Received: from mail.example.com (mail.example.com [XXX.XX.X.XXX])
    (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
    (No client certificate requested)
    by mail-tester.com (Postfix) with ESMTPS id 8D270A56BF
    for <someid@mail-tester.com>; Tue, 20 Mar 2018 22:12:49 +0100 (CET)
Authentication-Results: mail.example.com (amavisd-new);
    dkim=pass (1024-bit key) reason="pass (just generated, assumed good)"
    header.d=example.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=
    example.com; h=date:date:message-id:from:from:subject
    :subject:to:mime-version:content-type:content-type; s=dkim; t=
    1521580077; x=1522444078; bh=TlT4DDWYdTBodPmtN0k/UUjJKsfuwGfVa+p
    3RfS7B2o=; b=CktBFAHrWBH8zJY5d/A5VxiAYybD2hX5O+u6tJ6I7itc+QAeFyo
    9a1cQjFvhw6PyftRVM/eAwAd6ns4pejY5fubMSFl29SUosqV1nXVmxr8xzV0RBTP
    /L0o6gpSWAgYGzV++qw5QIRlwA0VCqNGD/wrUoZybijvp9QHgwYx6FPg=
X-Virus-Scanned: Debian amavisd-new at 
Content-Type: multipart/mixed; boundary="===============7137656464834900843=="
MIME-Version: 1.0
To: someid@mail-tester.com
Subject: The e-mail subject
From: Princess Diana <diana@example.com>
Message-Id: <20180320210757.24D3E50C0FC9@mail.example.com>
Date: Tue, 20 Mar 2018 17:07:57 -0400 (EDT)

--===============7137656464834900843==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit

Just a small test....
--===============7137656464834900843==--

现在,一切都设置好了,DKIM、SPF 和 DMARC。

我正在尝试删除转发客户端 IP 的 X-Spam-Last-External-IP: XXX.XX.X.XXX header,并以某种方式修改 Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=XXX.XX.X.XXX; helo=mail.example.com; envelope-from=diana@example.com; receiver=someid@mail-tester.com,它也将客户端 IP 转发给每个已发送的 e-mail。 我没有成功删除第一个 header 或修改第二个。 此外,e-mail 永远不会进入 Hotmail 邮箱,甚至从 RoundCube 也不会,并且 mail.log 文件显示成功排队等待发送邮件。我做错了什么?

当通过 SMTP 连接时,大多数服务器会添加 Received: header 以及相关详细信息。这是电子邮件信誉生态系统的重要组成部分,因为它意味着发送 IP 必须对其发送负责 activity。

如果您使用的电子邮件中继可能会将显示的地址向下移动一个链条,或者您可以选择使用 API-driven 电子邮件服务,因为您的应用程序与邮件服务。在这些情况下,显示的 IP 几乎总是您正在使用的邮件服务,而不是您自己的系统,为您提供一层隔离和安全。