==== Required information ====
- iRedMail version: 0.86
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Linux/BSD distribution name and version: Ubuntu 12.04.3 LTS, 2.6.32-042stab083.2
====
I'm fairly new to setting up email services, however I've setup iRedMail and it seems to be working, however emails go to the spam folder in Gmail. I then set up DKIM by doing the following:
The server's hostname is: mx.northantrim.org
I created that DKIM with:
amavisd-new genrsa mx.northantrim.org.pem
I then check it was in /etc/amavis/conf.d/50-user:
@local_domains_maps = ['mx.northantrim.org'];
dkim_key("mx.northantrim.org","dkim","/var/lib/dkim/mx.northantrim.org.pem");
Then I ran amavisd-new showkeys, got the key, formatted it onto one line and added a TXT DNS record under "dkim._domainkey.mx.northantrim.org". The output of amavisd-new testkeys is:
TESTING#1: dkim._domainkey.mx.northantrim.org => pass
However, when I send an email to a Gmail address, it goes into the spam folder as I said above. Here is the "original message" from Gmail:
Delivered-To: toshibamatt@gmail.com
Received: by 10.194.216.71 with SMTP id oo7csp49636wjc;
Fri, 20 Dec 2013 01:48:09 -0800 (PST)
X-Received: by 10.15.41.140 with SMTP id s12mr3663026eev.50.1387532888897;
Fri, 20 Dec 2013 01:48:08 -0800 (PST)
Return-Path: <write@northantrim.org>
Received: from mx.northantrim.org ([81.4.126.132])
by mx.google.com with ESMTPS id u49si7881096eep.190.2013.12.20.01.48.08
for <toshibamatt@gmail.com>
(version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
Fri, 20 Dec 2013 01:48:08 -0800 (PST)
Received-SPF: pass (google.com: domain of write@northantrim.org designates 81.4.126.132 as permitted sender) client-ip=81.4.126.132;
Authentication-Results: mx.google.com;
spf=pass (google.com: domain of write@northantrim.org designates 81.4.126.132 as permitted sender) smtp.mail=write@northantrim.org
Received: from mail.northantrim.org (localhost.localdomain [127.0.0.1])
by mx.northantrim.org (Postfix) with ESMTPA id 39D4E12D22FD6
for <toshibamatt@gmail.com>; Fri, 20 Dec 2013 04:48:07 -0500 (EST)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8;
format=flowed
Content-Transfer-Encoding: 7bit
Date: Fri, 20 Dec 2013 09:48:07 +0000
From: NorthAntrim <write@northantrim.org>
To: toshibamatt@gmail.com
Subject: DKIM Test
Message-ID: <f0587cf9c5d912416c252cf7ce023282@northantrim.org>
X-Sender: write@northantrim.org
User-Agent: RoundCube Webmail
DKIM test.
What am I doing wrong? My guess is that I've created the DKIM key for the wrong subdomain, but I assumed mx.northantrim.org would have been the right address.
Thanks!
edit: I've created keys for all subdomains and the emails are still going to spam.
TESTING#1: dkim._domainkey.mx.northantrim.org => pass
TESTING#2: dkim._domainkey.northantrim.org => pass
TESTING#3: dkim._domainkey.mail.northantrim.org => pass