
奇妙な状況があります:
- ESMTPヘッダーを含むメールを受信します
- 私たちのサーバーはそれを受け入れます、問題ありません
- 他のメールと同じように、そのメールをGmailにインポートします
- GmailはSPFチェックを行うが失敗する
- Gmail では、そのチェックを行うために、サーバーの IP アドレスとメール送信者のドメインを使用します (sic!)
ローカル ボックス間のメールでも同様の問題が発生しています (ただし、Gmail ではサーバー ドメインとクライアントの IP が使用されます)。あるローカル ボックスから別のローカル ボックスへ SMTP 経由で送信されたときに、メッセージにサーバーの IP ではなくクライアントの IP が含まれているため、Gmail にインポートされたメールの SPF が失敗しました。
例:
Received-SPF: fail (google.com: domain of [email protected] does not designate 188.40.153.39 as permitted sender) client-ip=188.40.153.39;
Authentication-Results: mx.google.com;
spf=fail (google.com: domain of [email protected] does not designate 188.40.153.39 as permitted sender) [email protected]
その他のヘッダー:
Delivered-To: [email protected]
Received: by 10.194.168.164 with SMTP id zx4csp522020wjb;
Thu, 19 Feb 2015 06:26:04 -0800 (PST)
X-Received: by 10.180.219.66 with SMTP id pm2mr10333511wic.91.1424355964017;
Thu, 19 Feb 2015 06:26:04 -0800 (PST)
Return-Path: <[email protected]>
Received: from server.webvizarts.com (server.webvizarts.com . [188.40.153.39])
by mx.google.com with ESMTPS id ge6si41332059wjd.24.2015.02.19.06.26.03
for <[email protected]>
(version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
Thu, 19 Feb 2015 06:26:04 -0800 (PST)
Received-SPF: fail (google.com: domain of [email protected] does not designate 188.40.153.39 as permitted sender) client-ip=188.40.153.39;
Authentication-Results: mx.google.com;
spf=fail (google.com: domain of [email protected] does not designate 188.40.153.39 as permitted sender) [email protected]
Received: from mx.msit.gov.pl ([77.252.152.34])
by server.webvizarts.com with esmtp (Exim 4.83)
(envelope-from <[email protected]>)
id 1YOS3G-0003eP-T2
for [email protected]; Thu, 19 Feb 2015 15:26:03 +0100
Received: from msit.gov.pl (unknown [192.168.10.30])
by mx.msit.gov.pl (Postfix) with ESMTPS id 5BE2F3B64
for <[email protected]>; Thu, 19 Feb 2015 15:24:48 +0100 (CET)
Received: from EX3.sport.local (192.168.10.30) by EX3.sport.local
(192.168.10.30) with Microsoft SMTP Server (TLS) id 15.0.1044.25; Thu, 19 Feb
2015 15:22:45 +0100
Received: from EX3.sport.local ([fe80::b8ed:df29:c87:77d2]) by EX3.sport.local
([fe80::b8ed:df29:c87:77d2%15]) with mapi id 15.00.1044.021; Thu, 19 Feb 2015
15:22:45 +0100
From: John Smith <[email protected]>
To: Christopher Smith <[email protected]>
Subject: Re: Some sensitive subject
Thread-Topic: Some sensitive subject
X-MS-Has-Attach: yes
X-MS-TNEF-Correlator:
x-ms-exchange-transport-fromentityheader: Hosted
x-originating-ip: [192.168.0.102]
タイトル、メールボックス名、人名が隠されています。
Debian ベースの VPS に dovecot+exim があります。
これを回避する方法を探しています。Gmail 側の実装に欠陥があるのでしょうか、それとも何か対処できるのでしょうか?
編集:コメントによると、転送が誤ってインポートと解釈されているようです
答え1
[...]
私たちは、他のメールと同じように、そのメールをメールボックスから Gmail にインポートします
[...]
それは間違っています。メール ヘッダーには次のように異なる内容が記載されています。
Received: from server.webvizarts.com (server.webvizarts.com . [188.40.153.39])
by mx.google.com with ESMTPS id ge6si41332059wjd.24.2015.02.19.06.26.03
for <[email protected]>
(version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
Thu, 19 Feb 2015 06:26:04 -0800 (PST)
電子メールは から に転送されますserver.webvizarts.com
。mx.google.com
どうやら[email protected]
、envelope-from を設定していないようです:
Authentication-Results: mx.google.com;
spf=fail (google.com: domain of [email protected] does not designate 188.40.153.39 as permitted sender) [email protected]
明らかに封筒の差出人はまだ です[email protected]
。
ここでは 3 つの選択肢が考えられます。
- 封筒の送信元を書き換える送信者書き換えスキーム例えばpostfix-srsd。
- 送信/中継する前に、Gmailで認証してください
- サーバーから Gmail の IMAP/POP3 メールボックスにメールをプッシュするか、Gmail でサーバーからメールをプルするか (どちらが簡単かはわかりません)