Email sent from server marked as spam by Gmail

grantw

Registered
Nov 21, 2012
3
0
1
cPanel Access Level
Root Administrator
Hello! Recently Gmail has started marking email sent from my server (using php mail()) as spam. If I send an identical message from my email client it arrives in the inbox.

DKIM, SPF, rDNS are all fine as far as I can tell. I've also added ADSP & DMARC records which haven't solved the problem. Gmail gives this reason - "Why is this message in Spam? It's similar to messages that have been detected by our spam filters" - which is strange as 1 minute before and after it puts the identical email sent from my email client in the inbox!

As the emails sent from my client are getting through fine I'm thinking that the content isn't the issue. It would be greatly appreciated if someone could take a look at the the following headers and give me some advice why the email from the server is being marked as spam.


From my server and was marked as spam:

Code:
Delivered-To: [email][email protected][/email]
Received: by 10.49.119.226 with SMTP id kx2csp186068qeb;
        Fri, 16 Nov 2012 06:30:29 -0800 (PST)
Received: by 10.182.152.4 with SMTP id uu4mr3853077obb.85.1353076229612;
        Fri, 16 Nov 2012 06:30:29 -0800 (PST)
Return-Path: <[email protected]>
Received: from dom.example.co.uk (dom.example.co.uk. [174.120.246.138])
        by mx.google.com with ESMTPS id pt10si1613931obc.149.2012.11.16.06.30.29
        (version=TLSv1/SSLv3 cipher=OTHER);
        Fri, 16 Nov 2012 06:30:29 -0800 (PST)
Received-SPF: pass (google.com: domain of admin @example.co.uk designates 174.120.246.138 as permitted sender) client-ip=174.120.246.138;
Authentication-Results: mx.google.com; spf=pass (google.com: domain of admin @example.co.uk designates 174.120.246.138 as permitted sender) [email protected]; dkim=pass [email protected]
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=example.co.uk; s=default;
    h=Date:Message-Id:Content-Type:Reply-to:From:Subject:To; bh=GixwKmHG5qBSBhqQXQe24bC/dPNS5d7kftQRUaDHxKw=;
    b=tLml8Vg5l0MHzK0t+Mn0ll0BDdtLezxoeCgfxWZHgCqfmPhxtDvqXClYx0B+BlDPxLN6GCzlpp4wHj91DD9UXPbPkaY7zlJGrT6MS9O5sn2SaR3SQ1L1DLr54dsTuTts;
Received: from grantw by dom.example.co.uk with local (Exim 4.80)
    (envelope-from <[email protected]>)
    id 1TZMw9-0007tI-6H
    for [email][email protected][/email]; Fri, 16 Nov 2012 14:30:29 +0000
To: [email][email protected][/email]
Subject: Offer Accepted
X-PHP-Script: www. example.co.uk/xxx for 95.172.231.27
From: Domain Brokerage <[email protected]>
Reply-to: admin @example.co.uk
Content-Type: text/plain; charset=Windows-1251
Message-Id: <[email protected]>
Date: Fri, 16 Nov 2012 14:30:29 +0000
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - dom.example.co.uk
X-AntiAbuse: Original Domain - gmail.com
X-AntiAbuse: Originator/Caller UID/GID - [500 500] / [47 12]
X-AntiAbuse: Sender Address Domain - example.co.uk
X-Get-Message-Sender-Via: dom.example.co.uk: authenticated_id: grantw/from_h

From my email client and went to the inbox:

Code:
Delivered-To: [email][email protected][/email]
Received: by 10.49.119.226 with SMTP id kx2csp185749qeb;
        Fri, 16 Nov 2012 06:28:58 -0800 (PST)
Received: by 10.60.1.40 with SMTP id 8mr4028697oej.55.1353076138309;
        Fri, 16 Nov 2012 06:28:58 -0800 (PST)
Return-Path: <[email protected]>
Received: from dom.example.co.uk (dom.example.co.uk. [174.120.246.138])
        by mx.google.com with ESMTPS id h8si1629711obn.63.2012.11.16.06.28.57
        (version=TLSv1/SSLv3 cipher=OTHER);
        Fri, 16 Nov 2012 06:28:57 -0800 (PST)
Received-SPF: pass (google.com: domain of admin @example.co.uk designates 174.120.246.138 as permitted sender) client-ip=174.120.246.138;
Authentication-Results: mx.google.com; spf=pass (google.com: domain of admin @example.co.uk designates 174.120.246.138 as permitted sender) [email protected]; dkim=pass [email protected]
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=example.co.uk; s=default;
    h=Content-Transfer-Encoding:Content-Type:Subject:To:MIME-Version:From:date:Message-ID; bh=hwPNyGhYI7Ms4AaEWvqnWKLA+T2EDpOoJ0WuusKWDQs=;
b=FRY1WllUwtkjX8ZRnFkoOjlyP8rR0PmoUyd67lZFj0xLX2vB/E8is3ZysX1VJOunD6WkbpHTmQSAt3GhWMgrLe031VfYvIaix618KN7cQZAyEEFOo2LYDgnh5YLFVqDf;
Received: from w-27.cust-7941.ip.static.uno.uk.net ([95.172.231.27]:4990 helo=[127.0.0.1])
    by dom.example.co.uk with esmtpa (Exim 4.80)
    (envelope-from <[email protected]>)
    id 1TZMuf-0005fz-Cl
    for [email][email protected][/email]; Fri, 16 Nov 2012 14:28:57 +0000
Message-ID: <[email protected]>
Date: Fri, 16 Nov 2012 14:28:59 +0000
From: Domain Brokerage <[email protected]>
User-Agent: Postbox 3.0.6 (Windows/20121031)
MIME-Version: 1.0
To: [email][email protected][/email]
Subject: Offer Accepted
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - dom.example.co.uk
X-AntiAbuse: Original Domain - gmail.com
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - example.co.uk
X-Get-Message-Sender-Via: dom.example.co.uk: authenticated_id: [email protected]


Many thanks, Grant
 

grantw

Registered
Nov 21, 2012
3
0
1
cPanel Access Level
Root Administrator
Yea thats typical form PHP mail, Use SMTP mail instead. This will help with the mail getting flagged as junk mail.
Thanks for the response. I've been looking at using Gmail SMTP or Amazon ses so will probably go ahead with one of those.

Thanks, Grant
 

mykkal

Well-Known Member
Feb 9, 2007
120
0
166
Atlanta, Georgia, United States
How To Avoid Going To Junkmail When Sending Bulkmail

Email delivery depends on 'trust' and patterns, open rates, and complaints. You can lower your complaints by using newsletter programs like phphlist (free & open source) that people can opt out from. Don't resubscribe them. Your sender score (bookmark this!) will tumble as RBL lists will insert fake emails in your list to monitor your sending behaviors.

You'll want to make sure you use the same IPs... so get static ones if you don't have them but keep them separate from your website IP. I recommend sending bulk mail from a subdomain with a static IP to make this easy. Also keep regular sending patterns. Don't just send a huge blast from an IP or domain that normally sends light or medium volume email. If you're sending newsletters daily this is easy. I rarely have to communicate with my entire network but setting up an RSS generate daily email list helps me avoid getting flagged for random high volume sends.

Lastly don't send bulk messages from your main website domain/IP. That could hurt your search rankings if you are being junked

Do this plus what i've listed below and you won't have a problem getting in the inbox.

You should always:

  • Use the same IPs for sending to build authority.
  • Use complete sentences in your subject
  • Check your senderscore
  • Use a newsletter program like phplist which supports bounced email proceeding & optin/optout technology
  • Get on Aol & yahoo whitelist
  • Send bulk mail from different IP then system/community mail is sent on.
  • Rate limit domains if you have a large list (with one mail server) or round robin outgoing mail through multiple mail servers. Example: You dont want to send more than 5,000 messages in an hour to yahoo from one IP.
  • Sign with bulk mail headers for mass mail
  • Use SSL SMTP to sign bulkmail
  • Use Spam Assasin to score outgoing mail
  • Use Antivirus to sign outgoing mail
  • Don't use a different fonts and use minimal colors and HTML.
  • Never include javascript.
  • Use complete sentences in email
  • Spellcheck your message and use correct grammar! This is important. ESPs scan mail with dictionaries and built in thesaurus to determine if an email is well written or spam.
  • Do not use internet speak or non well known abbreviations.
  • Minimize extenal links. Try not to include more than 4 or if you do make sure you have written a very long message. ESPs (Email Service Providers) see this as an attempt to siphon traffic rather than syndicate personal messages.
  • Make sure your server isn't an open relay Make all email authenticate to SMTP server or not be sent.


Do the and you'll never have an issue with delivrey

- - - Updated - - -

Email delivery depends on 'trust' and patterns, open rates, and complaints. You can lower your complaints by using newsletters people can opt out from. Don't resubscribe them. Your sender score will tumble as RBL lists will insert fake emails in your list to monitor your sending behaviors.

You'll want to make sure you use the same IPs... so get static ones if you don't have them but keep them separate from your website IP. I recommend sending bulk mail from a subdomain with a static IP to make this easy. Also keep regular sending patterns. Don't just send a huge blast from an IP or domain that normally sends light or medium volume email. If you're sending newsletters daily this is easy. I rarely have to communicate with my entire network but setting up an RSS generate daily email list helps me avoid getting flagged for random high volume sends.

Lastly don't send bulk messages from your main website domain/IP. That could hurt your search rankings if you are being junked

Do this plus what i've listed below and you won't have a problem getting in the inbox.

You should always:

  • Use the same IPs for sending to build authority.
  • Use complete sentences in your subject
  • Check your senderscore
  • Use a newsletter program like phplist which supports bounced email proceeding & optin/optout technology
  • Get on Aol & yahoo whitelist
  • Send bulk mail from different IP then system/community mail is sent on.
  • Rate limit domains if you have a large list (with one mail server) or round robin outgoing mail through multiple mail servers. Example: You dont want to send more than 5,000 messages in an hour to yahoo from one IP.
  • Sign with bulk mail headers for mass mail
  • Use SSL SMTP to sign bulkmail
  • Use Spam Assasin to score outgoing mail
  • Use Antivirus to sign outgoing mail
  • Don't use a different fonts and use minimal colors and HTML.
  • Never include javascript.
  • Use complete sentences in email
  • Spellcheck your message and use correct grammar! This is important. ESPs scan mail with dictionaries and built in thesaurus to determine if an email is well written or spam.
  • Do not use internet speak or non well known abbreviations.
  • Minimize extenal links. Try not to include more than 4 or if you do make sure you have written a very long message. ESPs (Email Service Providers) see this as an attempt to siphon traffic rather than syndicate personal messages.
  • Make sure your server isn't an open relay Make all email authenticate to SMTP server or not be sent.


Do these things and you'll never have an issue with delivery.
 
Last edited:

gcc1

Registered
Dec 4, 2013
1
0
1
cPanel Access Level
Website Owner
We spent a LONG time trying to figure out why our emails were being marked as spam by gmail. This message is simply untrue: the cause in our case had nothing to do with "similar messages being marked as spam", and was because our new mail server has IPv6 support but no forward DNS to IPv6.

I'm posting this here to help anyone else suffering with the same problem to find the answer more quickly than we did. Since our Linode came with ipv6 support built-in, and Google now supports IPv6, our smtpd was automatically using IPv6 to talk to Google. Google doesn't like this because a reverse lookup on the IPv6 address doesn't work, because we haven't added a forward AAAA record, because our DNS host won't let us. In the end we had to disable IPv6 support in Exim to stop it talking to Google using IPv6.

From this well-hidden answer: https://support.google.com/mail/answer/81126

Additional guidelines for IPv6

The sending IP must have a PTR record (i.e., a reverse DNS of the sending IP) and it should match the IP obtained via the forward DNS resolution of the hostname specified in the PTR record. Otherwise, mail will be marked as spam or possibly rejected.

The sending domain should pass either SPF check or DKIM check. Otherwise, mail might be marked as spam.