当中继 = 127.0.0.1 时发送邮件会给我 550-5.7.1 (gmail)

当中继 = 127.0.0.1 时发送邮件会给我 550-5.7.1 (gmail)

当使用 Web UI(例如 roundcube)发送电子邮件并且我的中继是 =127.0.0.1 时,我收到此错误

主机 gmail-smtp-in.l.google.com[64.233.184.27] 说:550-5.7.1 [193.198.1.11 12] 我们的系统检测到此邮件可能是未经请求的邮件。为了减少发送到 Gmail 的垃圾邮件数量,550-5.7.1 此邮件已被屏蔽。请访问 550-5.7.1

摘自 /var/log/mail.log

Sep 14 21:28:06 mail postfix/qmgr[2915]: BB7418551: from=<[email protected]>, size=1082, nrcpt=1 (queue active)
Sep 14 21:28:07 mail amavis[2978]: (02978-01) Passed CLEAN {RelayedOpenRelay}, [193.198.1.11]:43798 [193.198.1.11] <[email protected]> -> <[email protected]>, Queue-ID: C953F422, Message-ID: <[email protected]>, mail_id: 15_o4VKBS9UP, Hits: -7.293, size: 700, queued_as: BB7418551, 3127 ms
Sep 14 21:28:07 mail postfix/smtp[3045]: C953F422: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=3.4, delays=0.17/0.05/0.04/3.1, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as BB7418551)
Sep 14 21:28:07 mail postfix/qmgr[2915]: C953F422: removed
Sep 14 21:28:07 mail postfix/smtpd[3021]: disconnect from mail.gkri.hr[193.198.1.11]
Sep 14 21:28:07 mail dovecot: imap([email protected]): Disconnected: Logged out in=605 out=520
Sep 14 21:28:07 mail postfix/smtpd[3004]: rewrite stream disconnect
Sep 14 21:28:07 mail postfix/smtp[3052]: BB7418551: to=<[email protected]>, relay=gmail-smtp-in.l.google.com[64.233.184.27]:25, delay=0.73, delays=0.19/0.06/0.34/0.15, dsn=5.7.1, status=bounced (host gmail-smtp-in.l.google.com[64.233.184.27] said: 550-5.7.1 [193.198.1.11      12] Our system has detected that this message is 550-5.7.1 likely unsolicited mail. To reduce the amount of spam sent to Gmail, 550-5.7.1 this message has been blocked. Please visit 550-5.7.1  https://support.google.com/mail/?p=UnsolicitedMessageError 550 5.7.1  for more information. qe3si5844139wjc.196 - gsmtp (in reply to end of DATA command))
Sep 14 21:28:07 mail postfix/cleanup[3043]: 954E88552: message-id=<[email protected]>
Sep 14 21:28:07 mail postfix/bounce[3053]: BB7418551: sender non-delivery notification: 954E88552

从电子邮件客户端应用程序(Android)发送时,我能够发送我的状态,并且没有看到任何错误(电子邮件直接通过)

状态=已发送 250 2.0.0 确定

Sep 14 21:37:04 mail postfix/qmgr[2915]: BE59C8551: from=<[email protected]>, size=1893, nrcpt=1 (queue active)
Sep 14 21:37:04 mail postfix/smtpd[3179]: disconnect from localhost[127.0.0.1]
Sep 14 21:37:04 mail amavis[2978]: (02978-04) Passed CLEAN {RelayedOpenRelay}, [89.172.131.36]:56139 [89.172.131.36] <[email protected]> -> <[email protected]>, Queue-ID: 0C126422, mail_id: 0O_1VMAZ9_sa, Hits: -3.523, size: 1511, queued_as: BE59C8551, 1501 ms
Sep 14 21:37:04 mail postfix/smtp[3177]: 0C126422: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=1.9, delays=0.36/0.04/0.01/1.5, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as BE59C8551)
Sep 14 21:37:04 mail postfix/qmgr[2915]: 0C126422: removed
Sep 14 21:37:05 mail postfix/smtp[3180]: BE59C8551: to=<[email protected]>, relay=gmail-smtp-in.l.google.com[74.125.71.26]:25, delay=0.62, delays=0.08/0.05/0.33/0.16, dsn=2.0.0, status=sent (250 2.0.0 OK 1473881825 tv2si5887390wjb.173 - gsmtp)

我已经设置了反向 DNS (ptr) 以及 SPF。

被拒绝邮件的标题

eporting-MTA: dns; mail.gkri.hr
X-Postfix-Queue-ID: 92014114E0
X-Postfix-Sender: rfc822; [email protected]
Arrival-Date: Thu, 15 Sep 2016 14:31:29 +0200 (CEST)

Final-Recipient: rfc822; [email protected]
Original-Recipient: rfc822;[email protected]
Action: failed
Status: 5.7.1
Remote-MTA: dns; gmail-smtp-in.l.google.com
Diagnostic-Code: smtp; 550-5.7.1 [193.198.1.11      12] Our system has detected
    that this message is 550-5.7.1 likely unsolicited mail. To reduce the
    amount of spam sent to Gmail, 550-5.7.1 this message has been blocked.
    Please visit 550-5.7.1
    https://support.google.com/mail/?p=UnsolicitedMessageError 550 5.7.1  for
    more information. d5si660227wjm.249 - gsmtp

Return-Path: <[email protected]>
Received: from localhost (localhost [127.0.0.1])
    by mail.gkri.hr (Postfix) with ESMTP id 92014114E0
    for <[email protected]>; Thu, 15 Sep 2016 14:31:29 +0200 (CEST)
Received: from mail.gkri.hr ([127.0.0.1])
    by localhost (mail.gkri.hr [127.0.0.1]) (amavisd-new, port 10024)
    with ESMTP id hFJ_WfGPDrby for <[email protected]>;
    Thu, 15 Sep 2016 14:31:28 +0200 (CEST)
Received: from mail.gkri.hr (mail.gkri.hr [193.198.1.11])
    by mail.gkri.hr (Postfix) with ESMTPA id DEF0F114AA
    for <[email protected]>; Thu, 15 Sep 2016 14:31:27 +0200 (CEST)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8;
 format=flowed
Content-Transfer-Encoding: 8bit
Date: Thu, 15 Sep 2016 14:31:27 +0200
From: Rene Brakus <[email protected]>
To: <[email protected]>
Subject: 87687686
Organization: =?UTF-8?Q?Gradska_knji=C5=BEnica_Rijeka?=
Message-ID: <[email protected]>
X-Sender: [email protected]
User-Agent: Roundcube Webmail/0.9-svn

收到的电子邮件标题

Delivered-To: [email protected]
Received: by 10.25.155.130 with SMTP id d124csp2856951lfe;
        Thu, 15 Sep 2016 01:09:06 -0700 (PDT)
X-Received: by 10.194.139.236 with SMTP id rb12mr6579607wjb.101.1473926946908;
        Thu, 15 Sep 2016 01:09:06 -0700 (PDT)
Return-Path: <[email protected]>
Received: from mail.gkri.hr (mail.gkri.hr. [193.198.1.11])
        by mx.google.com with ESMTP id t124si1544078wmt.5.2016.09.15.01.09.06
        for <[email protected]>;
        Thu, 15 Sep 2016 01:09:06 -0700 (PDT)
Received-SPF: pass (google.com: best guess record for domain of [email protected] designates 193.198.1.11 as permitted sender) client-ip=193.198.1.11;
Authentication-Results: mx.google.com;
       spf=pass (google.com: best guess record for domain of [email protected] designates 193.198.1.11 as permitted sender) [email protected]
Message-Id: <[email protected]>
Received: from localhost (localhost [127.0.0.1]) by mail.gkri.hr (Postfix) with ESMTP id 63D741148C for <[email protected]>; Thu, 15 Sep 2016 10:09:07 +0200 (CEST)
Received: from mail.gkri.hr ([127.0.0.1]) by localhost (mail.gkri.hr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nTE8xSdhwfaS for <[email protected]>; Thu, 15 Sep 2016 10:09:07 +0200 (CEST)
Received: from [192.168.88.209] (unknown [193.198.1.29]) by mail.gkri.hr (Postfix) with ESMTPA id 646EA11496 for <[email protected]>; Thu, 15 Sep 2016 10:06:07 +0200 (CEST)
To: Rene <[email protected]>
From: "[email protected]" <[email protected]>
Subject: Test
Date: Thu, 15 Sep 2016 10:06:06 +0200
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_Part_0_1473926766295"

------=_Part_0_1473926766295
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: base64
Content-Disposition: inline

VGVzcgoK
------=_Part_0_1473926766295
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: base64
Content-Disposition: inline

PGRpdiBzdHlsZT0iZm9udC1mYW1pbHk6ICdDYWxpYnJpJywgJ3NhbnMtc2VyaWYnOyI+PGRpdiBk
aXI9Imx0ciI+VGVzcjwvZGl2PjwvZGl2Pjxicj4=
------=_Part_0_1473926766295--

答案1

Google 的 SMTP 错误参考

550, "5.7.1", 我们的系统检测到此邮件可能是未经请求的邮件。为了减少发送到 Gmail 的垃圾邮件数量,此邮件已被屏蔽

smtp 日志中出现此消息使我相信我被列入了 google 的某种黑名单。但在配置邮件和 DNS 服务器并设置 SPF、DKIM 和反向 DNS (PTR) 后,gmails smtp 不再退回我的电子邮件。

最让我困惑的是,为什么服务器上的一个电子邮件帐户能够向 Gmail 发送邮件。后来我得出结论,这是因为我在使用此工具请求从黑名单中删除时提供了这封电子邮件形式

我希望我的经历也能帮助到其他人。

相关内容