2017-05-03 53 views
0

我试图通过我的中继主机将邮件从客户端服务器发送给收件人(我)我想要收到邮件。在中继主机已启用了DKIM签署外发邮件,当我通过mailx的来自客户端的服务器发送邮件给收件人(我自己),这是我在Gmail中看到消息:邮件X更改发送域名DKIM失败

Delivered-To: [email protected] 
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: <[email protected]> 
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 <[email protected]> 
     (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 [email protected] designates XX.XX.XX.XX as permitted sender) client-ip=XX.XX.XX.XX; 
Authentication-Results: mx.google.com; 
     dkim=fail [email protected]; 
     spf=pass (google.com: domain of [email protected] designates XX.XX.XX.XX as permitted sender) [email protected]; 
     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 <[email protected]>; 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: [email protected] 
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: <[email protected]> 
From: User Is Awesome <[email protected]> 

Yas. 

当我送通过Telnet这封电子邮件是我看到:

Delivered-To: [email protected] 
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: <[email protected]> 
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 <[email protected]> 
     (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 [email protected] designates XX.XX.XX.XX as permitted sender) client-ip=XX.XX.XX.XX; 
Authentication-Results: mx.google.com; 
     dkim=pass [email protected]; 
     spf=pass (google.com: domain of [email protected] designates XX.XX.XX.XX as permitted sender) [email protected]; 
     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 <[email protected]>; 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: <[email protected]> 
To: <[email protected]> 
Subject: Test 
Message-Id: <[email protected]> 
Date: Wed, 
    3 May 2017 13:46:06 +0000 (UTC) 

Test 

如果您在远程登录的情况下,消息ID注意消息ID显示中继服务器,这在mailx的消息,它表明从生成该消息的主机。在这两种情况下,从同一台服务器生成的消息。我的问题是我可以在mailx中更改哪些内容,以便它像telnet一样发送邮件并将其作为我的中继主机?或者我需要在postfix等等中改变什么?

回答

0

编辑local_header_writes和通用映射以在签名时更改域。也可以从mailx命令中的邮件发送客户端机器使用-r标志在postifx伪装域中指定并计算它们。