Question
Email sent to gmail is flagged as spam.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×localhost
in the email header b/c they're relying on a spoofed domain name. So, despite the SPF record, you're sending the receiving mail-servers mixed signals.
-all
, it's no surprise that Gmail is sending your mail to the Spam folder. It might help to change it to "soft fail," i.e. ~all
. See How To use an SPF Record to Prevent Spoofing & Improve E-mail Reliability.
/etc/hosts
file. See Setting the Hostname & Fully Qualified Domain Name (FQDN) on Ubuntu 12.04 or CentOS 6.4 | GitHub.Hi @pablo,
I am in the same situation actually. All my sent emails are flagged as spams. I correctly setup SPF, DKIM and properly set /etc/hosts
file. Please, is there any way to remove Received: from localhost (localhost [127.0.0.1]) from the header ?
Best,
Edouard.
/etc/hostsfile looks like now:
127.0.0.1 blahtech
127.0.0.1 localhost
hostname -fin the terminal my hostname shows up as blahtech.us which is correct.
Delivered-To: blahblah1@gmail.com
Received: by 10.68.204.97 with SMTP id kx1csp418090pbc;
Thu, 12 Dec 2013 11:56:56 -0800 (PST)
X-Received: by 10.49.76.66 with SMTP id i2mr16662763qew.35.1386878216527;
Thu, 12 Dec 2013 11:56:56 -0800 (PST)
Return-Path:
Received: from blahtech.us (blahtech.us. [192.241.174.155])
by mx.google.com with ESMTP id e16si19805596qej.91.2013.12.12.11.56.56
for ;
Thu, 12 Dec 2013 11:56:56 -0800 (PST)
Received-SPF: pass (google.com: domain of info@blahgranola.com designates 192.241.174.155 as permitted sender) client-ip=192.241.174.155;
Authentication-Results: mx.google.com;
spf=pass (google.com: domain of info@blahgranola.com designates 192.241.174.155 as permitted sender) smtp.mail=info@blahgranola.com
Received: from localhost (localhost [127.0.0.1])
by blahtech.us (Postfix) with ESMTP id E3A53A2E4C
for ; Thu, 12 Dec 2013 14:56:55 -0500 (EST)
X-Virus-Scanned: Debian amavisd-new at blahtech.us
Received: from blahtech.us ([127.0.0.1])
by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id M-iVFP5FI675 for ;
Thu, 12 Dec 2013 14:56:55 -0500 (EST)
Received: from blahblah.com (localhost [127.0.0.1])
by blahtech.us (Postfix) with ESMTP id A0F7CA2E45
for ; Thu, 12 Dec 2013 14:56:55 -0500 (EST)
Received: from 50.138.128.223
(SquirrelMail authenticated user info@blahgranola.com)
by blahblah.com with HTTP;
Thu, 12 Dec 2013 14:56:55 -0500
Message-ID:
Date: Thu, 12 Dec 2013 14:56:55 -0500
Subject: test
From: info@blahgranola.com
To: blahblah1@gmail.com
User-Agent: SquirrelMail/1.4.22
MIME-Version: 1.0
Content-Type: text/plain;charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Priority: 3 (Normal)
Importance: Normal
egre
maybe too late for you, but others can help…
check your /etc/postfix/main.cf
myhostname = yourdomain.com
Received: from localhost (blahtech [127.0.0.1])
Delivered-To: blahblah1@gmail.com
Received: by 10.68.204.97 with SMTP id kx1csp421854pbc;
Thu, 12 Dec 2013 12:53:44 -0800 (PST)
X-Received: by 10.224.127.74 with SMTP id f10mr9660112qas.56.1386881624569;
Thu, 12 Dec 2013 12:53:44 -0800 (PST)
Return-Path:
Received: from blahtech.us (blahtech.us. [192.241.174.155])
by mx.google.com with ESMTP id r10si11014534qak.130.2013.12.12.12.53.42
for ;
Thu, 12 Dec 2013 12:53:43 -0800 (PST)
Received-SPF: pass (google.com: domain of info@blahgranola.com designates 192.241.174.155 as permitted sender) client-ip=192.241.174.155;
Authentication-Results: mx.google.com;
spf=pass (google.com: domain of info@blahgranola.com designates 192.241.174.155 as permitted sender) smtp.mail=info@blahgranola.com
Received: from localhost (blahtech [127.0.0.1])
by blahtech.us (Postfix) with ESMTP id 6AD2AA2E1B
for ; Thu, 12 Dec 2013 15:53:41 -0500 (EST)
X-Virus-Scanned: Debian amavisd-new at blahtech.us
Received: from blahtech.us ([127.0.0.1])
by localhost (blahtech.us [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id 4Qu-wLkQ3AUt for ;
Thu, 12 Dec 2013 15:53:41 -0500 (EST)
Received: from blahblah.com (blahtech [127.0.0.1])
by blahtech.us (Postfix) with ESMTP id E50F2A2CCB
for ; Thu, 12 Dec 2013 15:53:40 -0500 (EST)
Received: from 50.138.128.223
(SquirrelMail authenticated user info@blahgranola.com)
by blahblah.com with HTTP;
Thu, 12 Dec 2013 15:53:40 -0500
Message-ID: <0ffb94d941b77c6674f3afd011941f6e.squirrel@blahblah.com>
Date: Thu, 12 Dec 2013 15:53:40 -0500
Subject: test66
From: info@blahgranola.com
To: blahblah1@gmail.com
User-Agent: SquirrelMail/1.4.22
MIME-Version: 1.0
Content-Type: text/plain;charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Priority: 3 (Normal)
Importance: Normal
fgregre
/etc/hosts
file should look like @ Setting the Hostname & Fully Qualified Domain Name (FQDN) on Ubuntu 12.04 or CentOS 6.4 | GitHub.blahtech.usand I have my
/etc/hostsfile to
127.0.0.1 blahtech
127.0.0..1 localhost
/etc/hostnamefile set to
blahtech.us
A mail 192.241.174.155
127.0.0.1 localhost.localdomain localhost
127.0.1.1 mail.blahtech.us
127.0.1.1 mail.blahgranola.com
192.241.174.155 mail.blahtech.us
192.241.174.155 mail.blahgranola.com
/etc/hostsfile:
127.0.0.1 localhost.localdomain localhost
127.0.1.1 btserver.blahtech.us btserver
127.0.1.1 btserver.blahgranola.com btserver
192.241.174.155 btserver.blahtech.us btserver
192.241.174.155 btserver.blahgranola.com btserver
/etc/hostnamefile:
btserver
btserver
Assuming this is true…