Gmail put my emails into spam folder - email

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

Related

How can I fix the problem with Gmail? Gmail marked email with passed SPF, DKIM and DMARC as spam

Gmail moves messages to spam folder. PTR records for ipv4 and ipv6 are available. I have the headers:
SPF: PASS с IP-адресом 2a05:480:0:992f:0:0:0:2.
DKIM: 'PASS', domain drom.com.ua
DMARC: 'PASS'
Delivered-To: vostoknefteproduct#gmail.com
Received: by 2002:a9d:522:0:0:0:0:0 with SMTP id 31csp351612otw;
Fri, 5 Apr 2019 05:26:18 -0700 (PDT)
X-Google-Smtp-Source: APXvYqzWa1UxYEepV1tor3akYHi1DLXojOZnr61fkANdKlbOkDM880aGrAB9RzQdjipusdfEcAVt
X-Received: by 2002:a2e:87d2:: with SMTP id v18mr7262855ljj.4.1554467178382;
Fri, 05 Apr 2019 05:26:18 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1554467178; cv=none;
d=google.com; s=arc-20160816;
b=TTDI9m3Rt73dRkcImzRRAM5n98TJgwNxCnrbvKNVMAIOdrWk/iG+NU2OrR3/vDr7Gp
fQmPmqt5QyEdZpO1G+He8uYckwETdCQFhVACDVcC5FJ8GWnWsys5p9vbFYzlYh89OZR+
gFfJkt+lb5z607n03Sr9zMW9HiJVBGKLr+SFCsG8u/AOmZCF9wZtGwaP69E+7b916njn
WZ+Pz9Q/+DyDKaCOQWrdUlTS5GvrfK/c86/5lA0AjoZN90/Rj+uGlbIROqKUXoLbA/z3
G9LM9df3a6/kfAZBkzHB3PqCaiUhEKbSrcpLj1gT1fKHZKWOnkqb9hlcYwMX2OcHbpA8
zTtg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
h=content-language:thread-index:mime-version:message-id:date:subject
:to:from:dkim-signature;
bh=qI0pd1OCLQLqqFvztD8zxwZ0XJBtraToDzc2t4i88s0=;
b=uLJIPEtdroC8P6tqoyfOikNhNzEmtmNRGpgoOefyyN/0wdAqExsSoUxZ9UKLL31lST
AT7J8/ZOEMuGa/wn1dSUHfwRqiZl7d/rxM+AtT2a1PaSSLulOgz9HQDGw1r81QXKnZMI
XzsGpuPmz9e3apEtczYBM0E3zYjm5Z2ITmpnrk9MluAnEuqE370R/24ixS1W2+EEG4mY
FXZ6AsImGfZGFr75zc9kLTPgBxa1hxghD0mu6RIACf45b5ljQZQuspj8kRyhw5NX30SA
FRwg1TwRjm3N+kmaUiDv4M64Y7s1d/PU7Gr4rb33v8Ia/aEOpeFfKLs2NfKmiiuvqBh7
94vg==
ARC-Authentication-Results: i=1; mx.google.com;
dkim=pass header.i=#drom.com.ua header.s=dkim header.b=G8nYIwzB;
spf=pass (google.com: domain of shop#drom.com.ua designates 2a05:480:0:992f::2 as permitted sender) smtp.mailfrom=shop#drom.com.ua;
dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=drom.com.ua
Return-Path: <shop#drom.com.ua>
Received: from drom.com.ua (drom.com.ua. [2a05:480:0:992f::2])
by mx.google.com with ESMTPS id z24si17168655ljj.124.2019.04.05.05.26.18
for <vostoknefteproduct#gmail.com>
(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
Fri, 05 Apr 2019 05:26:18 -0700 (PDT)
Received-SPF: pass (google.com: domain of shop#drom.com.ua designates 2a05:480:0:992f::2 as permitted sender) client-ip=2a05:480:0:992f::2;
Authentication-Results: mx.google.com;
dkim=pass header.i=#drom.com.ua header.s=dkim header.b=G8nYIwzB;
spf=pass (google.com: domain of shop#drom.com.ua designates 2a05:480:0:992f::2 as permitted sender) smtp.mailfrom=shop#drom.com.ua;
dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=drom.com.ua
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=drom.com.ua ; s=dkim; h=Content-Type:MIME-Version:Message-ID:Date:Subject:To:From:Sender: Reply-To:Cc:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=qI0pd1OCLQLqqFvztD8zxwZ0XJBtraToDzc2t4i88s0=; b=G8nYIwzBB+jpn8qK83ZCo7vu+m AM/RFrxq/PP8dITX1PNXqINAjHPSu2rBVsdE5QTMPDoaHYPbOeC9wFHFMfYspdy/JyQAh4A8hmSNz HgtnwRBVR14Nht8DAqeql7CCrOom0KNS0SQ95dTnOy42/5bFommziwUghHGgzyzjUav4=;
Received: from [176.98.31.190] (helo=DESKTOPV2831BB) by drom.com.ua with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from <shop#drom.com.ua>) id 1hCNvF-0000Rn-J9 for vostoknefteproduct#gmail.com; Fri, 05 Apr 2019 15:26:17 +0300
From: "DROM - служба обработки заказов" <shop#drom.com.ua>
To: <vostoknefteproduct#gmail.com>
Subject: Test title
Date: Fri, 5 Apr 2019 15:26:17 +0300
Message-ID: <005901d4ebaa$c4b3ea80$4e1bbf80$#drom.com.ua>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_NextPart_000_005A_01D4EBC3.EA0197B0"
X-Mailer: Microsoft Outlook 16.0
Thread-Index: AdTrqr/vXGG/i/4HRdu0LENUGEwBuw==
Content-Language: ru
X-Scanned-By: ClamAV 0.101.1; Fri, 05 Apr 2019 15:26:17 +0300
Where can be the problem? Thanks
Unfortunately this seems to be business as usual with gmail. Their spam filter seems entirely arbitrary and uncontrollable by recipients - for example adding addresses to your address book, marking messages as "not spam", or repeatedly moving messages from spam to your inbox does not help, and nor does following their guidelines, which include implementing measures such as SPF, DKIM and DMARC, just as you've done. On my own gmail account, I often find messages sent to myself end up in spam!
Their postmaster tools are also broken - this is supposed to provide a feedback mechanism that allows server admins to see why IPs or domains are being blocked or spam filtered, however, it doesn't work properly, and it's very common to see domains & IPs marked as "bad" despite having zero spam reports. There is also no support available for postmaster tools, so you can't even report such problems. It might be worth trying anyway just see what they think of you.
In short, you are entirely at google's mercy - even if you're doing everything that they ask, your messages may still get spam filtered, and you have no recourse.

SPF passed, DKIM signed and DMARC added but email goes to spam

I have configured DKIM, SPF and DMARC correct and from the email headers it seems to be working fine but the emails I sent from my SMTP server are marked as spam. Here is my email headers
Received: from SG2APC01HT253.eop-APC01.prod.protection.outlook.com
(10.163.105.24) by SG2PR03MB1582.apcprd03.prod.outlook.com with HTTPS via
SG2PR06CA0014.APCPRD06.PROD.OUTLOOK.COM; Tue, 7 Feb 2017 02:03:11 +0000
Received: from SG2APC01FT015.eop-APC01.prod.protection.outlook.com
(10.152.250.60) by SG2APC01HT253.eop-APC01.prod.protection.outlook.com
(10.152.251.100) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.874.2; Tue, 7 Feb
2017 02:03:09 +0000
Authentication-Results: spf=pass (sender IP is 191.101.230.42)
smtp.mailfrom=ezpc.com.my; hotmail.com; dkim=pass (signature was verified)
header.d=ezpc.com.my;hotmail.com; dmarc=bestguesspass action=none
header.from=ezpc.com.my;
Received-SPF: Pass (protection.outlook.com: domain of ezpc.com.my designates
191.101.230.42 as permitted sender) receiver=protection.outlook.com;
client-ip=191.101.230.42; helo= mail.ezpc.com.my;
Received: from BAY004-MC1F48.hotmail.com (10.152.250.55) by
SG2APC01FT015.mail.protection.outlook.com (10.152.250.181) with Microsoft
SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.874.2 via Frontend
Transport; Tue, 7 Feb 2017 02:03:06 +0000
X-IncomingTopHeaderMarker: OriginalChecksum:B3C91582F4E1A8BEB3081753A75091AB6E10F9554C8EB64EF3F4DBAEBFBBCCAD;UpperCasedChecksum:FDA1A8FF432113AA359CED44F62CC1B29335E24D01725A791958063140028963;SizeAsReceived:1267;Count:16
Received: from mail.ezpc.com.my ([191.101.230.42]) by BAY004-MC1F48.hotmail.com with Microsoft SMTPSVC(7.5.7601.23143);
Mon, 6 Feb 2017 18:03:04 -0800
Received: by mail.ezpc.com.my (Postfix, from userid 48)
id AB46E2213CB; Mon, 6 Feb 2017 21:03:03 -0500 (EST)
DKIM-Filter: OpenDKIM Filter v2.11.0 mail.ezpc.com.my AB46E2213CB
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ezpc.com.my;
s=default; t=1486432983;
bh=9v0acwudeB20jRA3DCLi3/n8gPxEJUSqP+DRE97Rs/8=;
h=To:Subject:From:Date:From;
b=Pr71KmBKnlBDX6KEY3PNzaRVqj1njANZe4fVyDI/3a+uNDCqE933329nhyoaeyS2U
c5pbo1szpI2lI5Io9AV5q33w/HeIYnsGvstpM9e/mtpBUeNoYk7ajIeJldSyI1kbGv
AtYp7oGy2ltmDcO4nkwqEBRpkPJr3jwcKhY6Ucys=
Any idea on fixing the problem?
Your ip reputation is neutral (which is good but can be improved)
http://www.senderbase.org/lookup/?search_string=191.101.230.42
As long as all those settings are configured correct, then you should use this form from Microsoft!
https://support.microsoft.com/en-us/getsupport?oaspworkflow=start_1.0.0.0&wfname=capsub&productkey=edfsmsbl3&locale=en-us&ccsid=636225696037961710

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

Mail into GMail spam folder, SPF and everyting passes

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

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