Sunday, June 21, 2015

postfix - Gmail and other private servers mark legitimate email as SPAM



The mail server configuration is driving me crazy.
Emails sent from my own private server are being banned, again by Gmail and other private servers.



I checked gmail headers and SPF, DKIM and DMARC pass the exam. Attached the headers of a blocked email sent and blocked by gmail (sent to the spam folder)



Delivered-To: t***@gmail.com
Received: by 10.129.84.197 with SMTP id i188csp307475ywb;

Tue, 28 Mar 2017 08:09:36 -0700 (PDT)
X-Received: by 10.223.179.15 with SMTP id j15mr28236175wrd.62.1490713776657;
Tue, 28 Mar 2017 08:09:36 -0700 (PDT)
Return-Path:
Received: from sd-****.h****t.net (sd-****.h****t.net. [62.***.***.202])
by mx.google.com with ESMTPS id d9si3721691wmf.26.2017.03.28.08.09.36
for
(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
Tue, 28 Mar 2017 08:09:36 -0700 (PDT)
Received-SPF: pass (google.com: domain of x****@e****a.com designates 62.***.***.202 as permitted sender) client-ip=62.***.***.202;

Authentication-Results: mx.google.com;
dkim=pass header.i=@e****a.com;
spf=pass (google.com: domain of x****@e****a.com designates 62.***.***.202 as permitted sender) smtp.mailfrom=x****@e****a.com;
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=e****a.com
Received: from localhost (localhost [127.0.0.1]) by sd-****.h****t.net (Postfix) with ESMTP id 23010E1804BD for ; Tue, 28 Mar 2017 17:09:06 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=e****a.com; h= user-agent:message-id:references:in-reply-to:organization :subject:subject:from:from:date:date:content-type:content-type :mime-version; s=default; t=1490713742; x=1492528143; bh=3ja/eI3 QdMpadvw414LY9BFcUewLWEwqdI4hsKcMJJM=; b=j6otfwG+Z3810Oy1UDib4qM NJ580B6v06J9DVKRoP8orJnGtd3UpP5l2ingbwaR5c9q4X/XJ9NAFVe9d4TW76Nv sNAMimkRVYX78SS47gRVlCRmHDwab1FwgdsAP6yJRBpBhT76X/nydqbqfkkQampr FDWehLeYjk0w5XgZUilA=
X-Virus-Scanned: Debian amavisd-new at sd-****.h****t.net
Received: from sd-****.h****t.net ([127.0.0.1]) by localhost (sd-****.h****t.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id cZ7SDTl25__u for ; Tue, 28 Mar 2017 17:09:02 +0200 (CEST)
Received: from webmail.e***.com (localhost [IPv6:::1]) by sd-****.h****t.net (Postfix) with ESMTP id B5787E180487 for ; Tue, 28 Mar 2017 17:09:02 +0200 (CEST)
MIME-Version: 1.0

Content-Type: multipart/alternative; boundary="=_63e0609e24a7c5c6e72a2b53077f53c2"
Date: Tue, 28 Mar 2017 17:09:02 +0200
From: X*** **** - E*** K***
To: t***@gmail.com
Subject: Fwd: Re: --- Subject of the message ---
Organization: E*** K****
In-Reply-To: <9f2d7aa8380dcf31e2a7af4795a1463d@e****a.com>
References: <9f2d7aa8380dcf31e2a7af4795a1463d@e****a.com>
Message-ID: <794731b396abba6212312e17219e6d7f@e****a.com>
X-Sender: x****@e****a.com

User-Agent: Roundcube Webmail/1.1.5

--=_63e0609e24a7c5c6e72a2b53077f53c2
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

--- Here the content of the message ---

--=_63e0609e24a7c5c6e72a2b53077f53c2--



EDIT: Result from senderbase:



Details
IP Address 62.***.***.202
Fwd/Rev DNS Match Help Yes

Email Reputation Help Neutral
Web Reputation Help Neutral


Last Day Last Month
Email Volume Help 0.0 1.9
Volume Change Help -100% ↓

Hostname sd-****.h****t.net
Domain Help poneytelecom.eu
Network Owner Help Free SAS
Blacklists Help
bl.spamcop.net Not Listed
cbl.abuseat.org Not Listed

pbl.spamhaus.org Not Listed
sbl.spamhaus.org Not Listed

Answer



I marked the reply from joequerty as the solution but I have to say that in the end it did not solve the problem, although it helped so much.



This is how I solved it in case anyone else needs a hand. In order to know what is causing the email to be forwarded to the spam folders, you should add a DMARC record using your postmaster's address so that gmail and other mail providers will send you logs helping you to find out the clue of non-working or bad configured email servers. Once you configure the DMARC, will have to wait, probably hours until your first diagnosis emails arrive. Meanwhile, you can check your settings with mxtoolbox.com and intodns.com tools until you don't get any error. Make sure your SPF and DKIM records (of course DMARC as well) are valid. If after all this steps, your email is still marked as spam you can use the Hotmail (postmaster.live.com) and Gmail (postmaster.google.com) postmaster tools. You will probably need to get a good reputation from them before your emails are delivered to the recipients inbox as they should. Good luck !


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...