me1014960
By:
me1014960

Emails from my domain are recognized as spam by Gmail, Yahoo and ..

February 21, 2015 5.8k views

Hi everyone,

I've installed iRedMail on a fresh droplet to handle email from all my domains but it seems that all famous email providers tag emails from this mail server as spam.

I've already configured DKIM, SPF, DMARC and here is the header of the mail:

Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\))
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lostlang.org; h= x-mailer:mime-version:to:date:date:message-id:subject:subject :content-transfer-encoding:content-type:content-type:from:from; s=dkim; t=1424508098; x=1425372099; bh=FJB8iHRuur+AfNFDbcvmL3TH BgvfxhEUDJ0c8x+p5tA=; b=IxZDVcJQUsbdej1ruA7bjvEcbrviW+EWKefXlekF +E6CGSD7zP5laVgBJPl6sOoCdJY6qZeUt1w/rM4O6zjENlndbXV+CIKad14/4Rxh a+SLXCTpJ1DYPsVH26eb7aExv30Tm9YvnVpx1WPrC9N+GHzP2BJXRwjnSht3HMYh +8g=
Return-Path: <guesthouse@lostlang.org>
X-Mailer: Apple Mail (2.2070.6)
X-Received: by 10.152.204.69 with SMTP id kw5mr1299181lac.3.1424508132789; Sat, 21 Feb 2015 00:42:12 -0800 (PST)
X-Virus-Scanned: Debian amavisd-new at lostideaslang.org
Content-Transfer-Encoding: 7bit
Received: by 10.107.29.72 with SMTP id d69csp75406iod; Sat, 21 Feb 2015 00:42:13 -0800 (PST)
Received: from mail.lostideaslang.org (lostideaslang.org. [188.166.14.83]) by mx.google.com with ESMTPS id uk4si21263839lbb.68.2015.02.21.00.42.10 for <hossein.eud@gmail.com> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 21 Feb 2015 00:42:11 -0800 (PST)
Received: from localhost (localhost [127.0.0.1]) by mail.lostideaslang.org (Postfix) with ESMTP id D8E491433D1 for <hossein.eud@gmail.com>; Sat, 21 Feb 2015 03:41:39 -0500 (EST)
Received: from mail.lostideaslang.org ([127.0.0.1]) by localhost (lostideaslang.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id X9qQC7NcfMhp for <hossein.eud@gmail.com>; Sat, 21 Feb 2015 03:41:38 -0500 (EST)
Received: from [10.59.1.108] (84-75-212-74.dclient.hispeed.ch [84.75.212.74]) by mail.lostideaslang.org (Postfix) with ESMTPSA id A339F1433CF for <hossein.eud@gmail.com>; Sat, 21 Feb 2015 03:41:37 -0500 (EST)
Delivered-To: hossein.eud@gmail.com
Received-Spf: pass (google.com: domain of guesthouse@lostlang.org designates 188.166.14.83 as permitted sender) client-ip=188.166.14.83;
Message-Id: <5F0A2E89-DC63-4D94-882D-A7AA0ABC3BB3@lostlang.org>
Authentication-Results: mx.google.com; spf=pass (google.com: domain of guesthouse@lostlang.org designates 188.166.14.83 as permitted sender) smtp.mail=guesthouse@lostlang.org; dkim=pass header.i=@lostlang.org; dmarc=pass (p=REJECT dis=NONE) header.from=lostlang.org
Authentication-Results: lostideaslang.org (amavisd-new); dkim=pass (1024-bit key) reason="pass (just generated, assumed good)" header.d=lostlang.org
Test

What could be the cause of the problem?

Thank you

2 Answers

It doesn't look like you have your dkim setup correctly.

gmail should come back with

Authentication-Results: mx.google.com;
       spf=pass (google.com: domain of user@domain.com designates 1.2.3.4 as permitted sender) smtp.mail=user@domain.com;
       dkim=pass header.i=@domain.com;
       dmarc=pass (p=QUARANTINE dis=NONE) header.from=domain.com

Your mail.domainkey txt record is wrong. It is a CNAME pointing back to your SPF record. It should be a TXT record. Looking something like


;; ANSWER SECTION:
mail._domainkey.domain.com. 117 IN TXT   "v=DKIM1\; p=MIGfMA0GCSqGS..."

If using amavis run "amavisd-new showkeys" it will give you the info for the TXT record to past in your dns

"amavisd-new testkeys" will report success or not.

I checked the common email blacklist site and you have a clean ip. The big boys may have a different list to work off of. So no guarantee this will solve your problem.

  • Here is the authentication part of new email:

    Authentication-Results: mx.google.com; 
    spf=pass (google.com: domain of guesthouse@lostlang.org designates 188.166.14.83 as permitted sender) smtp.mail=guesthouse@lostlang.org;
    dkim=pass header.i=@lostlang.org; 
    dmarc=pass (p=QUARANTINE dis=NONE) header.from=lostlang.org
    Authentication-Results: lostideaslang.org (amavisd-new); 
    dkim=pass (1024-bit key) reason="pass (just generated, assumed good)" header.d=lostlang.org
    

    and the amasvid test:

    root@lostideaslang:~# amavisd-new testkeys
         TESTING#1: dkim._domainkey.mail.lostideaslang.org => pass
         TESTING#2: dkim._domainkey.lostlang.org      => pass
    

    and about the domain key

    dkim._domainkey.lostlang.org. 1800 IN TXT "v=DKIM1; p="   "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCiRRMfXkhff1XfjEL9L5HxxgcP"   "YTWxnIqktdIXK7o87AbUyEh0sNG5nGVi1uZgDNRkC7tugBxs8Q9e/ohvDhIzijUn"   "9EiuZtFiz/3eA5L/4kyYuaiHR3roCx4yg2REINLaba9hH3XraerKIslUrmriIYAA"   "KbteeUXGFkBI2WpKJQIDAQAB"
    

    Everything seems fine for my understanding, so where is the problem?

Ok everything looks good. I must have missed the dkim=pass in you first post. I swear I didn't see it before must have been asleep. Sorry about that.

You do have mail._domainkey.lostideaslang as a CNAME for your spf record. You don't need this but it shouldn't hurt anything either.

Might want to set your v=DMARC1;p=quarantine to p=none for testing. You will still get reports back.

The include:lostideaslang.org shouldn't be needed since its the same ip as your server. Again don't think it would hurt anything.

The only other thing it might be the ip is blacklisted by the major isps. Only solution is snapshot server and try rebuilding it on a new ip.

Hopefully someone else might have the answer.

Sorry couldn't be more help.

  • Thank you. You were right about spf and I tried with a new droplet but difference.
    but thanks any way

Have another answer? Share your knowledge.