Linode Forum
https://forum.linode.com/

email from my web app hosted by linode ends in spam folder
https://forum.linode.com/viewtopic.php?f=11&t=7176
Page 1 of 2

Author:  mikewire [ Sat May 28, 2011 10:51 am ]
Post subject:  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


Code:
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


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

Author:  obs [ Sat May 28, 2011 11:58 am ]
Post subject: 

Create a TXT dns record with the following in it
Code:
"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

Author:  rsk [ Sat May 28, 2011 2:48 pm ]
Post subject: 

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
Code:
v=spf1 a mx -all
for self-hosted...?

Author:  obs [ Sat May 28, 2011 3:12 pm ]
Post subject: 

His MX records point to google.

Author:  hoopycat [ Sat May 28, 2011 3:21 pm ]
Post subject: 

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

Author:  mikewire [ Sat May 28, 2011 8:40 pm ]
Post subject: 

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.

Author:  obs [ Sun May 29, 2011 6:28 am ]
Post subject: 

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)

Author:  mikewire [ Tue May 31, 2011 7:35 pm ]
Post subject: 

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)

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

Code:
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


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

What else could I try?

Author:  mnordhoff [ Tue May 31, 2011 7:45 pm ]
Post subject: 

mikewire wrote:
Code:
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.

Author:  mikewire [ Tue May 31, 2011 8:11 pm ]
Post subject: 

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?

Author:  sleddog [ Tue May 31, 2011 9:15 pm ]
Post subject: 

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.

Author:  mnordhoff [ Tue May 31, 2011 9:54 pm ]
Post subject: 

sleddog wrote:
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.

Author:  mikewire [ Tue May 31, 2011 10:19 pm ]
Post subject: 

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

Author:  mikewire [ Wed Jun 01, 2011 12:46 am ]
Post subject: 

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:

Code:
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


The actual code behind the message is:

Code:
----==_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: <a href="http://koop.hk/categories/37-electronics/listings/40-sony-vaio">Sony Vaio</a>
===========================

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>

<!DOCTYPE html>
<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
  </head>
  <body bgcolor="#f3f3f3">
  <table width="100%">
     <td>
     <div style="font-size: 12px;width: 400px; background-color: #fff; margin: 0px auto; font-family: sans-serif; border: 1px solid #434950;">
     <div style="background-color: #434950;padding:10px;"><a href="http://koop.hk"><img src="http://koop.hk/images/logo-new.png" border="0"/></a></div>
    <div style="color: #434950;margin: 10px;line-height:20px;">
    <h2>New message for: <a href="http://koop.hk/categories/37-electronics/listings/40-sony-vaio">Sony Vaio</a></h2>
   <p>
      Sender: mikewire<br><br>
      <b>Message</b><br>
      testing spam again and again and again
    </p>
    <p>
      To reply to the message, please <a href="http://koop.hk/messages/142">click here</a>.
    </p>
    <hr />
    <p>- The KOOP team</p>
    </div>
    </div>
  </td>
  </table>

  </body>
</html>

----==_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

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

Thanks a lot!

Author:  sleddog [ Wed Jun 01, 2011 1:28 am ]
Post subject: 

Code:
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.

Page 1 of 2 All times are UTC-04:00
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/