원본 이메일이 ESMTP 헤더와 함께 전송된 경우 사서함에서 IMAP을 통해 메일을 가져올 때 Gmail SPF 확인에 실패했습니다.

원본 이메일이 ESMTP 헤더와 함께 전송된 경우 사서함에서 IMAP을 통해 메일을 가져올 때 Gmail SPF 확인에 실패했습니다.

이상한 상황이 발생했습니다.

  • ESMTP 헤더가 포함된 이메일을 받았습니다.
  • 우리 서버가 그것을 받아들입니다. 괜찮습니다
  • 우리는 상자에 있는 다른 이메일과 마찬가지로 해당 메일을 Gmail로 가져옵니다.
  • Gmail에서 SPF 검사를 수행하지만 실패합니다.
  • Gmail은 서버 IP 주소와 메일 발신자 도메인을 사용하여 확인합니다(sic!).

또한 로컬 박스 간의 메일에도 비슷한 문제가 있습니다(그러나 Gmail은 서버 도메인과 클라이언트 IP를 사용합니다).한 로컬 상자에서 다른 상자로 SMTP를 통해 전송될 때 메시지의 서버 대신 클라이언트 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.commx.google.com의해 전달됩니다 [email protected]. 분명히 봉투를 설정하지 않은 것 같습니다.

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]

분명히 봉투의 from은 여전히 ​​입니다 [email protected].

여기에는 세 가지 옵션이 있습니다.

  1. 다음을 사용하여 봉투를 다시 작성합니다.발신자 재작성 방식예를 들어접미사-srsd.
  2. 보내기/중계하기 전에 Gmail에서 인증하세요.
  3. 이메일을 서버에서 Gmail의 IMAP/POP3 편지함으로 푸시하거나 Gmail을 통해 서버에서 가져오도록 허용하세요(어느 것이 더 쉬운지는 모르겠습니다).

관련 정보