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: email@example.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: <firstname.lastname@example.org> Received: from mydomain.com (newsletter.mydomain.com. [220.127.116.11]) by mx.google.com with ESMTP id gu10si1702677icb.68.2013.07.02.10.28.16 for <email@example.com>; Tue, 02 Jul 2013 10:28:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of firstname.lastname@example.org designates 18.104.22.168 as permitted sender) client-ip=22.214.171.124; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of email@example.com designates 126.96.36.199 as permitted sender) firstname.lastname@example.org; dkim=pass email@example.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: firstname.lastname@example.org Subject: mydomain | Subject Details MIME-Version: 1.0 From: mydomain <email@example.com> 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. I am using opendkim with postfix on linux server.