2

I have a simple .NET app that is sending out email using SMTPClient.

I am sending from an authenticated account on the local server with an SPF record, and the host (gogrid) is unsure what else they can do to solve the problem.

Any email from my simple app is flagged as spam, but any other email sent using that smtp server, or through squirrelmail, etc, comes through fine. So there must be something that apps like squirrelmail are doing that I'm missing.

Has anyone else encountered and/or solved this problem?

Scott Klarenbach
  • 37,171
  • 15
  • 62
  • 91

5 Answers5

2

Compare the MIME output of the two emails (squirellmail vs SmtpClient), using the Show original command in Gmail, and post the differences here.

Also, check SmtpClient's SMTP settings.

SLaks
  • 868,454
  • 176
  • 1,908
  • 1,964
  • I've posted below...sorry for the messyness. What's really weird is that SOME gmail accounts ARE able to receive the message without it being marked as spam. Very confusing. – Scott Klarenbach Aug 14 '09 at 00:14
2

Try sending a header with the PHP mail() function that specifies the 'from' address as being a valid email address on your server. That is to say: create an email account on your webserver for 'sending' the emails, then have the PHP script report the messages you send as coming from that account. I do this with my mailer and haven't had any problems with spam filtering.

Fiarr
  • 858
  • 5
  • 16
1

You should consider signing your messages using dkim.

see http://www.dkim.org/

or

http://en.wikipedia.org/wiki/DomainKeys_Identified_Mail

regarding your spam vs. clean email content, look at the x-spam-status field in the "spam" message. You can try to figure out what the problem is by checking the tests that were flagged against the spamassassin descriptions:

http://spamassassin.apache.org/tests_3_2_x.html

klochner
  • 8,077
  • 1
  • 33
  • 45
0

Spam Email Output:

Delivered-To: there.test.hey@gmail.com
Received: by 10.140.252.20 with SMTP id z20cs531261rvh;
        Thu, 13 Aug 2009 17:05:42 -0700 (PDT)
Received: by 10.115.117.7 with SMTP id u7mr1383293wam.152.1250208342113;
        Thu, 13 Aug 2009 17:05:42 -0700 (PDT)
Return-Path: 
Received: from n19.c05.mtsvc.net (n19.c05.mtsvc.net [70.32.68.19])
        by mx.google.com with ESMTP id 29si1711715pzk.0.2009.08.13.17.05.41;
        Thu, 13 Aug 2009 17:05:41 -0700 (PDT)
Received-SPF: neutral (google.com: 70.32.68.19 is neither permitted nor denied by best guess record for domain of admin@flatfinderadmin.com) client-ip=70.32.68.19;
Authentication-Results: mx.google.com; spf=neutral (google.com: 70.32.68.19 is neither permitted nor denied by best guess record for domain of admin@flatfinderadmin.com) smtp.mail=admin@flatfinderadmin.com
Received: from [96.49.122.252] (port=18788 helo=sk1)
    by n19.c05.mtsvc.net with esmtpa (Exim 4.63)
    (envelope-from )
    id 1MbkIe-00078B-BG
    for there.test.hey@gmail.com; Thu, 13 Aug 2009 17:05:40 -0700
MIME-Version: 1.0
From: admin@flatfinderadmin.com
To: there.test.hey@gmail.com
Date: 13 Aug 2009 17:05:42 -0700
Subject: Flat Finder Site Submitted Contact Form
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
Message-Id: 
X-Authenticated-User: 75266 admin@flatfinderadmin.com
X-Spam-Status: "score=3.7 tests=ALL_TRUSTED, HTML_IMAGE_ONLY_16, HTML_MESSAGE,
    HTML_SHORT_LINK_IMG_2, MIME_HTML_ONLY, NO_REAL_NAME version=3.1.7
    cmae=v=1.0 c=1 a=Bu8eb_7rEXsA:10 a=wNIIKIUcX8P6fymBW3VY0A==:17
    a=SSmOFEACAAAA:8 a=btttyEYfAAAA:8 a=P_WOZhPR8xpSgznosTMA:9 a=L7jHSo-IajUz1O2H4c4A:7
    a=c8QRsX8pXm0wgMQia4dzJuyZCb0A:4 a=L0MSjj-u4uAA:10 a=MSl-tDqOz04A:10
    xcat=Undefined/Undefined"
X-Spam-Level: ***

=
=0D=0A=0D=0A=0D=0A =
   Site Contact=0D=0A=0D=0A=
=0D=0A    =0D=0A        =0D=0A    =0D=0A    =0D=0A    =
=0D=0A        =0D=0A            =0D=0A                A visitor=
 to the site has submitted the following info through the contact form:=
=0D=0A            =0D=0A        =0D=0A        =0D=0A        =0D=0A            =0D=0A                User: John Doe=0D=0A                Email: doyouunderstand@gmail.com
=0D=0A= Message: Testing=0D=0A =0D=0A = =0D=0A =0D=0A=0D=0A=0D=0A



Good Email Output:

Delivered-To: there.test.hey@gmail.com
Received: by 10.140.252.20 with SMTP id z20cs531296rvh;
        Thu, 13 Aug 2009 17:07:24 -0700 (PDT)
Received: by 10.115.100.20 with SMTP id c20mr1379009wam.75.1250208443895;
        Thu, 13 Aug 2009 17:07:23 -0700 (PDT)
Return-Path: 
Received: from n17.c05.mtsvc.net (n17.c05.mtsvc.net [70.32.68.17])
        by mx.google.com with ESMTP id 13si1834503pzk.161.2009.08.13.17.07.23;
        Thu, 13 Aug 2009 17:07:23 -0700 (PDT)
Received-SPF: neutral (google.com: 70.32.68.17 is neither permitted nor denied by best guess record for domain of admin@flatfinderadmin.com) client-ip=70.32.68.17;
Authentication-Results: mx.google.com; spf=neutral (google.com: 70.32.68.17 is neither permitted nor denied by best guess record for domain of admin@flatfinderadmin.com) smtp.mail=admin@flatfinderadmin.com
Received: from localhost ([127.0.0.1]:60628 helo=s75266.gridserver.com)
    by n17.c05.mtsvc.net with esmtp (Exim 4.63)
    (envelope-from )
    id 1MbkKH-0006Xh-OF
    for there.test.hey@gmail.com; Thu, 13 Aug 2009 17:07:23 -0700
Received: from 96.49.122.252 (proxying for 96.49.122.252)
        (SquirrelMail authenticated user admin@flatfinderadmin.com)
        by s75266.gridserver.com with HTTP;
        Thu, 13 Aug 2009 17:07:21 -0700 (PDT)
Message-ID: 
Date: Thu, 13 Aug 2009 17:07:21 -0700 (PDT)
Subject: Flat Finder Site Submitted Contact Form
From: admin@flatfinderadmin.com
To: there.test.hey@gmail.com
User-Agent: SquirrelMail/1.4.9a
MIME-Version: 1.0
Content-Type: text/plain;charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Priority: 3 (Normal)
Importance: Normal
X-Spam-Status: "score=-0.9 tests=ALL_TRUSTED, NO_REAL_NAME version=3.1.7 cmae=v=1.0
    c=1 a=Bu8eb_7rEXsA:10 a=wNIIKIUcX8P6fymBW3VY0A==:17 a=oHM1V9sc3__v4s30wF0A:9
    a=AUDcTUBt7KQaFxkMUcF7gsiVO_sA:4 xcat=Undefined/Undefined"
X-Spam-Level: 

Testing
SLaks
  • 868,454
  • 176
  • 1,908
  • 1,964
Scott Klarenbach
  • 37,171
  • 15
  • 62
  • 91
-1

Likely you are missing your encoding in your MIME info, or have your return email not set or different to make it look fake. Without seeing what parameters you are/are not filling out it is hard to say.

SLaks answer is good step as well.

Considering that other email from the server is not being flagged, a blacklist or missing parameters there is unlikely.

RiddlerDev
  • 7,370
  • 5
  • 46
  • 62