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

  • Posted on February 21, 2015
  • lostideaslabAsked by Hossein

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;; 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: <>
X-Mailer: Apple Mail (2.2070.6)
X-Received: by with SMTP id kw5mr1299181lac.3.1424508132789; Sat, 21 Feb 2015 00:42:12 -0800 (PST)
X-Virus-Scanned: Debian amavisd-new at
Content-Transfer-Encoding: 7bit
Received: by with SMTP id d69csp75406iod; Sat, 21 Feb 2015 00:42:13 -0800 (PST)
Received: from ( []) by with ESMTPS id uk4si21263839lbb.68.2015. for <> (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 []) by (Postfix) with ESMTP id D8E491433D1 for <>; Sat, 21 Feb 2015 03:41:39 -0500 (EST)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id X9qQC7NcfMhp for <>; Sat, 21 Feb 2015 03:41:38 -0500 (EST)
Received: from [] ( []) by (Postfix) with ESMTPSA id A339F1433CF for <>; Sat, 21 Feb 2015 03:41:37 -0500 (EST)
Received-Spf: pass ( domain of designates as permitted sender) client-ip=;
Message-Id: <>
Authentication-Results:; spf=pass ( domain of designates as permitted sender); dkim=pass; dmarc=pass (p=REJECT dis=NONE)
Authentication-Results: (amavisd-new); dkim=pass (1024-bit key) reason="pass (just generated, assumed good)"

What could be the cause of the problem?

Thank you

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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 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.

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

gmail should come back with

       spf=pass ( domain of designates as permitted sender);
       dmarc=pass (p=QUARANTINE dis=NONE)

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


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.