Mail into GMail spam folder, SPF and everyting passes - email

My mails that I send from my vps keeps going to the spam folder of Google mail (gmail), only gmail, all other receivers get the mail!
I've been struggling with the following problem for a couple of hours now.
First of all the mail went straight to the spam, with a soft fail on the SPF records. After some googling and adjusting the dns and everything is correct on all the tests I do on internet.
What am I doing wrong, see the email headers below:
Delivered-To: info#MYWEBSITE.nl
Received: by 10.140.49.2 with SMTP id p2csp254884qga;
Wed, 18 Dec 2013 05:09:01 -0800 (PST)
X-Received: by 10.180.103.193 with SMTP id fy1mr8266239wib.10.1387372141146;
Wed, 18 Dec 2013 05:09:01 -0800 (PST)
Return-Path: <info#SENDINGWEBSITE.nl>
Received: from www.SENDINGVPS.nl ([2a02:1234::777:3eff:fed6:7ef6])
by mx.google.com with ESMTPS id s9si717710wiw.41.2013.12.18.05.09.00
for <info#MYWEBSITE.nl>
(version=TLSv1 cipher=RC4-SHA bits=128/128);
Wed, 18 Dec 2013 05:09:01 -0800 (PST)
Received-SPF: pass (google.com: domain of info#SENDINGWEBSITE.nl designates 2a02:1234::777:3eff:fed6:7ef6 as permitted sender) client-ip=2a02:1234::777:3eff:fed6:7ef6;
Authentication-Results: mx.google.com;
spf=pass (google.com: domain of info#SENDINGWEBSITE.nl designates 2a02:1234::777:3eff:fed6:7ef6 as permitted sender) smtp.mail=info#SENDINGWEBSITE.nl
Received: from i12345.upc-i.chello.nl ([62.195.XX.XXX] helo=[192.168.1.12])
by www.SENDINGVPS.nl with esmtpsa (TLSv1:AES128-SHA:128)
(Exim 4.76)
(envelope-from <info#SENDINGWEBSITE.nl>)
id 1VtGrz-0004Rq-8k; Wed, 18 Dec 2013 14:08:59 +0100
Subject: Mail gmail hotmail
Mime-Version: 1.0 (1.0)
From: "info#SENDINGWEBSITE.nl" <info#SENDINGWEBSITE.nl>
Content-Type: text/plain;
charset=us-ascii
X-Mailer: iPhone Mail (11B554a)
Message-Id: <62D8B201-8243-43A5-B15D-6371DD208D23#SENDINGWEBSITE.nl>
Date: Wed, 18 Dec 2013 14:08:58 +0100
Content-Transfer-Encoding: 7bit
To: "info#MYWEBSITE.nl" <info#MYWEBSITE.nl>
Hi
Verstuurd vanaf mijn iPhone

Related

Gmail put my emails into spam folder

I am really confused. I have tested my mail server with mail-tester.com, I got 10/10 but Gmail still puts my emails into spam folder.
I have PTR, DKIM and SPF records, all valid.
The mailserver hostname is: domain.tld
The email viewed from the destination:
Delivered-To: email
Received: by 10.176.71.30 with SMTP id h30csp57228uac;
Wed, 3 May 2017 06:54:08 -0700 (PDT)
X-Received: by 10.28.35.207 with SMTP id j198mr6661610wmj.17.1493819648744;
Wed, 03 May 2017 06:54:08 -0700 (PDT)
Return-Path: <eamil>
Received: from ironforge.meatkult.com (diamondshine.hu. [31.14.134.231])
by mx.google.com with ESMTPS id n6si7712651wra.196.2017.05.03.06.54.08
for <email>
(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
Wed, 03 May 2017 06:54:08 -0700 (PDT)
Received-SPF: pass (google.com: domain of eamil designates 31.14.134.231 as permitted sender) client-ip=31.14.134.231;
Authentication-Results: mx.google.com;
dkim=pass header.i=#meatkult.com;
spf=pass (google.com: domain of email designates 31.14.134.231 as permitted sender) smtp.mailfrom=email
Received: from localhost (ironforge.meatkult.com [127.0.0.1]) by ironforge.meatkult.com (Postfix) with ESMTP id C0D5561DE3 for <email>; Wed,
3 May 2017 15:54:07 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=meatkult.com; h= content-transfer-encoding:content-type:content-type:mime-version :user-agent:date:date:message-id:subject:subject:from:from; s= default; t=1493819647; x=1495634048; bh=gSWT9V3EBSVx0zLNz5M9KT0K Z1jXGsJ1lUMr6hpFhDU=; b=gcFh4x2hIg9hXPzOzokAZBF8ewYZQk1+sVtlq2r6 TsBQcZU+8fdswJoBgrt/9y2nXc+zfyE8dZiGoqnndXRyvfzKC7IF2aIjTcoZzHxW UdH7GTT7cn3FTur6ceaOi6BGIXzbN+ovNr8+SC7fvO9f6r3xxb/4op4qoT3GpQXA LO4=
X-Virus-Scanned: Debian amavisd-new at ironforge.meatkult.com
Received: from ironforge.meatkult.com ([127.0.0.1]) by localhost (ironforge.meatkult.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 9mCr5x49RMat for <email>; Wed,
3 May 2017 15:54:07 +0200 (CEST)
Received: from [192.168.1.163] (s10.ip4.lp01.wwdh.hu [217.65.97.10]) (Authenticated sender: arape#meatkult.com) by ironforge.meatkult.com (Postfix) with ESMTPSA id 55FDB6027A for <emial>; Wed,
3 May 2017 15:54:07 +0200 (CEST)
To: email
From: Peter Arany <email>
Subject: I don't know what's going on
Message-ID: <a41512a6-eddc-7fd1-d897-37415b7ed766#meatkult.com>
Date: Wed, 3 May 2017 15:53:27 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Still not receiving mails
I have valid SSL certification by letsencrypt, I think everything should be fine, but its not. Does anyone has experience in this case? Did I miss something?
Peter
Check your filters. You may have some filters to move your mails to Spam Folder. You can learn about filters here - https://support.google.com/mail/answer/6579?hl=en

DMARC behaviour on Gmail

We've configured SPF, DKIM and DMARC records for our domain and they're working fine. Our DMARC reports from Gmail, Hotmail, Yahoo also confirm the same.
However, just last week, one of our (Gmail) users brought to our attention a fraudulent email sent from a spoofed email address on our domain.
After looking at the email headers, we realised Gmail didn't initiate a DMARC check at all and the email landed in user's inbox. Gmail had only performed an SPF check which had passed because the check was performed on the envelop FROM header domain.
The email header (with identifying details redacted) looked like the following:
Delivered-To: redacted#gmail.com
Received: by 10.28.167.23 with SMTP id q23csp326872wme;
Mon, 20 Feb 2017 23:53:04 -0800 (PST)
X-Received: by 10.36.147.1 with SMTP id y1mr22192213itd.34.1487663583976;
Mon, 20 Feb 2017 23:53:03 -0800 (PST)
Return-Path: <redacted#fraudulentdomain.net>
Received: from server2.fraudulentdomain.net (server2.fraudulentdomain.net. [144.X.Y.Z])
by mx.google.com with ESMTP id i196si19658513ioi.78.2017.02.20.23.53.03
for <redacted#gmail.com>;
Mon, 20 Feb 2017 23:53:03 -0800 (PST)
Received-SPF: pass (google.com: domain of redacted#fraudulentdomain.net designates 144.X.Y.Z as permitted sender) client-ip=144.X.Y.Z;
Authentication-Results: mx.google.com;
spf=pass (google.com: domain of redacted#fraudulentdomain.net designates 144.X.Y.Z as permitted sender) smtp.mailfrom=redacted#fraudulentdomain.net
Received: by server2.fraudulentdomain.net (Postfix, from userid 330)
id 385716C165; Tue, 21 Feb 2017 08:53:03 +0100 (CET)
To: redacted#gmail.com
Subject: Some Subject
From: My Service <spoofed#mydomain.com>,
"MIME-Version:1.0"#server2.fraudulentdomain.net
Content-type: text/html; charset=iso-8859-1
Message-Id: <20170221075303.385716C165#server2.fraudulentdomain.net>
Date: Tue, 21 Feb 2017 08:53:03 +0100 (CET)
Why did Gmail not initiate a DMARC check and just performed an SPF check? Is it got to do something with the Display FROM header having 2 values?
That's a bug, I reported it to Google, they have fixed it now.

Why are emails sent by my server marked as SPAM?

My website, all written in PHP, has an automatic system to notify users via email. Everything worked perfectly until i moved everything on a new less expensive dedicated server (new IP, also). Now, from the new server, all the emails are sent to the spam folder. Why? What happened? Gmail says it's marked as spam because it violates these guidelines about the sender. Here is the message header of one of the emails
Delivered-To: fontanavideostudios#gmail.com
Received: by 10.64.224.200 with SMTP id re8csp1701580iec;
Sun, 1 Feb 2015 07:30:19 -0800 (PST)
X-Received: by 10.140.22.5 with SMTP id 5mr1380826qgm.72.1422804619177;
Sun, 01 Feb 2015 07:30:19 -0800 (PST)
Return-Path: <noreply#racebooking.net>
Received: from ns362512.ip-91-121-174.eu ([2001:41d0:1:ef28::1])
by mx.google.com with ESMTP id e3si21772874qaf.113.2015.02.01.07.30.18
for <fontanavideostudios#gmail.com>;
Sun, 01 Feb 2015 07:30:19 -0800 (PST)
Received-SPF: none (google.com: noreply#racebooking.net does not designate permitted sender hosts) client-ip=2001:41d0:1:ef28::1;
Authentication-Results: mx.google.com;
spf=none (google.com: noreply#racebooking.net does not designate permitted sender hosts) smtp.mail=noreply#racebooking.net
Received: by ns362512.ip-91-121-174.eu (Postfix, from userid 504)
id DFE0916074; Sun, 1 Feb 2015 16:28:52 +0100 (CET)
To: fontanavideostudios#gmail.com
Subject: Qualcuno ha commentato il tuo post
X-PHP-Originating-Script: 504:new_notification.php
From: Racebooking <noreply#racebooking.net>
Reply-To: no-reply
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Message-Id: <20150201152852.DFE0916074#ns362512.ip-91-121-174.eu>
Date: Sun, 1 Feb 2015 16:28:52 +0100 (CET)
The domain, racebooking.net, has a good reputation and MX, mail, smtp point to the same ip: 91.121.174.40 which is the same IP of racebooking.net (here is a test)
Any idea?
Check this line in the header:
Received-SPF: none (google.com: noreply#racebooking.net does not designate permitted sender hosts) client-ip=2001:41d0:1:ef28::1;
Authentication-Results: mx.google.com;
spf=none (google.com: noreply#racebooking.net does not designate permitted sender hosts) smtp.mail=noreply#racebooking.net
I think you have not correctly configured the SPF entries in your DNS.
See this Google Products thread about this: https://productforums.google.com/forum/#!topic/apps/nvGcYDjONfc
I can see that you have no SPF entries defined for "racebooking.net":
$ dig +short racebooking.net txt
"1|www.racebooking.net"
You need to define an SPF entry like:
"v=spf1 mx a:mail0.racebooking.net -all"
You also need to include any other host from which you might be sending email (ie web applications sending email from #racebooking.net).
More info about what SPF is: http://en.wikipedia.org/wiki/Sender_Policy_Framework

Sending a mail to a CC (Carbon Copy) address with Amazon SES

I am sending a mail with Amazon SES.
The following mail is delivered but although the CC address is in the mail Amazon doesn't actually deliver an email to the CC'd address.
I can't see what I'm doing wrong.
Here is the raw email:
Delivered-To: personToAddres#gmail.com
Received: by xx.xxx.xxx.1x5 with SMTP id i7xxx3xxx4qaz6;
Wed, 26 Mar 2014 04:33:49 -0700 (PDT)
X-Received: by xx.xxx.xx.xxx7 with SMTP id xxx5057wiw.xx8;
Wed, 26 Mar 2014 04:33:48 -0700 (PDT)
Return-Path: <xxx-xxxx-xxx-x9xx-xx-xxx#xxxx.amazonses.com>
Received: from xx-xxx.smtp-out.x10xx.amazonses.com (xxx.smtp-out.xxx.amazonses.com. [xx.xxx.xx.xxx])
by mx.google.com with ESMTPS id fxxx.x11xx.xxx.xx
for <personToAddres#gmail.com>
(version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
Wed, 26 Mar 2014 04:33:48 -0700 (PDT)
Received-SPF: pass (google.com: domain of xxx12x-xxx-xxx-xxx-xxx-xxx-xxx#xxx.amazonses.com designates xx.x15xx.x.xxx as permitted sender) client-ip=xx.xxx.x.xxx;
Authentication-Results: mx.google.com;
spf=pass (google.com: domain of xxx-xx13x-xxx-xx-xx-xx#xxx.amazonses.com designates xx.xx16.x.x as permitted sender) smtp.mail=x14xx#.amazonses.com
Return-Path: xx17x#.amazonses.com
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="=xxx18x"
From: no-reply#x19xx.co
Subject: Your February Report
Cc: info#carbonCopyAddress.com
Date: Wed, 26 Mar 2014 11:33:46 +0000
Message-ID: <xx20x#xxx.amazonses.com>
X-SES-Outgoing: 2014.03.26-xx.x21xx.x.1xx
--=_xxxxx22xxx1
Content-Type: multipart/alternative;
boundary="=_xxx23xxxxxxx2"
--=_xx24xxxxxxxx3
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=ISO-8859-1
this is additional email text
--=_xxxxx25xxx4
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset=ISO-8859-1
<p>Dear Mr and Mrs Peson</p>...
If you are using SendRawEmailRequest to send emails, you need to make sure that cc and bcc addresses are added to Destinations collection

Emails marked as spam - SPF passes, DKIM passes, sender-id passes

I've been struggling to figure out why this is happening, but my emails are being marked as spam by Gmail and Hotmail (they work in Yahoo.)
SPF, DKIM, rDNS, and sender-id all pass. What's weirder is I've send the EXACT same email with its exact contents from my dev server and Gmail accepts it as not spam even though every one of those checks which passes in production fails in dev. Hotmail still marks it as spam though.
Any idea what could be going on? Here is an example header from Gmail (with IPs and domains changed for privacy):
Delivered-To: REMOVED#gmail.com
Received: by 10.194.16.130 with SMTP id g2csp192349wjd;
Mon, 13 Aug 2012 14:04:10 -0700 (PDT)
Received: by 10.236.193.105 with SMTP id j69mr12819871yhn.21.1344891849751;
Mon, 13 Aug 2012 14:04:09 -0700 (PDT)
Return-Path: <mailer#mydomain.com>
Received: from mail.mydomain.com (mydomain.com. [xxx.xxx.xxx.xxx])
by mx.google.com with ESMTPS id e22si563514yhh.132.2012.08.13.14.04.08
(version=TLSv1/SSLv3 cipher=OTHER);
Mon, 13 Aug 2012 14:04:09 -0700 (PDT)
Received-SPF: pass (google.com: domain of mailer#mydomain.com designates xxx.xxx.xxx.xxx as permitted sender) client-ip=xxx.xxx.xxx.xxx;
Authentication-Results: mx.google.com; spf=pass (google.com: domain of mailer#mydomain.com designates xxx.xxx.xxx.xxx as permitted sender) smtp.mail=mailer#mydomain.com; dkim=pass header.i=#mydomain.com
Received: from mydomain.com (localhost [127.0.0.1])
by mail.mydomain.com (8.14.4/8.14.4/Debian-2ubuntu1) with ESMTP id q7DL48tq019625
for <REMOVED#gmail.com>; Mon, 13 Aug 2012 17:04:08 -0400
X-DKIM: OpenDKIM Filter v2.3.2 mail.mydomain.com q7DL48tq019625
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mydomain.com;
s=server; t=1344891848;
bh=lpw+5POmINBjQYgQBdJvY2d+m84MY8hwTqZ6riNfH8I=;
h=Date:From:To:Message-ID:Subject:Mime-Version:Content-Type:
Content-Transfer-Encoding;
b=KnYSvSzFewOGFyYWvP1DfCvyRfp6y31BfOPTOgRsZ7nGB4PXuau84euzuhs82V4lx
++DjN3iPxSj07euW+y7aRe9R2YiXKJFVNh7cbcJX8+tc3LMmnR7Cv27iP3Yvv6mQMd
uz4Engql3bXLVVDKcLLj/Fj2eiwtWzW4chA2GNTQ=
Received: (from root#localhost)
by mydomain.com (8.14.4/8.14.4/Submit) id q7DL48Dm019624
for REMOVED#gmail.com; Mon, 13 Aug 2012 17:04:08 -0400
Date: Mon, 13 Aug 2012 17:04:08 -0400
From: "Website" <mailer#mydomain.com>
To: REMOVED#gmail.com
Message-ID: <50296bc866dfc_4b8593bd18556b8#mydomain.com.mail>
Subject: You've received a message from Bob.
Mime-Version: 1.0
Content-Type: text/html;
charset=UTF-8
Content-Transfer-Encoding: 7bit
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mydomain.com; q=dns/txt; s=server; t=1344891848; bh=LfadLl6eJEB+NgiTbBlcBhOt/9NKcG0wapkrAjlGqfg=; h=content-transfer-encoding:content-type:date:from:message-id:mime-version:subject:to; b=mTB8TBb+gG7ESxeVbfqHANKUMeNbdwK/hSIq58oin5ERNSMKOIvZKY9cQJRoY/Q96PQ7J+7b3ZkZuwcg+zMkQyhK7YACvFAz4SUWqpdqiZrBDw8Vqy3PjkGFcz2V5vyUOjI6vN/Y6iOj1zlocC+/p8lkpw3upwxr7cNoe5/Kwu8=
The other guy doesn't know what he's talking about and just guessing.
'Received: (from root#localhost)' is your problem. That needs to reflect the from email...
You problem is:
domain: mydomain.com
ip: xxx.xxx.xxx.xxx
and root#localhost too
You need change informations in your mail client!
I have the exact same problem. In my case, I have configured my mail client correctly. I have one main domain (mydomain.com), my mail server also supports another domain (mydomain2.com) using virtual_domains. However, the emails for (mydomain2.com) always end up in Spam in Gmail. The mail-tester score for mydomain2.com is 9.7/10. Here is the original header from Gmail (i have replaced IP and email address with example ips)
Delivered-To: myemail#gmail.com
Received: by 10.80.177.154 with SMTP id m26csp9759783edd;
Sat, 7 Jan 2017 16:28:58 -0800 (PST)
X-Received: by 10.84.128.67 with SMTP id 61mr108683153pla.153.1483835337902;
Sat, 07 Jan 2017 16:28:57 -0800 (PST)
Return-Path: <noreply#mydomain2.com>
Received: from mail.mydomain.com (xx-xxx-x-xxx.com. [xx.xxx.x.xxx])
by mx.google.com with ESMTPS id s186si84168719pgb.6.2017.01.07.16.28.57
for <myemail#gmail.com>
(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
Sat, 07 Jan 2017 16:28:57 -0800 (PST)
Received-SPF: pass (google.com: domain of noreply#mydomain2.com designates xx.xxx.x.xxx as permitted sender) client-ip=xx.xxx.x.xxx;
Authentication-Results: mx.google.com;
dkim=pass header.i=#mydomain2.com;
spf=pass (google.com: domain of noreply#mydomain2.com designates xx.xxx.x.xxx as permitted sender) smtp.mailfrom=noreply#mydomain2.com;
dmarc=pass (p=REJECT dis=NONE) header.from=mydomain2.com
Received: from myhomerouter by mail.mydomain.com (Postfix) with ESMTPSA id 284538419F for <myemail#gmail.com>; Sun,
8 Jan 2017 00:28:57 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mydomain2.com; s=mail; t=1483835337; bh=g3zLYH4xKxcPrHOD18z9YfpQcnk/GaJedfustWU5uGs=; h=From:Subject:Date:To:From; b=rwN/rSaqojz5pKVoYwb99Ec0TZzkHCo140KMlFVe47jl7Ui64w4DoNpCgZFeYEX87
8NZuBQdfnrirZWbZ7ibydoi07Poz6PZjKoLdRToMcqrtcGVfA+UrJPGQ3EE/QrnYf4
W0Hyb3PpUO+WVcwDL/rvvVm6ZnfjdIjobJpFj1fU=
From: First Name lastname <noreply#mydomain2.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\))
Subject: Test
Message-Id: <8D89561C-0226-4C6B-A8D1-54A2F210F031#mydomain2.com>
Date: Sat, 7 Jan 2017 19:28:56 -0500
To: First Name <myemail#gmail.com>
X-Mailer: Apple Mail (2.3259)
test