I’m trying to configure a mail server with Ubuntu 14.04 (Postfix+ dovecot, hostname=idcmail.idc.healthcare) but my emails are being received in recipient’s spam folders. I know there are many answers to this question but I have tried almost everything according to answers to no avail. I’ve done following steps
- PTR record is set for domain
- SPF record is set in DNS
- DKIM is configured
- IP address is checked for black list via spamhaus but it is also clear.
- Abuse address is configured at abuse.net
The email headers I am receiving in my Gmail email box says that my SPF and DKIM is passed. Below is the header
Delivered-To: umair.naqvi73@gmail.com
Received: by 10.79.72.1 with SMTP id v1csp1761228iva;
Sun, 13 Mar 2016 04:34:08 -0700 (PDT)
X-Received: by 10.98.34.205 with SMTP id p74mr21651199pfj.93.1457868848225;
Sun, 13 Mar 2016 04:34:08 -0700 (PDT)
Return-Path: <bobby@idc.healthcare>
Received: from idcmail.idc.healthcare (115-186-155-204.nayatel.pk. [115.186.155.204])
by mx.google.com with ESMTPS id l9si8897121pfb.158.2016.03.13.04.34.07
for <umair.naqvi73@gmail.com>
(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
Sun, 13 Mar 2016 04:34:07 -0700 (PDT)
Received-SPF: pass (google.com: domain of bobby@idc.healthcare designates 115.186.155.204 as permitted sender) client-ip=115.186.155.204;
Authentication-Results: mx.google.com;
spf=pass (google.com: domain of bobby@idc.healthcare designates 115.186.155.204 as permitted sender) smtp.mailfrom=bobby@idc.healthcare;
dkim=pass header.i=@idc.healthcare
Received: from [192.168.8.4] (unknown [39.47.91.89])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by idcmail.idc.healthcare (Postfix) with ESMTPSA id D3C1C80D36;
Sun, 13 Mar 2016 04:33:30 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=idc.healthcare;
s=dkim; t=1457868812;
bh=6imp6PpJMW+8Q5OtYGkLm8HP7ihBSc3AC9SAqXIvKYc=;
h=To:Cc:From:Subject:Date:From;
b=XaNuuKJ5/rdtcvDuTZKCaNUfluHOFeJgn7m2O6KfZ2gfEI7/ztVMd61b3Bvx3WUZO
zbLc8vt4UMaaWe5C4c5DqikNjqJ3VSmFqkzFdeS2pkv9e3F+n7LZ+wnINjAUHWFJsU
bfiq7KpVI9MWveOCAuTbsg4DLluxTBhNrYGvGykY=
To: ab.sattar@idc.net.pk
Cc: rizwanuppal@hotmail.com, doctoruppal@hotmail.com, rizwanuppal@idc.net.pk,
arfan.qadir@live.com, umair.naqvi73@gmail.com, umair@acetechnologies.biz
From: bobby <bobby@idc.healthcare>
Subject: Email server
Message-ID: <56E55008.1040309@idc.healthcare>
Date: Sun, 13 Mar 2016 16:33:28 +0500
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101
Thunderbird/38.6.0
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="------------010202010701020208060102"
This is a multi-part message in MIME format.
--------------010202010701020208060102
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Dig command returns with following details
; <<>> DiG 9.9.5-3ubuntu0.8-Ubuntu <<>> idc.healthcare
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 37910
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;idc.healthcare. IN A
;; ANSWER SECTION:
idc.healthcare. 583 IN A 115.186.155.204
;; Query time: 2 msec
;; SERVER: 192.168.1.4#53(192.168.1.4)
;; WHEN: Mon Mar 21 09:40:41 PKT 2016
;; MSG SIZE rcvd: 59
MX record test returns following details from MX record Tester
I also tried to test my email for spam using different free services but somehow my email does not delivered to the temporary email addresses provided by these services, however, for gmail, yahoo, hotmail it is working. One of the returned messages to one such service is
Reporting-MTA: dns; idcmail.idc.healthcare
X-Postfix-Queue-ID: 2B41380CF5
X-Postfix-Sender: rfc822; bobby@idc.healthcare
Arrival-Date: Sun, 13 Mar 2016 15:25:24 +0500 (PKT)
Final-Recipient: rfc822; web-Y8ogB7@mail-tester.com
Original-Recipient: rfc822;web-Y8ogB7@mail-tester.com
Action: failed
Status: 4.4.1
Diagnostic-Code: X-Postfix; connect to mail-tester.com[94.23.206.89]:25:
Connection timed out
Here my server can ping the IP mentioned in the returned email header i.e. 94.23.206.89. My current MX record entries are below and i am receiving emails
10 @ @ 1 Hour
30 smtp @ 1 Hour
0 smtp.idcmail @ 1 Hour
Previously i tried with following MX records from which i was receiving emails too
10 @ @ 1 Hour
30 @ smtp 1 Hour
0 @ smtp.idcmail 1 Hour
There must be something i am missing. Any help would be highly appreciated.
UPDATE: After configuring DKIM, SPF and IP not in black list what else could have been done to avoid emails going in spam. It is a test server and no lists have been sent to audience.
Update: My reverse DNS is also ok but why am i not able to send to testing services such as mail-tester.com etc but i can send to gmail, yahoo or hotmail (though in spam). It always has a timeout message in logs but i can ping to these address successfully.
Mar 24 19:58:36 idcmail postfix/qmgr[987]: D059481247: from=<bobby@idc.healthcare>, size=755, nrcpt=1 (queue active)
Mar 24 19:59:06 idcmail postfix/smtp[1796]: connect to mail.isnotspam.com[74.208.174.205]:25: Connection timed out
Mar 24 19:59:36 idcmail postfix/smtp[1796]: connect to mx01.1and1.com[74.208.5.21]:25: Connection timed out
Mar 24 20:00:06 idcmail postfix/smtp[1796]: connect to mx00.1and1.com[74.208.5.3]:25: Connection timed out
Mar 24 20:00:06 idcmail postfix/smtp[1796]: D059481247: to=<ins-f1vtzbop@isnotspam.com>, relay=none, delay=696, delays=606/0.02/90/0, dsn=4.4.1, status=deferred (connect to mx00.1and1.com[74.208.5.3]:25: Connection timed out)
Mar 24 20:03:36 idcmail postfix/qmgr[987]: 12D2A81258: from=<bobby@idc.healthcare>, size=755, nrcpt=1 (queue active)
Mar 24 20:04:06 idcmail postfix/smtp[1799]: connect to mail-tester.com[94.23.206.89]:25: Connection timed out
Mar 24 20:04:06 idcmail postfix/smtp[1799]: 12D2A81258: to=<web-BqH7aD@mail-tester.com>, relay=none, delay=531, delays=501/0.02/30/0, dsn=4.4.1, status=deferred (connect to mail-tester.com[94.23.206.89]:25: Connection timed out)