email from my web app hosted by linode ends in spam folder

Hello,

I can't seem to mark my emails sent from my linode hosted web app as non spam in gmail.

Below is a snippet of the header of the email

Delivered-To: koop.hk@gmail.com
Received: by 10.142.207.1 with SMTP id e1cs11216wfg;
        Sat, 28 May 2011 07:31:26 -0700 (PDT)
Received: by 10.229.72.27 with SMTP id k27mr2398528qcj.19.1306593085452;
        Sat, 28 May 2011 07:31:25 -0700 (PDT)
Return-Path: <info@koop.hk>
Received: from koop.hk (li282-238.members.linode.com [66.228.32.238])
        by mx.google.com with ESMTP id f4si5742835qcy.40.2011.05.28.07.31.24;
        Sat, 28 May 2011 07:31:24 -0700 (PDT)
Received-SPF: neutral (google.com: 66.228.32.238 is neither permitted nor denied by best guess record for domain of info@koop.hk) client-ip=66.228.32.238;
Authentication-Results: mx.google.com; spf=neutral (google.com: 66.228.32.238 is neither permitted nor denied by best guess record for domain of info@koop.hk) smtp.mail=info@koop.hk
Received: by koop.hk (Postfix, from userid 65534)
    id 0CAF884A8; Sat, 28 May 2011 22:31:24 +0800 (HKT)
Date: Sat, 28 May 2011 22:31:23 +0800
From: "koop.hk" <info@koop.hk>
To: koop.hk@gmail.com
Message-ID: <4de1073bf0c5b_663443c37ae687b7@plato.mail>
Subject: Welcome to KOOP!
Mime-Version: 1.0
Content-Type: text/html;
 charset=UTF-8
Content-Transfer-Encoding: 7bit
X-No-Spam: True

test</info@koop.hk></info@koop.hk>

I'm not sure if its because the IP address is blacklisted by gmail? Is there anything that can be done against this?

Thanks in advance for any help!

Mike

20 Replies

Create a TXT dns record with the following in it "v=spf1 a mx include:_spf.google.com ~all" that will create a SPF (sender policy framework) record for your domain.

Also set up rDNS see http://library.linode.com/dns-guides/co … de-manager">http://library.linode.com/dns-guides/configuring-dns-with-the-linode-manager

Er, why are you including Google's SPF? He's not using Google Apps email for hosting, or at least didn't say so…

I use v=spf1 a mx -all for self-hosted…?

His MX records point to google.

I've usually had this happen for the first few e-mails from a new IP; clicking "Not Spam" usually gets it cleared up pretty quickly. Note that my Gmail account has been around awhile, so it may trust my judgement more than others.

If you've got multiple servers and don't want to tangle with this every time you add a new one, designate a stable one as an outgoing smarthost and funnel all of your mail that way. It doesn't put that much load on a system, so it can coexist with almost anything else.

Also, if you really, REALLY don't want to tangle with this, http://postmarkapp.com/ is decent. $1.50 per thousand e-mails. Wait 'til you try to send to Hotmail…

Hi thanks for the replies.

I do use Google Apps to host my email for this domain. However, my problem is that emails sent by my web app (such as "you have a new message" etc.) are consistently marked as spam by gmail.

Is the solution provided by OBS still valid? Is there anything else I can try? I'm currently figuring out how to transfer the DNS settings to Linode from 101domain, who doesn't seem to allow creation of TXT records :?

Thanks again

Mike.

Yes my solution is still valid, you could also investigate DKIM but that's more complicated to implement.

Go to your registrar and point the nameservers to ns1.linode.com - ns5.linode.com (set your dns records in linode's dns manager first)

Hi I've set the DNS to point to the Linode DNS manager and added the SPF record as you suggested (see: https://skitch.com/michielwaaijer/fnkpu … er-koop.hk">https://skitch.com/michielwaaijer/fnkpu/linode-dns-manager-koop.hk)

However, the emails from the koop.hk web app still land in the gmail spam folder.

Delivered-To: waaijermichiel@gmail.com
Received: by 10.231.206.84 with SMTP id ft20cs85175ibb;
        Tue, 31 May 2011 16:23:52 -0700 (PDT)
Received: by 10.229.41.70 with SMTP id n6mr4683400qce.252.1306884232283;
        Tue, 31 May 2011 16:23:52 -0700 (PDT)
Return-Path: <info@koop.hk>
Received: from koop.hk (li282-238.members.linode.com [66.228.32.238])
        by mx.google.com with ESMTP id r21si1202229qcs.77.2011.05.31.16.23.51;
        Tue, 31 May 2011 16:23:51 -0700 (PDT)
Received-SPF: neutral (google.com: 66.228.32.238 is neither permitted nor denied by best guess record for domain of info@koop.hk) client-ip=66.228.32.238;
Authentication-Results: mx.google.com; spf=neutral (google.com: 66.228.32.238 is neither permitted nor denied by best guess record for domain of info@koop.hk) smtp.mail=info@koop.hk
Received: by koop.hk (Postfix, from userid 65534)
    id EDC0284A8; Wed,  1 Jun 2011 07:23:50 +0800 (HKT)
Date: Wed, 01 Jun 2011 07:23:50 +0800
From: KOOP <info@koop.hk>
To: waaijermichiel@gmail.com
Message-ID: <4de57886db51c_21d04e6f7ba41873@plato.mail>
Subject: New message for Sony Vaio
Mime-Version: 1.0
Content-Type: multipart/alternative;
 boundary="--==_mimepart_4de57886d73bc_21d04e6f7ba4154d";
 charset=UTF-8
Content-Transfer-Encoding: 7bit
X-No-Spam: True</info@koop.hk></info@koop.hk>

I checked if the DNS change has propogated by checking "whois koop.hk" in terminal and it has.

What else could I try?

@mikewire:

Received: from koop.hk (li282-238.members.linode.com [66.228.32.238])


You ought to fix that. As I understand it, your mail server is claiming its name is koop.hk, even though its rDNS is really li282-238.members.linode.com.

Regarding your SPF record, it's not quite correct: you need to take out the quotation marks.

Hi I've removed the quotation marks.

However, could you tell me how to fix my mail server claiming to be koop.hk? Where can I do this?

Pick a mail server name, e.g., mail.koop.hk

2. In your DNS manager, create an "A" record for mail.koop.hk.

3. In the Linode Manager, set reverse DNS for your IP to mail.koop.hk (use the "Remote Access" tab then look by "Public IP").

Give 2 & 3 time to propagate. Then check from a shell prompt with the 'host' command:

host mail.koop.hk

Should return your IP address (66.228.32.238).

host 66.228.32.238

Should return "mail.koop.hk".

3. Once that's good, set the mail server name in Postfix's main.cf config file:

myhostname = mail.koop.hk

Restart Postfix and try it out.

@sleddog:

2. In your DNS manager, create an "A" record for mail.koop.hk.

3. In the Linode Manager, set reverse DNS for your IP to mail.koop.hk (use the "Remote Access" tab then look by "Public IP").

Give 2 & 3 time to propagate. …
You need to give 2 time to propagate before you do 3. When setting rDNS, Linode forward-confirms it, so you need to have it working first.

Thanks guys, I'll have a go at this and let you know how it goes.

Argh,

It still doesn't work. I followed all the steps.

When I type in "host 66.228.32.238" in terminal it returns:

"238.32.228.66.in-addr.arpa domain name pointer mail.koop.hk."

the email still lands in the spam with following headers:

Delivered-To: waaijermichiel@gmail.com
Received: by 10.231.206.84 with SMTP id ft20cs90170ibb;
        Tue, 31 May 2011 21:36:58 -0700 (PDT)
Received: by 10.229.23.138 with SMTP id r10mr4821090qcb.221.1306903018448;
        Tue, 31 May 2011 21:36:58 -0700 (PDT)
Return-Path: <info@koop.hk>
Received: from mail.koop.hk (li282-238.members.linode.com [66.228.32.238])
        by mx.google.com with ESMTP id k2si1521099qct.88.2011.05.31.21.36.57;
        Tue, 31 May 2011 21:36:57 -0700 (PDT)
Received-SPF: neutral (google.com: 66.228.32.238 is neither permitted nor denied by best guess record for domain of info@koop.hk) client-ip=66.228.32.238;
Authentication-Results: mx.google.com; spf=neutral (google.com: 66.228.32.238 is neither permitted nor denied by best guess record for domain of info@koop.hk) smtp.mail=info@koop.hk
Received: by mail.koop.hk (Postfix, from userid 65534)
    id 16C4284A8; Wed,  1 Jun 2011 12:36:57 +0800 (HKT)
Date: Wed, 01 Jun 2011 12:36:56 +0800
From: KOOP <info@koop.hk>
To: waaijermichiel@gmail.com
Message-ID: <4de5c1e8ec192_21d04e6f7ba4268a@plato.mail>
Subject: New message for Sony Vaio
Mime-Version: 1.0
Content-Type: multipart/alternative;
 boundary="--==_mimepart_4de5c1e8bd2a1_21d04e6f7ba423fb";
 charset=UTF-8
Content-Transfer-Encoding: 7bit
X-No-Spam: True</info@koop.hk></info@koop.hk>

The actual code behind the message is:

----==_mimepart_4de5c1e8bd2a1_21d04e6f7ba423fb
Date: Wed, 01 Jun 2011 12:36:56 +0800
Mime-Version: 1.0
Content-Type: text/plain;
 charset=UTF-8
Content-Transfer-Encoding: 7bit
Content-ID: <4de5c1e8e9f14_21d04e6f7ba4246@plato.mail>

New message for: [Sony Vaio](http://koop.hk/categories/37-electronics/listings/40-sony-vaio)
===========================

Sender: mikewire
Message
testing spam again and again and again

To reply to the message, please go here: http://koop.hk/messages/142

- The KOOP team

----==_mimepart_4de5c1e8bd2a1_21d04e6f7ba423fb
Date: Wed, 01 Jun 2011 12:36:56 +0800
Mime-Version: 1.0
Content-Type: text/html;
 charset=UTF-8
Content-Transfer-Encoding: 7bit
Content-ID: <4de5c1e8ead00_21d04e6f7ba4259f@plato.mail>

| 

      [![](http://koop.hk/images/logo-new.png)](http://koop.hk)

## New message for: [Sony Vaio](http://koop.hk/categories/37-electronics/listings/40-sony-vaio)

      Sender: mikewire

      **Message**

      testing spam again and again and again

      To reply to the message, please [click here](http://koop.hk/messages/142).

* * *

- The KOOP team

   |

----==_mimepart_4de5c1e8bd2a1_21d04e6f7ba423fb--

For if it helps - before switching to Google Apps to host our email I set up email on my linode following this guide: http://library.linode.com/email/postfix … 0.04-lucid">http://library.linode.com/email/postfix/dovecot-mysql-ubuntu-10.04-lucid

Please help as I really need to fix this problem!!

Thanks a lot!

Received: from mail.koop.hk (li282-238.members.linode.com [66.228.32.238])

Google isn't seeing your new reverse DNS yet. (Neither am I from home.) Give it more time to propagate – 24-36 hours.

I'm seeing you rDNS now however you'll want to set your SPF record for mail.koop.hk as well as koop.hk

@obs:

I'm seeing you rDNS now however you'll want to set your SPF record for mail.koop.hk as well as koop.hk

Shouldn't need to. SPF check is done against the sender's email domain, which is @koop.hk.

Oh yeah whoops >.> it's morning here.

@sleddog:

@obs:

I'm seeing you rDNS now however you'll want to set your SPF record for mail.koop.hk as well as koop.hk

Shouldn't need to. SPF check is done against the sender's email domain, which is @koop.hk.
Actually, SPF can be checked on your HELO identity also, so the original recommendation to add an SPF record for mail.koop.hk is correct.

http://www.openspf.org/FAQ/Common_mistakes#helo

@Stever:

@sleddog:

@obs:

I'm seeing you rDNS now however you'll want to set your SPF record for mail.koop.hk as well as koop.hk

Shouldn't need to. SPF check is done against the sender's email domain, which is @koop.hk.
Actually, SPF can be checked on your HELO identity also, so the original recommendation to add an SPF record for mail.koop.hk is correct.

http://www.openspf.org/FAQ/Common_mistakes#helo

Live and learn. Thanks for that :)

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct