2017-05-03 34 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僞裝域中指定並計算它們。