Saturday, March 15, 2014

Spam filters mark email received from Amazon SES as spam and quarantine them

When you are using Amazon SES to send emails to users of a site, some of the users may not be receiving the emails because the spam filters check for common spoofing signatures. In the below example the "Reply-To:" header (johndoe@mycompany.com) is a different doman compared to sending email server (Received: from a8-24.smtp-out.amazonses.com)

**************
Received: from .... by
 .... with Microsoft SMTP Server (TLS) id
 14.3.158.1; Fri, 7 Mar 2014 02:27:41 -0800
Received: from .... by ....
with Microsoft SMTP Server (TLS) id 14.3.158.1; Fri, 7 Mar 2014 02:27:40 -0800
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A....Q
X-IPAS-Result: A....Q
X-IronPort-AV: E=Sophos;i="4.97,607,1389772800";
   d="scan'208";a="95624959"
Received: from a8-24.smtp-out.amazonses.com ([x.x.x.x])  by
 .... with ESMTP; 07 Mar 2014 02:27:40 -0800
Date: Fri, 7 Mar 2014 10:27:39 +0000
Return-Path: 00049c1581ee-0b0cfd-67d-48d-901-9bb1fc318-000000@amazonses.com
To: <abc@mycompany.com>
From: John Doe <johndoe@mycompany.com>
Reply-To: John Doe<johndoe@mycompany.com>
Subject: Test subject
Message-ID: <00049c1581ee-0b0cfd-67d-48d-901-9bb1fc318-000000@email.amazonses.com>
X-Mailer: PHPMailer 5.2.2 (http://code.google.com/a/apache-extras.org/p/phpmailer/)
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset="utf-8"
X-SES-Outgoing: 2014.03.07-x.x.x.x
X-MS-Exchange-Organization-SCL: -1
X-Auto-Response-Suppress: DR, OOF, AutoReply
X-MS-Exchange-Organization-AuthSource: mycompany.com
X-MS-Exchange-Organization-AuthAs: Anonymous
MIME-Version: 1.0
**************

In order for SPAM filters to allow the emails, you will have to add either or both of the below

  • add "include:amazonses.com" to your domain's DNS server's SPF (sender policy framework) records. Refer to Amazon docs on SPF: sender policy framework
  • add DKIM (domain keys identified mail) signature to your outbound email. Refer to Amazon docs on DKIM: easy dkim

No comments:

Post a Comment