I configured my Django 1.6 framework to send error reports to a Gmail account so I can check them. Before this worked well, though I had to define filters to catch the sender mail addresses I configured for those e-mail reports to be marked as "Not spam" and properly categorized. The filters worked, though a message appeared every time I opened a report, like "This is not in Spam folder because you marked it as Not Spam".
...until a few days ago. Reports stopped arriving. I checked out the logs in /var/log/mail.log and found this:
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))
Almost all my error reports are being blocked by Gmail, so I went to Google's Bulk Senders Guidelines to try to resolve this. My mail server uses a consistent IP address and the domain has got a proper reverse DNS record, but the sender address may change depending on subdomain which had the error (for instance: error.site1@mydomain.com if subdomain1 threw the exception, or error.site2@mydomain.com if it was subdomain2).
The question is: How may I check out if other more advanced requirements are met by my postfix mail server, such as message formatting, and reconfigure them if necessary?
Please keep in mind that both postfix and django's mail reporting system are implied in the process of sending a report.
Also, please notice that I'm a newbie with mail servers and email message formatting, but I'm a programmer, so I'm not allergic to the code.
EDIT: I also checked out, just in case, if my host was in any spam blacklist using mxtoolbox.com, it seems that my host isn't blacklisted...
EDIT2: A sample of mail header:
Delivered-To: receivermailaccount@gmail.com
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: <error.site1@mydomain.com>
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 <receivermailaccount@gmail.com>;
Mon, 09 Mar 2015 00:33:09 -0700 (PDT)
Received-SPF: none (google.com: error.site1@mydomain.com does not designate permitted sender hosts) client-ip=***.***.***.***;
Authentication-Results: mx.google.com;
spf=none (google.com: error.site1@mydomain.com does not designate permitted sender hosts) smtp.mail=error.site1@mydomain.com
Received: from myVPS_machinename (localhost [127.0.0.1])
by myVPS_machinename (Postfix) with ESMTP id **********
for <receivermailaccount@gmail.com>; 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: error.site1@mydomain.com
To: receivermailaccount@gmail.com
Date: Mon, 09 Mar 2015 07:33:09 -0000
Message-ID: <*************************@myVPS_machinename>
Obviously I am hiding potentially sensible information due to security reasons.