• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

Help with mail going to gmail spam (but not other providers)

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

Stratus_ss

Overclockix Snake Charming Senior, Alt OS Content
Joined
Jan 24, 2006
Location
South Dakota
Hi All,

I am hoping someone can help me sort this out. I have a mail server being hosted in the cloud. I have run all the tools which check for spam scores, blacklists etc. They all pass. I have set up both SPF and DKIM, and SSL certs for the domain. When I send test emails to a couple of friends I have at different companies the email is NOT sent to the spam folder (yay!) however, trying to communicate with people on GMAIL, stuff gets sent to spam folder.

Can anyone help me out?

DKIM dig:
Code:
~$ dig 520696FC-8E6E-11E3-95DE-F9B1B795A8B0._domainkey.the-linux-admin.com txt

; <<>> DiG 9.8.1-P1 <<>> 520696FC-8E6E-11E3-95DE-F9B1B795A8B0._domainkey.the-linux-admin.com txt
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 48462
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 4

;; QUESTION SECTION:
;520696FC-8E6E-11E3-95DE-F9B1B795A8B0._domainkey.the-linux-admin.com. IN	TXT

;; ANSWER SECTION:
520696FC-8E6E-11E3-95DE-F9B1B795A8B0._domainkey.the-linux-admin.com. 433 IN TXT	"v=DKIM1\; k=rsa\;  p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCT2dlZPpZnidcIDLRAVxpt0bYUP+PMnoL/V9a91zO+PKh6H5RbJcdDV2Eo5POA8iSc77T9I8ZauTYsQlrrF7FrF38PCfB+Wg97JIBXzXcL5AoSeduJoCb8MTmbSuRyNhUpzZPK8P+syeSRw5/yWXIx7P48LhPmFtePuzxYSBKRUQIDAQAB"

;; AUTHORITY SECTION:
the-linux-admin.com.	380	IN	NS	ns57.domaincontrol.com.
the-linux-admin.com.	380	IN	NS	ns58.domaincontrol.com.

;; ADDITIONAL SECTION:
ns58.domaincontrol.com.	86072	IN	A	208.109.255.29
ns58.domaincontrol.com.	86072	IN	AAAA	2607:f208:302::1d
ns57.domaincontrol.com.	65379	IN	A	216.69.185.29
ns57.domaincontrol.com.	65379	IN	AAAA	2607:f208:206::1d

;; Query time: 37 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Wed Feb  5 09:21:30 2014
;; MSG SIZE  rcvd: 473

SPF Dig
Code:
~$ dig the-linux-admin.com TXT

; <<>> DiG 9.8.1-P1 <<>> the-linux-admin.com TXT
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 64337
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 4

;; QUESTION SECTION:
;the-linux-admin.com.		IN	TXT

;; ANSWER SECTION:
the-linux-admin.com.	3593	IN	TXT	"v=spf1 mx ptr ip4:162.243.36.150 ~all"

;; AUTHORITY SECTION:
the-linux-admin.com.	3593	IN	NS	ns58.domaincontrol.com.
the-linux-admin.com.	3593	IN	NS	ns57.domaincontrol.com.

;; ADDITIONAL SECTION:
ns58.domaincontrol.com.	63563	IN	A	208.109.255.29
ns58.domaincontrol.com.	63563	IN	AAAA	2607:f208:302::1d
ns57.domaincontrol.com.	63563	IN	A	216.69.185.29
ns57.domaincontrol.com.	63563	IN	AAAA	2607:f208:206::1d

;; Query time: 56 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Wed Feb  5 09:56:46 2014
;; MSG SIZE  rcvd: 227

Here is a sample header from an email in gmail's spam

Code:
Delivered-To: [email protected]
Received: by 10.67.2.7 with SMTP id bk7csp64569pad;
        Wed, 5 Feb 2014 06:22:17 -0800 (PST)
X-Received: by 10.140.101.162 with SMTP id u31mr2623894qge.107.1391610137477;
        Wed, 05 Feb 2014 06:22:17 -0800 (PST)
Return-Path: <[email protected]>
Received: from mail.the-linux-admin.com (mail.the-linux-admin.com. [162.243.36.150])
        by mx.google.com with ESMTP id m107si20710887qge.63.2014.02.05.06.22.16
        for <[email protected]>;
        Wed, 05 Feb 2014 06:22:17 -0800 (PST)
Received-SPF: pass (google.com: domain of [email protected] designates 162.243.36.150 as permitted sender) client-ip=162.243.36.150;
Authentication-Results: mx.google.com;
       spf=pass (google.com: domain of [email protected] designates 162.243.36.150 as permitted sender) [email protected];
       dkim=pass [email protected]
Received: from localhost (localhost [127.0.0.1])
	by mail.the-linux-admin.com (Postfix) with ESMTP id 5ABA4A0475
	for <[email protected]>; Wed,  5 Feb 2014 09:22:14 -0500 (EST)
Received: from mail.the-linux-admin.com ([127.0.0.1])
	by localhost (mail.the-linux-admin.com [127.0.0.1]) (amavisd-new, port 10032)
	with ESMTP id kvZ5uFh6sxyX for <[email protected]>;
	Wed,  5 Feb 2014 09:22:11 -0500 (EST)
Received: from localhost (localhost [127.0.0.1])
	by mail.the-linux-admin.com (Postfix) with ESMTP id 84BFAA0473
	for <[email protected]>; Wed,  5 Feb 2014 09:22:11 -0500 (EST)
DKIM-Filter: OpenDKIM Filter v2.8.4 mail.the-linux-admin.com 84BFAA0473
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=the-linux-admin.com;
	s=520696FC-8E6E-11E3-95DE-F9B1B795A8B0; t=1391610131;
	bh=C6Zq/Tnvfn5f3XkuxXYYH04je+HnGMsLa6EEe94f74o=;
	h=Date:From:To:Message-ID:Subject:MIME-Version:Content-Type:
	 Content-Transfer-Encoding;
	b=Vj+iErcps1K+Pw+JTFEf/YOZoNjnNP3X7M4yd6XmDsF6OINPoI/OZrH7UATdz3u1A
	 ptJFyZuvUiVSvUclElg/tZuB+vh3+7vm/00Q7S5hrUq/gfJj+Mds9i5ln4yocijoWR
	 3s0rT5mwY+F+BWMVMLlTW4JJG9ycMKZMGi2z4lj0=
X-Virus-Scanned: amavisd-new at the-linux-admin.com
Received: from mail.the-linux-admin.com ([127.0.0.1])
	by localhost (mail.the-linux-admin.com [127.0.0.1]) (amavisd-new, port 10026)
	with ESMTP id 5fEm8jg1gIr8 for <[email protected]>;
	Wed,  5 Feb 2014 09:22:10 -0500 (EST)
Received: from mail.the-linux-admin.com (mail.the-linux-admin.com [162.243.36.150])
	by mail.the-linux-admin.com (Postfix) with ESMTP id B4AC3A0475
	for <[email protected]>; Wed,  5 Feb 2014 09:22:09 -0500 (EST)
Date: Wed, 5 Feb 2014 09:22:09 -0500 (EST)
From: [email protected]
To: chromium sync123 <[email protected]>
Message-ID: <[email protected]>
In-Reply-To: <[email protected]>
References: <[email protected]>
Subject: Re: SPF records in place
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
X-Originating-IP: [66.203.186.254]
X-Mailer: Zimbra 8.0.6_GA_5922 (ZimbraWebClient - FF26 (Linux)/8.0.6_GA_5922)
Thread-Topic: SPF records in place
Thread-Index: x+TOwePqcKzXyhLx1rp6hHy/SBiSD3CpVCqE

Please NOTE: the actual gmail address and the @The-linux-admin.com email addresses have been redacted just to protect from spammers etc
 
Hmm.. Your SPF looks fine, and gmail sees it as passing. Though I would probably remove 'ptr', and add 'a' -- If I have control of my IP's reverse DNS, then I can set my reverse DNS as anything in your domain, then spam as your domain and it will pass your SPF.

Your DKIM looks fine -- Gmail doesn't say anything about it, but it passes on your own system, which means it's probably OK. Is your DKIM key >= 1024 bits? (It looks like it is... but if it's less, gmail won't trust it).

I checked your originating IP and MX's IP, not on any blacklists.

You may want to limit the number of received headers for outgoing messages. I see five received headers there before it leaves your MX :( (initial receipt/postfix, amavis/10026, postfix, amavis/10032, postfix). Perhaps skip spam & virus scanning? (it's awesome when I receive an email from someone and THEIR spam scanner has marked it up as being spam).

Check what your outbound EHLO/HELO is. Should be your MX's hostname. If digitalocean lets you set reverse DNS, set it to your MX's hostname.

Otherwise, I suspect it's a move on google's part to assume that email coming from cloud service providers (like digitalocean) is spam. Unfortuantely, traditional IP reputation doesn't work well in that space, because the IPs are recycled so frequently that a server that sends good email all the time could be shutdown, and seconds later, another server setup by a spammer is fired up on the same IP.

In that case, all you can do is ask them to mark it as not spam, and add you to their contact list.
 
Thanks I will look in to your suggestions for sure. Some good info even if it doesnt lead to success.

DKIM, according to the documentation is set for a default of 1024 bits, so that should be fine
 
Back