Django邮件报告被Gmail阻止

我configuration我的Django 1.6框架发送错误报告到Gmail帐户,所以我可以检查他们。 在此之前,虽然我不得不定义filter来捕获发件人邮件地址我configuration为这些电子邮件报告被标记为“非垃圾邮件”和正确分类。 虽然我每次打开报告时都会出现一条消息,例如“这不是垃圾邮件”文件夹,因为您将其标记为“非垃圾邮件”。

…直到几天前。 报告停止到达。 我检查了/var/log/mail.log中的日志,发现这个:

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 http://support.google.com/mail/bin/answer.py?hl=en&answer=188131 for 550 5.7.1 more information. t17si11455054wiv.44 - gsmtp (in reply to end of DATA command)) 

几乎所有的错误报告都被Gmail阻止,所以我参考了Google的“批量发件人指南”来尝试解决此问题。 我的邮件服务器使用一致的IP地址,并且域已经获得了正确的反向DNSlogging,但发件人地址可能会根据发生错误的子域更改(例如:[email protected],如果subdomain1抛出exception,或者[email protected]如果是子域2)。

问题是:如何检查我的postfix邮件服务器是否满足其他更高级的要求,例如邮件格式 ,并在必要时重新configuration它们?

请记住,postfix和django的邮件报告系统在发送报告的过程中是隐含的。

此外,请注意,我是一个邮件服务器和电子邮件格式的新手,但我是一个程序员,所以我不是过敏的代码。

编辑:我也检查出,以防万一,如果我的主机是在任何垃圾邮件黑名单使用mxtoolbox.com,似乎我的主机是不是列入黑名单…

编辑2:邮件标题的示例

 Delivered-To: [email protected] Received: by ***.***.***.*** with SMTP id *****************; Mon, 9 Mar 2015 00:33:13 -0700 (PDT) X-Received: by ***.***.***.*** with SMTP id *******************************; Mon, 09 Mar 2015 00:33:09 -0700 (PDT) Return-Path: <[email protected]> Received: from myVPS_machinename (<Some reverse domain name of my VM's host, but not mydomain.com> [***.***.***.***]) by mx.google.com with ESMTP id ************************************** for <[email protected]>; Mon, 09 Mar 2015 00:33:09 -0700 (PDT) Received-SPF: none (google.com: [email protected] does not designate permitted sender hosts) client-ip=***.***.***.***; Authentication-Results: mx.google.com; spf=none (google.com: [email protected] does not designate permitted sender hosts) [email protected] Received: from myVPS_machinename (localhost [127.0.0.1]) by myVPS_machinename (Postfix) with ESMTP id ********** for <[email protected]>; Mon, 9 Mar 2015 08:33:09 +0100 (CET) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [Django] ERROR (EXTERNAL IP): Internal Server Error: /pma/scripts/setup.php From: [email protected] To: [email protected] Date: Mon, 09 Mar 2015 07:33:09 -0000 Message-ID: <*************************@myVPS_machinename> 

由于安全原因,显然我隐藏了潜在的合理信息。

所以谷歌认为你发送足够的邮件作为批量发件人。 所以你需要至less为你发送的域名设置一个SPFlogging,最好也是DNS中的DKIMlogging。

这几乎允许谷歌查询您的DNS区域文件的域名,并要求..是这个发件人有效的从这个域发送电子邮件。