电子邮件无法发送到Hotmail和额外的标头

时间:2018-03-20 22:13:25

标签: linux email smtp sendmail postfix

我正在设置一个电子邮件服务器,并且很难尝试修改标头,并将其发送到电子邮件hotmail。

以下是来自mail-tester.com的完整标题:

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标头,并以某种方式修改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转发给每个发送的电子邮件。 我没有成功删除第一个标题或修改第二个标题。 此外,电子邮件永远不会进入Hotmail邮箱,甚至不会进入RoundCube,mail.log文件显示成功排队等待传递邮件。我做错了什么?

1 个答案:

答案 0 :(得分:1)

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

如果您使用的电子邮件中继可能会将显示的地址向下移动一步,或者您可以选择使用API​​驱动的电子邮件服务,即应用程序和邮件服务之间没有直接的SMTP连接。在这些情况下,显示的IP几乎总是您正在使用的邮件服务,而不是您自己的系统,为您提供了一层分离和安全。