jgoslow Posted June 2, 2009 Share Posted June 2, 2009 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'[email protected]'0D''0A' Subject:'20'Y2G'20'listing'20'-'20'adf'0D''0A' From:'20'Yards'20'to'20'Gardens'20'<[email protected]>'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'<[email protected]>'0D''0A' '0D''0A' X-Mailer:'20'PHP/5.2.4-2ubuntu5.5'0D''0A' Message-Id:'20'<[email protected]>'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: <[email protected]> Received: from mail.sampledomain.org (67.23.0.165) by verifier.port25.com (PowerMTA v3.6a1) id h4h5te0hse8p for <[email protected]>; Mon, 1 Jun 2009 17:44:55 -0400 (envelope-from <[email protected]>) Authentication-Results: verifier.port25.com [email protected]; mfrom=pass; Authentication-Results: verifier.port25.com [email protected]; domainkeys=neutral (message not signed); Authentication-Results: verifier.port25.com; dkim=fail (wrong body hash: expected zs0h039WXDmYj/DyEVaqoMLMLUGh9XafN3uOaGLLAzA=); Authentication-Results: verifier.port25.com [email protected]; 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: [email protected] Subject: Y2G listing - adf From: Yards to Gardens <[email protected]> Message-ID: <[email protected]> Reply-To: Yards to Gardens <[email protected]> X-Mailer: PHP/5.2.4-2ubuntu5.5 Message-Id: <[email protected]> Date: Mon, 1 Jun 2009 21:50:32 +0000 (UTC) Email sent through console mail function DKIM check details: ---------------------------------------------------------- Result: pass (matches From: [email protected]) ID(s) verified: header.d=sampledomain.org Canonicalized Headers: To:'20'[email protected]'0D''0A' Subject:'20'Bigger'20'message?'0D''0A' Message-Id:'20'<[email protected]>'0D''0A' Date:'20'Tue,'20''20'2'20'Jun'20'2009'20'03:06:24'20'+0000'20'(UTC)'0D''0A' From:'20'[email protected]'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: <[email protected]> Received: from mail.y2g.org (67.23.0.165) by verifier.port25.com (PowerMTA v3.6a1) id h4ib000hse87 for <[email protected]>; Mon, 1 Jun 2009 23:01:20 -0400 (envelope-from <[email protected]>) Authentication-Results: verifier.port25.com [email protected]; mfrom=pass; Authentication-Results: verifier.port25.com [email protected]; domainkeys=neutral (message not signed); Authentication-Results: verifier.port25.com header.d=sampledomain.org; dkim=pass (matches From: [email protected]); Authentication-Results: verifier.port25.com [email protected]; 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: [email protected] Subject: Bigger message? Message-Id: <[email protected]> Date: Tue, 2 Jun 2009 03:06:24 +0000 (UTC) From: [email protected] (J Goslow) Quote Link to comment https://forums.phpfreaks.com/topic/160590-dkim-not-authorizing-on-mail-sent-with-phpmailer/ Share on other sites More sharing options...
gizmola Posted June 2, 2009 Share Posted June 2, 2009 What is your mta? Is phpmailer sending email directly? Quote Link to comment https://forums.phpfreaks.com/topic/160590-dkim-not-authorizing-on-mail-sent-with-phpmailer/#findComment-847523 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.