Why does gmail think mail my server sends is a spam?

18

4

Complete message received by Gmail (email, server ip and host are replaced):

Delivered-To: <myemail>
Received: by 10.180.24.132 with SMTP id u4cs216052wif;
        Thu, 20 Oct 2011 03:22:03 -0700 (PDT)
Received: by 10.14.9.165 with SMTP id 37mr1294749eet.51.1319106122223;
        Thu, 20 Oct 2011 03:22:02 -0700 (PDT)
Return-Path: <www-data@<serverdomain>>
Received: from <serverdomain> (<serverdomain>. [<serverip>])
        by mx.google.com with ESMTP id s55si2781134ees.156.2011.10.20.03.22.02;
        Thu, 20 Oct 2011 03:22:02 -0700 (PDT)
Received-SPF: pass (google.com: domain of www-data@<serverdomain> designates <serverip> as permitted sender) client-ip=<serverip>;
Authentication-Results: mx.google.com; spf=pass (google.com: domain of www-data@<serverdomain> designates <serverip> as permitted sender) smtp.mail=www-data@<serverdomain>
Received: by <serverdomain> (Postfix, from userid 33)
    id AEF1F47462EE; Thu, 20 Oct 2011 10:22:00 +0000 (UTC)
To: <myemail>
Subject: Registration confirmation
From: <sitename> mailing robot <no-reply@<serverdomain>>
MIME-Version: 1.0
Content-type: text/html; charset=utf-8
Content-Transfer-Encoding: 8bit
Message-Id: <20111020102200.AEF1F47462EE@<serverdomain>>
Date: Thu, 20 Oct 2011 10:22:00 +0000 (UTC)

Please confirm your registration on the site by clicking this link:

<A href="<confirmationlink>" target=_blank><confirmationlink></A>

What's wrong with this e-mail? Why does Gmail think it is spam?

mephisto123

Posted 2011-10-20T10:35:05.737

Reputation: 293

Question was closed 2011-11-12T20:49:41.497

if one of your server is running Spamassassin, you could inspect its detailed results, they are added in the headers. It helps a lot, sometimes its about things as stupid as a bad MIME formating – None – 2011-10-29T07:59:52.303

A couple quick ideas: - Are the emails originating from a residential ip block? - It could simply be that someone has flagged a similar email as spam. – None – 2011-10-28T03:09:30.443

>

  • No. 2. I did not send it to anyone except my own gmail account yet.
  • < – None – 2011-10-28T10:55:11.703

    Answers

    14

    Are you following their bulk senders guidelines? (Like the 'Precedence: bulk' header...)

    I don't think the HTML in your mail is valid. No root element, etc. If you send HTML-only mails, you should make sure its HTML is correct.

    Or even better: also include a plain-text version of your message (people like me, who use console e-mail clients, will thank you!). IMHO including a plain-text version will also decrease the probability of your message being considered a spam (most spams I see are HTML-only, and this is a criterion for SpamAssassin at least).

    Schnouki

    Posted 2011-10-20T10:35:05.737

    Reputation: 256

    Just changed the message to plain text to make sure problem is not in the HTML. It seems it passes filter now. But actually I need to check it on another gmail account. Will do it tomorrow, since today everyone is sleeping already :) If it really helped, will give bounty to you :) – None – 2011-10-29T01:51:36.800

    Damn, can't award bounty now >< Because it got migrated :( – mephisto123 – 2011-10-29T13:11:08.987

    That's cool, I'm just glad it helped :) – Schnouki – 2011-10-31T00:32:05.657

    7

    I've been using my own dedicated servers for at least 5 years.

    Sometimes google tags them as spam for 2 days, then when I check "not spam" in Gmail it's alright for another 6 months.

    You should test

    Also, the content of your email can influence google mail

    • Correct format (a simple test via telnet has the wrong format most of the time)
    • Keywords (using 'test' is a bad idea, it often ended in the spambox during my tests)

    As I said, with the same content and absolutely no change in my settings, google has tagged them as spam for two days, and then stopped. Over 5 years, it has happened 3 or 4 times, but never for more than 48 hours at a time though.

    chriscatfr

    Posted 2011-10-20T10:35:05.737

    Reputation: 173

    if one of your server is running Spamassassin, you could inspect its detailed results, they are added in the headers. It helps a lot, sometimes its about things as stupid as a bad MIME formating – None – 2011-10-29T08:01:11.523

    2

    Is it on a shared hosting or dedicated server. If it is shared if someone from the same IP has sent bulk emails(say 25 or more), then possibility of IP getting black listed is possible. Other reason for being spam is by using some of the spam words. Often the spam is done through algorithms using data mining techniques, which means you need to train algorithm several times emails to your email ID from different IPs and mark it is not spam which is not feasible solution. The other way of getting this out, is making your site atleast little popular by providing backlinks, usually the techniques used for SEO. I'm telling you this with my practical experience with many of my websites, which I ran for few times and shutdown.

    J Bourne

    Posted 2011-10-20T10:35:05.737

    Reputation: 68

    It is dedicated. Increasing popularity of the website is not possible atm, I'll try other advices mentioned in other answers first. Thank you for the answer anyway. – None – 2011-10-28T17:41:30.227

    1

    If your server does not pass reverse domain lookup, gmail may put that inside spam.

    Ravi Bhatt

    Posted 2011-10-20T10:35:05.737

    Reputation: 111

    It does. Received: from <serverdomain> (<serverdomain>. [<serverip>]) – None – 2011-10-20T10:56:01.437

    not necessarily, check if your server has a static ip. is it behind a huge network or some dynamic dns service? – None – 2011-10-20T10:58:09.787

    Well, I've checked with nslookup (set type=ptr, server 8.8.8.8, <serverip> gives <serverdomain>) – None – 2011-10-20T12:49:26.080

    And yes, server has static IP. You can type its IP in browser and it will show site on default hostname. – None – 2011-10-21T00:18:37.727

    1

    Since your headers appear to be correct, it's probably keying on something within the message. One of the things that SpamAssassin (no idea if this is what Gmail uses) keys on is a very short message like the above containing a hyperlink or graphic, so you may benefit by actually making your message a little longer. One of the ways to find out is to send it to your own gmail account and when it appears in your spam folder, examine the headers there for any added spam information. It may contain clues as to what spam engine Gmail is using or what rules your message is breaking.

    Drew Burchett

    Posted 2011-10-20T10:35:05.737

    Reputation:

    These headers are taken from the real message sent to my own gmail account actually :) But I'll try to make message longer, thx for advice. – None – 2011-10-27T21:40:13.563

    1

    Is the <confirmationlink> in the <serverdomain>?

    That's a very short message, so it'd be easy for it to be flagged as spam if you are sending it from an address that doesn't match the domain of the link.

    Some people might even hit the spam button just for the same reason.

    eglasius

    Posted 2011-10-20T10:35:05.737

    Reputation: 113

    Unfortunately, link is not in the serverdomain. Because there are few domains on the IP, and I can make it have correct reverse DNS records only for one domain. – None – 2011-10-28T10:56:31.580

    @mephisto123 you might want to try setting up the domain & a redirect rule to correct one. That way your domains will match. – eglasius – 2011-10-28T19:01:27.133

    0

    Make sure your domain has proper MX records and a valid SPF record pointing to your sending mail server.

    It is also possible the ip address assigned to your e-mail server had previously sent out spam.

    Take a look at https://mail.google.com/support/bin/answer.py?answer=81126#authentication

    Martin Samson

    Posted 2011-10-20T10:35:05.737

    Reputation: 267

    Thanks for the answer.

    Yes, domain has proper MX record linked to main domain A record. And yes, domain has correct SPF record. Domain is not listed in public block lists. – None – 2011-10-27T10:26:13.200

    0

    If you're sending it from a dynamic IP address then these are often flagged as spam. You can check your hosts chance to be detected as spam by adding the server's IP to the end of the following URL: http://www.spamhaus.org/query/bl?ip=

    Benjie Gillam

    Posted 2011-10-20T10:35:05.737

    Reputation: 101

    Server has static IP address. And it is not in any of blocklists listed on spamhaus. – None – 2011-10-27T21:40:40.663

    0

    Check: - server identification does not match with the sender's domain - server is marked as spam source by gmail. Done it because they foud that many people have marked as spam previos messages from that server/domain - refers contents from third-party sources identified as insecure or spam sources themselves.

    Alfabravo

    Posted 2011-10-20T10:35:05.737

    Reputation: 552