邮件X更改发送域DKIM失败

时间:2017-05-03 18:27:03

标签: email post

我正在尝试通过我的中继主机向客户端服务器发送邮件给收件人(我自己)我希望收到邮件。在relayhost上我启用了DKIM来签署外发邮件,当我通过mailx将邮件从客户端服务器发送给收件人(我自己)时,这是我在gmail中看到的消息:

Delivered-To: user@test.com
Received: by 10.100.177.142 with SMTP id j14csp2053888pjb;
        Tue, 2 May 2017 13:50:42 -0700 (PDT)
X-Received: by 10.55.134.2 with SMTP id i2mr27389384qkd.43.1493758242648;
        Tue, 02 May 2017 13:50:42 -0700 (PDT)
Return-Path: <user@mpx.test.com>
Received: from mex1.mpx.test.com (ec2-XX-XX-XX-XX.compute-1.amazonaws.com. [XX.XX.XX.XX])
        by mx.google.com with ESMTPS id 54si18140615qtv.179.2017.05.02.13.50.42
        for <user@test.com>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Tue, 02 May 2017 13:50:42 -0700 (PDT)
Received-SPF: pass (google.com: domain of user@mpx.test.com designates XX.XX.XX.XX as permitted sender) client-ip=XX.XX.XX.XX;
Authentication-Results: mx.google.com;
       dkim=fail header.i=@mpx.test.com;
       spf=pass (google.com: domain of user@mpx.test.com designates XX.XX.XX.XX as permitted sender) smtp.mailfrom=user@mpx.test.com;
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=test.com
Received: from mongobkp3.prod.ec2.test.local (mongob.test.local [XX.XX.XX.XX]) by mex1.mpx.test.com (Postfix) with ESMTP id 44942611C7 for <user@test.com>; Tue,
  2 May 2017 20:50:42 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mpx.test.com; s=ggmx2; t=1493758242; bh=3VXQqSI3TifRPzriUPH4q0lpgRebD6P3c0kkEvLMTp0=; h=Date:To:Subject:MIME-Version:Content-Type:
     Content-Transfer-Encoding:Message-Id:From; b=N2mX5xGHWXkO/6AkBCL7V9Ugue3EF7z4FFJmOvtD86yzyqZztJU1biL9R1pZf2iuh
     TMb4joXJZVUXB+rwajy2vLLcWzL7zdk/2os5uNqBS75UgMy3p28vev8tuHPkZ2L+6a
     +9uyIQ+BtTXl1utlqMWyUINDUz5y8jugp/EKVAC4=
Received: by mongobkp3.prod.ec2.test.local (Postfix, from userid 1085) id 40ED541C8D; Tue,
  2 May 2017 20:50:42 +0000 (GMT)
Date: Tue, 02 May 2017 20:50:42 +0000
To: user@test.com
Subject: Yas
User-Agent: Heirloom mailx 12.4 7/29/08
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-Id: <20170502205042.40ED541C8D@mongo.test.local>
From: User Is Awesome <user@mpx.test.com>

Yas.

当我通过Telnet发送电子邮件时,这就是我所看到的:

Delivered-To: user@test.com
Received: by 10.100.177.142 with SMTP id j14csp86725pjb;
        Wed, 3 May 2017 06:46:37 -0700 (PDT)
X-Received: by 10.55.7.18 with SMTP id 18mr2837811qkh.272.1493819197454;
        Wed, 03 May 2017 06:46:37 -0700 (PDT)
Return-Path: <user@mpx.test.com>
Received: from mex1.mpx.test.com (ec2-XX-XX-XX-XX.compute-1.amazonaws.com. [XX.XX.XX.XX])
        by mx.google.com with ESMTPS id s14si19801592qtb.69.2017.05.03.06.46.37
        for <user@test.com>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Wed, 03 May 2017 06:46:37 -0700 (PDT)
Received-SPF: pass (google.com: domain of user@mpx.test.com designates XX.XX.XX.XX as permitted sender) client-ip=XX.XX.XX.XX;
Authentication-Results: mx.google.com;
       dkim=pass header.i=@mpx.test.com;
       spf=pass (google.com: domain of user@mpx.test.com designates XX.XX.XX.XX as permitted sender) smtp.mailfrom=user@mpx.test.com;
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=test.com
Received: from mex1.mpx.test.com (mongobkp3.prod.ec2.test.local [XX.XX.XX.XX]) by mex1.mpx.test.com (Postfix) with ESMTP id 5595B61135 for <user@test.com>; Wed,
  3 May 2017 13:46:06 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mpx.test.com; s=ggmx2; t=1493819197; bh=fdkeB/A0FkbVP2k4J4pNPoeWH6vqBm9+b0C3OY87Cw8=; h=From:To:Subject:Message-Id:Date; b=TWvjEk3INAcLa9INdkzTvUihEbMQz5ri95AkG3tP9CiVqvhspMn5rfqXK5PrdzQgp
     hd67/rtKwnoh7DtShOmriMHIiS46zi+6btvOigx631Zfdhkakz+UdTg55IH47mn+JG
     BpPhTT7sBNvnwsWIYeQ8UxlyLGEzIsXRyMZm2UWU=
From: <user@mpx.test.com>
To: <user@test.com>
Subject: Test
Message-Id: <20170503134613.5595B61135@mex1.mpx.test.com>
Date: Wed,
  3 May 2017 13:46:06 +0000 (UTC)

Test

如果您在Telnet的情况下在消息ID中注意到消息ID显示中继服务器,则在mailx消息中它显示该消息生成的主机。在这两种情况下,消息都是从同一服务器生成的。我的问题是我可以在mailx中更改什么,以便它像telnet一样,并将消息作为我的relayhost发送?或者我需要在postfix中改变什么等等?

1 个答案:

答案 0 :(得分:0)

编辑local_header_writes和通用映射以在签名时更改域。同样来自mailx命令中的邮件发送客户端计算机,使用-r标志来指定和计算postifx伪装域中的内容。