1

I'm working on a PHP application. Swift Mailer is used to send messages to clients. Messages are personal (like appointment confirmations with specific dates/times for the receiver), so we're not talking about newsletters/marketing. Because multiple companies will use the application, the Sender: and Return-Path: header contain an address from the application's domain, and the From: and Reply-To: headers contain an address from the company that's actually using the application.

The problem is that Gmail marks the messages as spam because they "similar to messages that have been detected by our spam filters".

I feel like I've tried everything:

  • SPF is set up correctly.
  • DKIM is set up correctly (2048-bit).
  • PTR record exists for sending SMTP server.
  • The HTML is clean and does not contain images/styling.
  • The plain text version is 99% the same as the HTML version.

Furthermore I've checked the following things:

  • SpamAssassin rates the message as excellent.
  • The IP from the SMTP server is not blacklisted anywhere.
  • The IP from the SMTP server is even whitelisted on some places, according to our ISP.
  • The messages we normally send are in Dutch. As a test I translated a message to English. That version was marked as spam as well.

Especially the last point makes me doubt whether the (content of the) message is really "similar to messages that have been detected by our spam filters", or that there's some other cause.

One relevant thing might be that we also use Google Apps on this domain. It's configured for incoming mail. The messages from our application are sent by our own SMTP server, but I believe that shouldn't be a problem (because it's set up right in the SPF record).

Does anyone have an idea what to do/try? I've been searching online for a while now, but I really can't get any further anymore.

Added:

Gmail clearly accepts the SPF/DKIM config, but still treats the messages as spam:

Received-SPF: pass (google.com: domain of [APPS-EMAIL] designates [IP] as permitted sender) client-ip=[IP];
Authentication-Results: mx.google.com;
       spf=pass (google.com: domain of [APPS-EMAIL] designates [IP] as permitted sender) smtp.mail=[APPS-EMAIL];
       dkim=pass header.i=@[APPS-DOMAIN]
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=[APPS-DOMAIN]; s=x;
    h=Content-Type:MIME-Version:To:From:Subject:Date:Message-ID; bh=[CUT];
    b=[CUT]

And the Port25 authentication verifier service is happy as well:

==========================================================
Summary of Results
==========================================================
SPF check:          pass
DomainKeys check:   neutral
DKIM check:         pass
Sender-ID check:    pass
SpamAssassin check: ham
Jonathan
  • 391
  • 2
  • 3
  • 16
  • You'll have to contact google with more information. It is afterall their filter and we can only conjecture, not being directly involved with the google mail system. – mdpc May 23 '13 at 21:15
  • @mdpc I've done so, but I was hoping others might have been in the same situation and maybe know a solution. – Jonathan May 23 '13 at 21:18
  • 1
    http://www.codinghorror.com/blog/2010/04/so-youd-like-to-send-some-email-through-code.html – TheCleaner May 23 '13 at 21:19
  • @TheCleaner Already came across that page. PTR, DKIM and SPF are set up correctly… – Jonathan May 23 '13 at 21:31
  • 2
    If you've done everything you can on your end the next step is to contact Google (they have contacts specifically for this) and ask them why your messages are being classified as spam. I'm going to mark this as a duplicate of our canonical "What can I do to stop my mail being classified as spam?" question (which may have some things you haven't tried, but your list above looks pretty complete -- you're down to "Talk To Google") – voretaq7 May 24 '13 at 03:01
  • @voretaq7 Thanks for your reply, I've contacted Google/Gmail. Let's hope they actually read and reply to the requests. – Jonathan May 24 '13 at 12:22
  • 2
    @Jonathan My experience with Google is they *do* read and reply to the requests, but sometimes it takes them a few days to a week. Their Postmaster team is pretty good though -- if you're not really a dirty rotten spammer they try to be helpful. – voretaq7 May 24 '13 at 16:38
  • @voretaq7 Thanks, that's good to hear. Now I'll have to wait :) – Jonathan May 24 '13 at 20:43
  • Do folks have to confirm their addresses before they can start receiving appointment confirmations etc? Is there an unsubscribe function? (Yes, even though its not marketing, for anything automated you really need to do this) – Joe Sniderman Aug 20 '14 at 18:47

0 Answers0