Search code examples
spampostfix-mtaphpspam-preventiondkim

DKIM SPF passes but mail goes to Spam Received: (from abc@localhost)


I am facing an issue with the DKIM setup. We are sending newsletters which are going to spam in gmail. The dkim & spf passes. Even the reverse dns is setup properly. Below is a copy of mail headers that I see in gmail.

Delivered-To: xyz@gmail.com Received: by 10.112.29.116 with SMTP id j20csp27976lbh; Tue, 2 Jul 2013 10:28:18 -0700 (PDT) X-Received: by 10.50.11.103 with SMTP id p7mr22069045igb.24.1372786097413; Tue, 02 Jul 2013 10:28:17 -0700 (PDT)

Return-Path: Received: from mydomain.com (newsletter.mydomain.com. [108.171.163.8]) by mx.google.com with ESMTP id gu10si1702677icb.68.2013.07.02.10.28.16 for ; Tue, 02 Jul 2013 10:28:17 -0700 (PDT)

Received-SPF: pass (google.com: best guess record for domain of abc@mydomain.com designates 108.171.163.8 as permitted sender) client-ip=108.171.163.8; Authentication-Results: mx.google.com;

spf=pass (google.com: best guess record for domain of abc@mydomain.com designates 108.171.163.8 as permitted sender) smtp.mail=abc@mydomain.com; dkim=pass header.i=@mydomain.com Received: from mydomain.com (mydomain.com [127.0.0.1]) by mydomain.com (Postfix) with ESMTP id 4A47318970; Tue, 2 Jul 2013 17:30:38 +0000 (UTC)

DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mydomain.com; s=default; t=1372786238; bh=s49+JPD0rpGLWWNhx0l6oMGPXzMHX4Adnh2xr6Q+4Iw=; h=Date:Message-Id:To:Subject:MIME-Version:From:Content-Type; b=NCmIyPQwp48nXJBpYdaVcmopJgOoLZ7H9KRcJ/o/HW2ZEZLRXreVwHRPWFI+s0h70 iVZPKVemBlAXtaL9T1hQOC61YVS//k3CEmUR732Axnz96dnJFbe5YtiD+mJN7dRZeL Z7sf44NVi2E5EMWV7bi/RU7py0LNNo9Lp6KfzZLA=

Received: (from abc@localhost) by mydomain.com (8.14.5/8.14.5/Submit) id r62HUcoh028894;

Tue, 2 Jul 2013 17:30:38 GMT Date: Tue, 2 Jul 2013 17:30:38 GMT Message-Id: <201307021730.r62HUcoh028894@mydomain.com> To: xyz@gmail.com Subject: mydomain | Subject Details MIME-Version: 1.0 From: mydomain Content-Type: multipart/alternative;boundary=np51d30e1a36dd3

I Think so the Received: (from abc@localhost) is causing the issue.

What I need to know how to resolve it. Instead of localhost it should use mydomain.com This is my first time setting up such kind of server.


Solution

  • This may be the problem with the envelope sender and from address because,an email has two addresses associated with sending it: the envelope sender, and the From: address. The envelope sender is where computers should respond (in the case of bounce messages or errors); the From: address is where people should respond. In most cases, the envelope sender and the From: address match.Some case the Gmail put the mails which the 2 sender field did not match. You may try with the same.