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

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?


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).


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

  • SPF
  • rDNS
  • SMTP relay check ( abuse.net/relay )
  • blacklists ( whatismyipaddress.com/blacklist-check )

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.


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.


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


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.