18

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
  • 293
  • 1
  • 3
  • 8
  • 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 –  Oct 29 '11 at 07:59
  • 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. –  Oct 28 '11 at 03:09
  • 1. No. 2. I did not send it to anyone except my own gmail account yet. –  Oct 28 '11 at 10:55

9 Answers9

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
  • 256
  • 1
  • 4
  • 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 :) –  Oct 29 '11 at 01:51
  • Damn, can't award bounty now >< Because it got migrated :( – mephisto123 Oct 29 '11 at 13:11
  • That's cool, I'm just glad it helped :) – Schnouki Oct 31 '11 at 00:32
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
  • 173
  • 4
  • 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 –  Oct 29 '11 at 08:01
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
  • 88
  • 1
  • 12
  • 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. –  Oct 28 '11 at 17:41
1

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

Ravi Bhatt
  • 111
  • 1
  • It does. Received: from (. []) –  Oct 20 '11 at 10:56
  • not necessarily, check if your server has a static ip. is it behind a huge network or some dynamic dns service? –  Oct 20 '11 at 10:58
  • Well, I've checked with nslookup (set type=ptr, server 8.8.8.8, gives ) –  Oct 20 '11 at 12:49
  • And yes, server has static IP. You can type its IP in browser and it will show site on default hostname. –  Oct 21 '11 at 00:18
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.

  • 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. –  Oct 27 '11 at 21:40
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
  • 113
  • 4
  • 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. –  Oct 28 '11 at 10:56
  • @mephisto123 you might want to try setting up the domain & a redirect rule to correct one. That way your domains will match. – eglasius Oct 28 '11 at 19:01
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
  • 267
  • 1
  • 4
  • 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. –  Oct 27 '11 at 10:26
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=

  • Server has static IP address. And it is not in any of blocklists listed on spamhaus. –  Oct 27 '11 at 21:40
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
  • 581
  • 4
  • 14