Jump to content

DKIM not authorizing on mail sent with PHPMailer


jgoslow

Recommended Posts

I'm getting a DKIM fail (wrong body hash...etc) when mail on my web page is sent through PHPMailer.  But then when I'm mailing through form-mail or through console in postfix I don't have that problem.  Any thoughts?  Here are the differing DKIM results for same content emailed (different emails but I've created working accounts for both).

 

And while I've gotten DKIM to work, I've had a hell of a time finding a good article for setting up DomainKeys, and also hear from people that setting up both at once is a bad idea...  any thoughts?

 

Authentication Report from Port25 and Corresponding Email Headers

 

Email sent through PHPMailer

 

DKIM check details:

----------------------------------------------------------

Result:        fail (wrong body hash: expected zs0h039WXDmYj/DyEVaqoMLMLUGh9XafN3uOaGLLAzA=)

ID(s) verified:

Canonicalized Headers:

  To:'20'check-auth@verifier.port25.com'0D''0A'

  Subject:'20'Y2G'20'listing'20'-'20'adf'0D''0A'

  From:'20'Yards'20'to'20'Gardens'20'<noreply@sampledomain.org>'0D''0A'

  DKIM-Signature:'20'v=1;'20'a=rsa-sha256;'20'c=simple/simple;'20'd=y2g.org;'20's=mail;'0D''0A'

  '09't=1243893032;'20'bh=ATEnt0ZVoJb5vgXzkjHMFOumylKeHW35o6Xt3TLEYGs=;'0D''0A'

  '09'h=To:Subject:From:Reply-To:Message-Id:Date;'20'b=

 

Canonicalized Body:

  Reply-To:'20'Yards'20'to'20'Gardens'20'<noreply@sampledomain.org>'0D''0A'

  '0D''0A'

  X-Mailer:'20'PHP/5.2.4-2ubuntu5.5'0D''0A'

  Message-Id:'20'<20090601215032.A822767@mail.sampledomain.org>'0D''0A'

  Date:'20'Mon,'20''20'1'20'Jun'20'2009'20'21:50:32'20'+0000'20'(UTC)'0D''0A'

  '0D''0A'

  Confirmation'20'Email'0D''0A'

  '0D''0A'

  '0D''0A'

 

 

<<Message Content>>

 

 

DNS record(s):

 

NOTE: DKIM checking has been performed based on the latest DKIM specs

(RFC 4871 or draft-ietf-dkim-base-10) and verification may fail for

older versions.  If you are using Port25's PowerMTA, you need to use

version 3.2r11 or later to get a compatible version of DKIM.

 

Original Email Headers:

 

Return-Path: <www-data@sampledomain.org>

Received: from mail.sampledomain.org (67.23.0.165) by verifier.port25.com (PowerMTA v3.6a1) id h4h5te0hse8p for <check-auth@verifier.port25.com>; Mon, 1 Jun 2009 17:44:55 -0400 (envelope-from <www-data@sampledomain.org>)

Authentication-Results: verifier.port25.com smtp.mail=www-data@sampledomain.org; mfrom=pass;

Authentication-Results: verifier.port25.com header.From=noreply@sampledomain.org; domainkeys=neutral (message not signed);

Authentication-Results: verifier.port25.com; dkim=fail (wrong body hash: expected zs0h039WXDmYj/DyEVaqoMLMLUGh9XafN3uOaGLLAzA=);

Authentication-Results: verifier.port25.com header.From=noreply@sampledomain.org; pra=pass;

Received: by mail.sampledomain.org (Postfix, from userid 33)

id A822767; Mon,  1 Jun 2009 21:50:32 +0000 (UTC)

DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=sampledomain.org; s=mail;

t=1243893032; bh=ATEnt0ZVoJb5vgXzkjHMFOumylKeHW35o6Xt3TLEYGs=;

h=To:Subject:From:Reply-To:Message-Id:Date; b=LgRjGBMxZ2RqXcK42kEI1

A2Vp7XBNlMSjV3eCAy/vtR0eE5yT/PYecVW5EWC0gKWOU5zE7SP9SDeWGI8YomuOeAs

77r/Fx4RiUhjSw5hyCd6809svDF4AILyTTXGUXFYJRzfnsnXShi7INlt1sqA4WM3XwM

ZwWrby4BgOhLYp4g=

To: check-auth@verifier.port25.com

Subject: Y2G listing - adf

From: Yards to Gardens <noreply@sampledomain.org>

Message-ID: <0.0.0.3.1C9E30233E49ED4.0@verifier.port25.com>

 

Reply-To: Yards to Gardens <noreply@sampledomain.org>

 

X-Mailer: PHP/5.2.4-2ubuntu5.5

Message-Id: <20090601215032.A822767@mail.sampledomain.org>

Date: Mon,  1 Jun 2009 21:50:32 +0000 (UTC)

 

 

 

Email sent through console mail function

 

DKIM check details:

----------------------------------------------------------

Result:        pass (matches From: jgoslow@sampledomain.org)

ID(s) verified: header.d=sampledomain.org

Canonicalized Headers:

  To:'20'check-auth@verifier.port25.com'0D''0A'

  Subject:'20'Bigger'20'message?'0D''0A'

  Message-Id:'20'<20090602030624.A078368@mail.sampledomain.org>'0D''0A'

  Date:'20'Tue,'20''20'2'20'Jun'20'2009'20'03:06:24'20'+0000'20'(UTC)'0D''0A'

  From:'20'jgoslow@sampledomain.org'20'(J'20'Goslow)'0D''0A'

  DKIM-Signature:'20'v=1;'20'a=rsa-sha256;'20'c=simple/simple;'20'd=y2g.org;'20's=mail;'0D''0A'

  '09't=1243911984;'20'bh=ATEnt0ZVoJb5vgXzkjHMFOumylKeHW35o6Xt3TLEYGs=;'0D''0A'

  '09'h=To:Subject:Message-Id:Date:From;'20'b=

 

Canonicalized Body:

  Confirmation'20'Email'0D''0A'

  '0D''0A'

  '0D''0A'

 

<<Message Content>>

 

 

DNS record(s):

  mail._domainkey.sampledomain.org. 86400 IN TXT "k=rsa; t=y; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDcBtIDnq/J0G1aWGrtZubPeOGeof1GhlOOcXTjpqIRCOZ0av8trYTb417PpG/sOF2aQzpq5TYMlCpvhKb7lwTshI7BwXl/poyjVyAVbIdmBYWzYtryQr4FguQjI+k6LX6gsgvT+s5gcdLffAlxHLMnv9lJUTZxjrq6dPZNdpk4LwIDAQAB"

 

NOTE: DKIM checking has been performed based on the latest DKIM specs

(RFC 4871 or draft-ietf-dkim-base-10) and verification may fail for

older versions.  If you are using Port25's PowerMTA, you need to use

version 3.2r11 or later to get a compatible version of DKIM.

 

 

And the original working Email Headers:

 

Return-Path: <jgoslow@sampledomain.org>

Received: from mail.y2g.org (67.23.0.165) by verifier.port25.com (PowerMTA v3.6a1) id h4ib000hse87 for <check-auth@verifier.port25.com>; Mon, 1 Jun 2009 23:01:20 -0400 (envelope-from <jgoslow@sampledomain.org>)

Authentication-Results: verifier.port25.com smtp.mail=jgoslow@sampledomain.org; mfrom=pass;

Authentication-Results: verifier.port25.com header.From=jgoslow@sampledomain.org; domainkeys=neutral (message not signed);

Authentication-Results: verifier.port25.com header.d=sampledomain.org; dkim=pass (matches From: jgoslow@sampledomain.org);

Authentication-Results: verifier.port25.com header.From=jgoslow@sampledomain.org; pra=pass;

Received: by mail.sampledomain.org (Postfix, from userid 1000)

id A078368; Tue,  2 Jun 2009 03:06:24 +0000 (UTC)

DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=y2g.org; s=mail;

t=1243911984; bh=ATEnt0ZVoJb5vgXzkjHMFOumylKeHW35o6Xt3TLEYGs=;

h=To:Subject:Message-Id:Date:From; b=gEGxkU/8G5An+Mdp6Z0xH899S6Ec02

Kz++jJJrrOGyfOi7+3KqdW9BEJSkvdK/9os/Jjrf9GtEdEUXZgu+0HmRBOsjEELtUGA

IryuoennuRp5eTxnx/avoDotROvHohTQMw0FfcUyP8doC18QbvZPwWLGQX3aAxLlqAz

qXInNqI=

To: check-auth@verifier.port25.com

Subject: Bigger message?

Message-Id: <20090602030624.A078368@mail.sampledomain.org>

Date: Tue,  2 Jun 2009 03:06:24 +0000 (UTC)

From: jgoslow@sampledomain.org (J Goslow)

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.