Why do these emails from amazon SES keep getting marked as spam?

11,013

Solution 1

Well, I don't know about anyone else, but Amazon's SES is in my spam filters as a persistent and unrepentent source of spam, and the service does nothing to help me to identify which users of the service are legit and which ones aren't. Not saying that's why gmail's calling a spade a spade, but it probably isn't helping.

Solution 2

SPF records aren't the only factor that is used when determining a message is spam. Gmail for example looks at DomainKeys / DKIM. See http://mailchimp.com/about/authentication/ for more information on the different email services and the different authentication techniques they use.

Looking at the headers in your email, SPF passed fine.

So you may want to look at implementing DomainKeys / DKIM for your emails. In Gmail, this would show a "Signed by" line in the details of the header.

Further to that, the content of the email also would have an impact. Doesn't matter whether Gmail believes the email is a genuine email, it may still flag your email as spam based on user feedback, content and other factors.

Share:
11,013

Related videos on Youtube

The Shurrican
Author by

The Shurrican

Updated on September 18, 2022

Comments

  • The Shurrican
    The Shurrican over 1 year

    Right now I am sending emails using the php mail() function. I am setting the From: header to an address corresponding to the hostname and also reverse-dns of the server sending the email like this:

    $header = 'From: Foo <[email protected]>' . "\r\n" .
        'Reply-To: [email protected]' ;
    $x = mail($to,$subject,$body,$header);
    

    This works fine so var, every email gets through with all providers I tested.

    The hostname is just something long and generic from my isp that supplies the root server.

    I know that I can have the From: -header corresponding to my domain if I change the hostname (either system or in sendmail) and set up reverse dns accordintly.

    However hostname to the same domain as a website runs on can cause problems in apache (like delivering the default vhost and not the domain specific).

    I know that this all can be handled, however I would like not to have to manage mailserver and so on and thoughta bout using Amazon Simple Email Service

    I set it up and everything, but emails keep getting marked as spam by Gmail.

    I was surprised, because the reverse dns and spf policies correspond to the envelope adresses. However gmail seems to particuarly strict when evaulating the From: -header.

    So I added SPF and SenderID records to my DNS

    (I read up on that and added them using a wizard tool, from my understanding they should be correct. maby i have an error in here?)

    This is an example of an email sent by amazon

    And this is the output of dig -t txt mydomain.com

    ;; ANSWER SECTION:
    mydomain.com.       1800    IN  TXT "spf2.0/pra include:amazonses.com include:_spf.google.com  ip4:1.2.3.4 ?all"
    mydomain.com.       1800    IN  TXT "v=spf1 include:amazonses.com include:_spf.google.com ip4:1.2.3.4 ?all"
    

    I already allowed several dails for changes to propagate, but gmail still keeps marking my emails as spam.

    So lets sum it up:

    • The From: -header tld does not correspond with the envelope domain, but the envelope domain does correspond with reverse dns and hostname of sending server (this is all amazon).

    • There are SPF and SenderId records set up that correspond to the From: -header.

    • Gmail keeps marking mail as spam.

    Can anyone point me in the right direction?

    • ceejayoz
      ceejayoz about 12 years
      "bla" as subject and content of "sers"? You might just be hitting a wall content-wise.
    • The Shurrican
      The Shurrican about 12 years
      ok... that might actually be the case! thx +1
  • The Shurrican
    The Shurrican about 12 years
    thanks, +1. maby it is just due to the simple fact. or maby a specific amazon server that is used for my emaisl is on a spam list... well such things would be precisely the reason why in wanted to go for that service in the first place, but seems like that was a dead end.
  • ceejayoz
    ceejayoz about 12 years
    SES e-mails don't come from the EC2 IP range. EC2 IPs being blacklisted is one of the main reasons Amazon has the SES service.
  • CpnCrunch
    CpnCrunch over 3 years
    Every single IP address that I've reported to Amazon for SES spam is still on various blacklists. Also, I keep getting spam from SES spammers even after reporting it to Amazon. It happens all the time, so I assume Amazon is just lax about abuse reports. They likely only ban spammers if they get a lot of complaints, but that is not a good way of operating a bulk mail service.