We are running into trouble with signing our outgoing mailings with DKIM using opendkim as a filter for Postfix.

我们在使用opendkim作为Postfix的过滤器时,与DKIM签署了我们的发送邮件,这让我们陷入了麻烦。

This issue only occurs when sending HTML emails from phpList. All other text mailings and mailings from other services sign correctly and verify. phpList uses phpMailer as the engine.

这个问题只发生在从phpList发送HTML邮件时。其他服务的其他文本邮件和邮件正确无误并进行验证。phpList使用phpMailer作为引擎。

If we send the mailing as "text", then we have no problem. If we send the mailing as "HTML" then body hash fails.

如果我们将邮件发送为“文本”,那么我们就没有问题了。如果我们将邮件发送为“HTML”,那么body哈希就失败了。

This problem existed in v2, however we used to force phpList to ONLY send as HTML.

这个问题存在于v2中,但是我们使用了强制phpList作为HTML发送。

This error occurs when sending the message as a joint HTML and TEXT email (which is the default in v3).

当将消息作为一个联合HTML和文本电子邮件发送(这是v3中的缺省值)时,就会出现此错误。

I presume it's something to do with line breaks/returns.

我想这与换行/退货有关。

Can somebody point us in the right direction?

有人能指出正确的方向吗?

Thanks for your help in advance.

谢谢你的帮助。

Port25 verifier service - a message that passes DKIM (Text only)

Port25验证器服务——传递DKIM的消息(只发送文本)

==========================================================
Summary of Results
==========================================================
SPF check:          pass
DomainKeys check:   neutral
DKIM check:         pass
Sender-ID check:    pass
SpamAssassin check: ham

==========================================================
Details:
==========================================================


----------------------------------------------------------
DomainKeys check details:
----------------------------------------------------------
Result:         neutral (message not signed)
ID(s) verified: header.From=updates@flyawaysimulation.com
DNS record(s):

----------------------------------------------------------
DKIM check details:
----------------------------------------------------------
Result:         pass (matches From: updates@flyawaysimulation.com)
ID(s) verified: header.d=flyawaysimulation.com
Canonicalized Headers:
    to:check-auth-ryan=rbftpnetworks.com@verifier.port25.com'0D''0A'
    subject:Test'20'123'0D''0A'
    date:Thu,'20'18'20'Sep'20'2014'20'21:50:35'20'+0100'0D''0A'
    from:Fly'20'Away'20'Simulation'20'<updates@flyawaysimulation.com>'0D''0A'
    reply-to:Fly'20'Away'20'Simulation'20'<updates@flyawaysimulation.com>'0D''0A'
    list-help:<https://flyawaysimulation.com/lists/?p=preferences&uid=1e629246241f8e9714134ee8076ad406>'0D''0A'
    list-unsubscribe:<https://flyawaysimulation.com/lists/?p=unsubscribe&uid=1e629246241f8e9714134ee8076ad406&jo=1>'0D''0A'
    list-subscribe:<https://flyawaysimulation.com/lists/?p=subscribe>'0D''0A'
    list-owner:<mailto:abuse@flyawaysimulation.com>'0D''0A'
    dkim-signature:v=1;'20'a=rsa-sha256;'20'c=relaxed/simple;'20'd=flyawaysimulation.com;'20's=mail;'20't=1411073436;'20'bh=hhSjWh2jttCh3y1SOIZzUVlxN+KYTuNZ+eh16bzchHc=;'20'h=To:Subject:Date:From:Reply-To:List-Help:List-Unsubscribe:'20'List-Subscribe:List-Owner;'20'b=

Canonicalized Body:
    '20'test'20'123'0D''0A'
    '0D''0A'
    '0D''0A'
    '0D''0A'
    '20''20''0D''0A'


DNS record(s):
    mail._domainkey.flyawaysimulation.com. 3600 IN TXT "v=DKIM1;p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDimrx9MV1sFyUCVPeH6SFMBy7Cb2AU6aB9i3GazP7QKWG5pWWkFEurFImNbwi4wKz6dtKQeEkcGzPdzyeD+hXaSG2sl86T4pnwIxUaBMlW+FWfaNx0XPphacPAYjtkJGVoZGmmIbK3tH8HLZqdCEy6YIKd0kNSXQqFEMQseHaR6wIDAQAB"

Public key used for verification: mail._domainkey.flyawaysimulation.com (1024 bits)

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

Return-Path: <updates@flyawaysimulation.com>
Received: from web3.rbftpnetworks.net (195.224.144.101) by verifier.port25.com id h3d2q211u9cu for <check-auth-ryan=rbftpnetworks.com@verifier.port25.com>; Thu, 18 Sep 2014 16:50:41 -0400 (envelope-from <updates@flyawaysimulation.com>)
Authentication-Results: verifier.port25.com; spf=pass smtp.mailfrom=updates@flyawaysimulation.com
Authentication-Results: verifier.port25.com; domainkeys=neutral (message not signed) header.From=updates@flyawaysimulation.com
Authentication-Results: verifier.port25.com; dkim=pass (matches From: updates@flyawaysimulation.com) header.d=flyawaysimulation.com
Authentication-Results: verifier.port25.com; sender-id=pass header.From=updates@flyawaysimulation.com
Received: by web3.rbftpnetworks.net (Postfix, from userid 70)
    id 2FF6D3E2B4BC; Thu, 18 Sep 2014 21:50:35 +0100 (BST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
    d=flyawaysimulation.com; s=mail; t=1411073436;
    bh=hhSjWh2jttCh3y1SOIZzUVlxN+KYTuNZ+eh16bzchHc=;
    h=To:Subject:Date:From:Reply-To:List-Help:List-Unsubscribe:
     List-Subscribe:List-Owner;
    b=kz3pyKnsxvzKKc9I764d8xwTxMQkJNcdHSup9+BOoNujSXTOyyAM1tpc5QWIhGMa4
     NOwsePDv5qfladW3kAh7TuwWW9geH6gdV9PhHF5RCg6jyHHbUY8t4mpIcW7w4yNuIK
     BMMbXk4+puGpEKdyRgfGKXxYjI0bVKK1Ck2vdb5Q=
To: check-auth-ryan=rbftpnetworks.com@verifier.port25.com
Subject: Test 123
Received: from host81-138-131-190.in-addr.btopenworld.com [81.138.131.190] by flyawaysimulation.com with HTTP; Thu, 18 Sep 2014 21:50:35 +0100
Date: Thu, 18 Sep 2014 21:50:35 +0100
From: Fly Away Simulation <updates@flyawaysimulation.com>
Reply-To: Fly Away Simulation <updates@flyawaysimulation.com>
Message-ID: <535768d2df1f49b5df91d9b010abeba9@flyawaysimulation.com>
X-Priority: 3
X-Mailer: PHPMailer 5.2.5 (https://github.com/Synchro/PHPMailer/)
X-phpList-version: 3.0.7
X-MessageID: 8
X-ListMember: check-auth-ryan=rbftpnetworks.com@verifier.port25.com
Precedence: bulk
Bounces-To: updates@flyawaysimulation.com
List-Help: <https://flyawaysimulation.com/lists/?p=preferences&uid=1e629246241f8e9714134ee8076ad406>
List-Unsubscribe: <https://flyawaysimulation.com/lists/?p=unsubscribe&uid=1e629246241f8e9714134ee8076ad406&jo=1>
List-Subscribe: <https://flyawaysimulation.com/lists/?p=subscribe>
List-Owner: <mailto:abuse@flyawaysimulation.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset=UTF-8

 test 123

Port25 verifier service - a message that fails DKIM (Text/HTML email)

端口25验证器服务——一个失败的消息(文本/HTML电子邮件)

==========================================================
Summary of Results
==========================================================
SPF check:          pass
DomainKeys check:   neutral
DKIM check:         fail
Sender-ID check:    pass
SpamAssassin check: ham

==========================================================
Details:
==========================================================


----------------------------------------------------------
DKIM check details:
----------------------------------------------------------
Result:         fail (wrong body hash: expected nb2kCq5nNBE+IfyLiAIH9t/9x7Kk5PpCb+1GdO/wiJ8=)
ID(s) verified: 
Canonicalized Headers:
    to:check-auth-ryan=rbftpnetworks.com@verifier.port25.com'0D''0A'
    subject:Test'20'123'0D''0A'
    date:Thu,'20'18'20'Sep'20'2014'20'21:52:19'20'+0100'0D''0A'
    from:Fly'20'Away'20'Simulation'20'<updates@flyawaysimulation.com>'0D''0A'
    reply-to:Fly'20'Away'20'Simulation'20'<updates@flyawaysimulation.com>'0D''0A'
    list-help:<https://flyawaysimulation.com/lists/?p=preferences&uid=1e629246241f8e9714134ee8076ad406>'0D''0A'
    list-unsubscribe:<https://flyawaysimulation.com/lists/?p=unsubscribe&uid=1e629246241f8e9714134ee8076ad406&jo=1>'0D''0A'
    list-subscribe:<https://flyawaysimulation.com/lists/?p=subscribe>'0D''0A'
    list-owner:<mailto:abuse@flyawaysimulation.com>'0D''0A'
    dkim-signature:v=1;'20'a=rsa-sha256;'20'c=relaxed/simple;'20'd=flyawaysimulation.com;'20's=mail;'20't=1411073540;'20'bh=XMTdnEvx/N4aZB10KoQqWOQW+MUVFvU66kqiSqm0XKc=;'20'h=To:Subject:Date:From:Reply-To:List-Help:List-Unsubscribe:'20'List-Subscribe:List-Owner;'20'b=

Canonicalized Body:
    --b1_b4a02db1226bc348457a47d51e902619'0D''0A'
    Content-Type:'20'text/plain;'20'charset=UTF-8'0D''0A'
    Content-Transfer-Encoding:'20'quoted-printable'0D''0A'
    '0D''0A'
    '20'test'20'123'0D''0A'
    '0D''0A'
    '0D''0A'
    '0D''0A'
    '0D''0A'
    '0D''0A'
    '0D''0A'
    '0D''0A'
    '20'=20'0D''0A'
    '0D''0A'
    '0D''0A'
    '0D''0A'
    --b1_b4a02db1226bc348457a47d51e902619'0D''0A'
    Content-Type:'20'text/html;'20'charset=UTF-8'0D''0A'
    Content-Transfer-Encoding:'20'quoted-printable'0D''0A'
    '0D''0A'
    <html><head>=0A'20''20''20''20''20''20''20''20'<meta'20'content=3D"text/html;charset=3DUTF-8"'20'http-equ='0D''0A'
    '0D''0A'
    iv=3D"Content-Type">=0A'20''20''20''20''20''20''20''20'<title></title></head><body><p>&nbsp;test'20'12='0D''0A'
    '0D''0A'
    3</p>=0A<img'20'src=3D"https://flyawaysimulation.com/lists/ut.php?u=3D1e629246='0D''0A'
    '0D''0A'
    241f8e9714134ee8076ad406&amp;m=3D8"'20'width=3D"1"'20'height=3D"1"'20'border=3D"0"'20'/='0D''0A'
    '0D''0A'
    ></body></html>'0D''0A'
    '0D''0A'
    '0D''0A'
    --b1_b4a02db1226bc348457a47d51e902619--'0D''0A'


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

Return-Path: <updates@flyawaysimulation.com>
Received: from web3.rbftpnetworks.net (195.224.144.101) by verifier.port25.com id h3d30c11u9cb for <check-auth-ryan=rbftpnetworks.com@verifier.port25.com>; Thu, 18 Sep 2014 16:52:22 -0400 (envelope-from <updates@flyawaysimulation.com>)
Authentication-Results: verifier.port25.com; spf=pass smtp.mailfrom=updates@flyawaysimulation.com
Authentication-Results: verifier.port25.com; domainkeys=neutral (message not signed) header.From=updates@flyawaysimulation.com
Authentication-Results: verifier.port25.com; dkim=fail (wrong body hash: expected nb2kCq5nNBE+IfyLiAIH9t/9x7Kk5PpCb+1GdO/wiJ8=) 
Authentication-Results: verifier.port25.com; sender-id=pass header.From=updates@flyawaysimulation.com
Received: by web3.rbftpnetworks.net (Postfix, from userid 70)
    id 014C83E2B53F; Thu, 18 Sep 2014 21:52:19 +0100 (BST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
    d=flyawaysimulation.com; s=mail; t=1411073540;
    bh=XMTdnEvx/N4aZB10KoQqWOQW+MUVFvU66kqiSqm0XKc=;
    h=To:Subject:Date:From:Reply-To:List-Help:List-Unsubscribe:
     List-Subscribe:List-Owner;
    b=OXitjsekFORKng9NPtJ7GSrKROUf+EGj/zetZ7ZoXWGeZerr2+IUNFgSZcNPjub5M
     VazJtwOMRZ5g7r6SrUWjPfkpDH6nt3qecOW2E000ftsWwv78wPtD4mc0OIN/IsY52h
     vk+mbHrQb4ToUHmxIGRIfB/NOdDiXG7Gp+aVrgRY=
To: check-auth-ryan=rbftpnetworks.com@verifier.port25.com
Subject: Test 123
Received: from host81-138-131-190.in-addr.btopenworld.com [81.138.131.190] by flyawaysimulation.com with HTTP; Thu, 18 Sep 2014 21:52:19 +0100
Date: Thu, 18 Sep 2014 21:52:19 +0100
From: Fly Away Simulation <updates@flyawaysimulation.com>
Reply-To: Fly Away Simulation <updates@flyawaysimulation.com>
Message-ID: <b4a02db1226bc348457a47d51e902619@flyawaysimulation.com>
X-Priority: 3
X-Mailer: PHPMailer 5.2.5 (https://github.com/Synchro/PHPMailer/)
X-phpList-version: 3.0.7
X-MessageID: 8
X-ListMember: check-auth-ryan=rbftpnetworks.com@verifier.port25.com
Precedence: bulk
Bounces-To: updates@flyawaysimulation.com
List-Help: <https://flyawaysimulation.com/lists/?p=preferences&uid=1e629246241f8e9714134ee8076ad406>
List-Unsubscribe: <https://flyawaysimulation.com/lists/?p=unsubscribe&uid=1e629246241f8e9714134ee8076ad406&jo=1>
List-Subscribe: <https://flyawaysimulation.com/lists/?p=subscribe>
List-Owner: <mailto:abuse@flyawaysimulation.com>
MIME-Version: 1.0
Content-Type: multipart/alternative;
    boundary="b1_b4a02db1226bc348457a47d51e902619"

--b1_b4a02db1226bc348457a47d51e902619
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

 test 123







 =20



--b1_b4a02db1226bc348457a47d51e902619
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<html><head>=0A        <meta content=3D"text/html;charset=3DUTF-8" http-equ=

iv=3D"Content-Type">=0A        <title></title></head><body><p>&nbsp;test 12=

3</p>=0A<img src=3D"https://flyawaysimulation.com/lists/ut.php?u=3D1e629246=

241f8e9714134ee8076ad406&amp;m=3D8" width=3D"1" height=3D"1" border=3D"0" /=

> </body></html>


--b1_b4a02db1226bc348457a47d51e902619--

phpMailer version 5.2.5 (packaged with phpList)

phpMailer版本5.2.5(用phpList打包)

UPDATE: We can pass the DKIM verification check on Port25's tester if we enable "FixCRLF yes" in the opendkim config. However, this still FAILS Gmail DKIM verification.

更新:如果我们在opendkim配置中启用“FixCRLF yes”,我们可以在Port25的测试器上通过DKIM验证检查。但是,这仍然失败了Gmail DKIM的验证。

Test output of passed message with "FixCRLF yes":

用“FixCRLF yes”测试传递的消息的输出:

==========================================================
Summary of Results
==========================================================
SPF check:          pass
DomainKeys check:   neutral
DKIM check:         pass
Sender-ID check:    pass
SpamAssassin check: ham


----------------------------------------------------------
DomainKeys check details:
----------------------------------------------------------
Result:         neutral (message not signed)
ID(s) verified: header.From=updates@flyawaysimulation.com
DNS record(s):

----------------------------------------------------------
DKIM check details:
----------------------------------------------------------
Result:         pass (matches From: updates@flyawaysimulation.com)
ID(s) verified: header.d=flyawaysimulation.com
Canonicalized Headers:
    to:check-auth-ryan=rbftpnetworks.com@verifier.port25.com'0D''0A'
    subject:Test'20'123'0D''0A'
    date:Sun,'20'21'20'Sep'20'2014'20'15:57:46'20'+0100'0D''0A'
    from:Fly'20'Away'20'Simulation'20'<updates@flyawaysimulation.com>'0D''0A'
    reply-to:Fly'20'Away'20'Simulation'20'<updates@flyawaysimulation.com>'0D''0A'
    list-help:<https://flyawaysimulation.com/lists/?p=preferences&uid=1e629246241f8e9714134ee8076ad406>'0D''0A'
    list-unsubscribe:<https://flyawaysimulation.com/lists/?p=unsubscribe&uid=1e629246241f8e9714134ee8076ad406&jo=1>'0D''0A'
    list-subscribe:<https://flyawaysimulation.com/lists/?p=subscribe>'0D''0A'
    list-owner:<mailto:abuse@flyawaysimulation.com>'0D''0A'
    dkim-signature:v=1;'20'a=rsa-sha256;'20'c=relaxed/simple;'20'd=flyawaysimulation.com;'20's=mail;'20't=1411311466;'20'bh=PUR9ib4HOSSj9G3jmXSCyzc1LAtqQeyWPSAii67TLd8=;'20'h=To:Subject:Date:From:Reply-To:List-Help:List-Unsubscribe:'20'List-Subscribe:List-Owner;'20'b=

Canonicalized Body:
    --b1_4ecb49f93b720bc688fe3bcdcafed5b0'0D''0A'
    Content-Type:'20'text/plain;'20'charset=UTF-8'0D''0A'
    Content-Transfer-Encoding:'20'quoted-printable'0D''0A'
    '0D''0A'
    '20'test'20'123'0D''0A'
    '0D''0A'
    '0D''0A'
    '0D''0A'
    '0D''0A'
    '0D''0A'
    '0D''0A'
    '0D''0A'
    '20'=20'0D''0A'
    '0D''0A'
    '0D''0A'
    '0D''0A'
    --b1_4ecb49f93b720bc688fe3bcdcafed5b0'0D''0A'
    Content-Type:'20'text/html;'20'charset=UTF-8'0D''0A'
    Content-Transfer-Encoding:'20'quoted-printable'0D''0A'
    '0D''0A'
    <html><head>=0A'20''20''20''20''20''20''20''20'<meta'20'content=3D"text/html;charset=3DUTF-8"'20'http-equ='0D''0A'
    '0D''0A'
    iv=3D"Content-Type">=0A'20''20''20''20''20''20''20''20'<title></title></head><body><p>&nbsp;test'20'12='0D''0A'
    '0D''0A'
    3</p>=0A<img'20'src=3D"https://flyawaysimulation.com/lists/ut.php?u=3D1e629246='0D''0A'
    '0D''0A'
    241f8e9714134ee8076ad406&amp;m=3D8"'20'width=3D"1"'20'height=3D"1"'20'border=3D"0"'20'/='0D''0A'
    '0D''0A'
    ></body></html>'0D''0A'
    '0D''0A'
    '0D''0A'
    --b1_4ecb49f93b720bc688fe3bcdcafed5b0--'0D''0A'


DNS record(s):
    mail._domainkey.flyawaysimulation.com. 3600 IN TXT "v=DKIM1;p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDimrx9MV1sFyUCVPeH6SFMBy7Cb2AU6aB9i3GazP7QKWG5pWWkFEurFImNbwi4wKz6dtKQeEkcGzPdzyeD+hXaSG2sl86T4pnwIxUaBMlW+FWfaNx0XPphacPAYjtkJGVoZGmmIbK3tH8HLZqdCEy6YIKd0kNSXQqFEMQseHaR6wIDAQAB"

Public key used for verification: mail._domainkey.flyawaysimulation.com (1024 bits)

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

Return-Path: <updates@flyawaysimulation.com>
Received: from web3.rbftpnetworks.net (195.224.144.101) by verifier.port25.com id h3rjmm11u9c1 for <check-auth-ryan=rbftpnetworks.com@verifier.port25.com>; Sun, 21 Sep 2014 10:57:47 -0400 (envelope-from <updates@flyawaysimulation.com>)
Authentication-Results: verifier.port25.com; spf=pass smtp.mailfrom=updates@flyawaysimulation.com
Authentication-Results: verifier.port25.com; domainkeys=neutral (message not signed) header.From=updates@flyawaysimulation.com
Authentication-Results: verifier.port25.com; dkim=pass (matches From: updates@flyawaysimulation.com) header.d=flyawaysimulation.com
Authentication-Results: verifier.port25.com; sender-id=pass header.From=updates@flyawaysimulation.com
Received: by web3.rbftpnetworks.net (Postfix, from userid 70)
    id CDAD13E6DCB8; Sun, 21 Sep 2014 15:57:46 +0100 (BST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
    d=flyawaysimulation.com; s=mail; t=1411311466;
    bh=PUR9ib4HOSSj9G3jmXSCyzc1LAtqQeyWPSAii67TLd8=;
    h=To:Subject:Date:From:Reply-To:List-Help:List-Unsubscribe:
     List-Subscribe:List-Owner;
    b=skviRyhjPtB8aaRzLKyzkjay3Qk+Z5AOGg4Ue/Dk62SgvP1aZnf3kL1lCSWiwO1rI
     VKYmMzzspbKLxMVrZ0yXO0s4wx5u9EFNw4eJMNh6fKCimiNwEoSGQRkJcjNb7wA9nG
     38/FjbPIkvRyx1+hxgL9QOP3iSGv9w3X0UAFUmmc=
To: check-auth-ryan=rbftpnetworks.com@verifier.port25.com
Subject: Test 123
Received: from host81-138-131-190.in-addr.btopenworld.com [81.138.131.190] by flyawaysimulation.com with HTTP; Sun, 21 Sep 2014 15:57:46 +0100
Date: Sun, 21 Sep 2014 15:57:46 +0100
From: Fly Away Simulation <updates@flyawaysimulation.com>
Reply-To: Fly Away Simulation <updates@flyawaysimulation.com>
Message-ID: <4ecb49f93b720bc688fe3bcdcafed5b0@flyawaysimulation.com>
X-Priority: 3
X-Mailer: PHPMailer 5.2.5 (https://github.com/Synchro/PHPMailer/)
X-phpList-version: 3.0.7
X-MessageID: 8
X-ListMember: check-auth-ryan=rbftpnetworks.com@verifier.port25.com
Precedence: bulk
Bounces-To: updates@flyawaysimulation.com
List-Help: <https://flyawaysimulation.com/lists/?p=preferences&uid=1e629246241f8e9714134ee8076ad406>
List-Unsubscribe: <https://flyawaysimulation.com/lists/?p=unsubscribe&uid=1e629246241f8e9714134ee8076ad406&jo=1>
List-Subscribe: <https://flyawaysimulation.com/lists/?p=subscribe>
List-Owner: <mailto:abuse@flyawaysimulation.com>
MIME-Version: 1.0
Content-Type: multipart/alternative;
    boundary="b1_4ecb49f93b720bc688fe3bcdcafed5b0"

--b1_4ecb49f93b720bc688fe3bcdcafed5b0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

 test 123







 =20



--b1_4ecb49f93b720bc688fe3bcdcafed5b0
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<html><head>=0A        <meta content=3D"text/html;charset=3DUTF-8" http-equ=

iv=3D"Content-Type">=0A        <title></title></head><body><p>&nbsp;test 12=

3</p>=0A<img src=3D"https://flyawaysimulation.com/lists/ut.php?u=3D1e629246=

241f8e9714134ee8076ad406&amp;m=3D8" width=3D"1" height=3D"1" border=3D"0" /=

> </body></html>


--b1_4ecb49f93b720bc688fe3bcdcafed5b0--

Same message sent to Gmail:

同样的信息发送到Gmail:

Delivered-To: ****
Received: by 10.170.191.196 with SMTP id i187csp139225yke;
        Sun, 21 Sep 2014 08:05:20 -0700 (PDT)
X-Received: by 10.194.134.100 with SMTP id pj4mr14856269wjb.72.1411311920538;
        Sun, 21 Sep 2014 08:05:20 -0700 (PDT)
Return-Path: <updates@flyawaysimulation.com>
Received: from web3.rbftpnetworks.net (web3.rbftpnetworks.net. [195.224.144.101])
        by mx.google.com with ESMTP id db4si8324616wib.100.2014.09.21.08.05.20
        for <****>;
        Sun, 21 Sep 2014 08:05:20 -0700 (PDT)
Received-SPF: pass (google.com: domain of updates@flyawaysimulation.com designates 195.224.144.101 as permitted sender) client-ip=195.224.144.101;
Authentication-Results: mx.google.com;
       spf=pass (google.com: domain of updates@flyawaysimulation.com designates 195.224.144.101 as permitted sender) smtp.mail=updates@flyawaysimulation.com;
       dkim=neutral (body hash did not verify) header.i=@
Received: by web3.rbftpnetworks.net (Postfix, from userid 70)
    id E11B93E6E003; Sun, 21 Sep 2014 16:05:18 +0100 (BST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
    d=flyawaysimulation.com; s=mail; t=1411311919;
    bh=d40fzjdg7KnEX5wH3Ea2b1ZzoQMu8dzZyP1dYsxaoVc=;
    h=To:Subject:Date:From:Reply-To:List-Help:List-Unsubscribe:
     List-Subscribe:List-Owner;
    b=ub2LA6uRxpsgByD3RRUHqAGhlUu5d1gBgNadBBeaJdDP6pvSL/IX2Lzy6SqG2kGIK
     dU7YnOmI3w0frerJZRldlSAZduKUQqaT0QZHfvUZVJnLihK8EIZ7GkzX+6VVE2Pojm
     J8aVCq8fPOEuCG6mu2QdIUmpqkWO+s8bBYBYR6ro=
To: *****
Subject: Test 123
Received: from host81-138-131-190.in-addr.btopenworld.com [81.138.131.190] by flyawaysimulation.com with HTTP; Sun, 21 Sep 2014 16:05:18 +0100
Date: Sun, 21 Sep 2014 16:05:18 +0100
From: Fly Away Simulation <updates@flyawaysimulation.com>
Reply-To: Fly Away Simulation <updates@flyawaysimulation.com>
Message-ID: <8938d7bccca9e15cd846714ca4a01d04@flyawaysimulation.com>
X-Priority: 3
X-Mailer: PHPMailer 5.2.5 (https://github.com/Synchro/PHPMailer/)
X-phpList-version: 3.0.7
X-MessageID: 8
X-ListMember: ****
Precedence: bulk
Bounces-To: updates@flyawaysimulation.com
List-Help: <https://flyawaysimulation.com/lists/?p=preferences&uid=58f4e3c38a321901b99d714dd5f54850>
List-Unsubscribe: <https://flyawaysimulation.com/lists/?p=unsubscribe&uid=58f4e3c38a321901b99d714dd5f54850&jo=1>
List-Subscribe: <https://flyawaysimulation.com/lists/?p=subscribe>
List-Owner: <mailto:abuse@flyawaysimulation.com>
MIME-Version: 1.0
Content-Type: multipart/alternative;
    boundary="b1_8938d7bccca9e15cd846714ca4a01d04"

--b1_8938d7bccca9e15cd846714ca4a01d04
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

 test 123



 =20


--b1_8938d7bccca9e15cd846714ca4a01d04
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<html><head>=0A        <meta content=3D"text/html;charset=3DUTF-8" http-equ=
iv=3D"Content-Type">=0A        <title></title></head><body><p>&nbsp;test 12=
3</p>=0A<img src=3D"https://flyawaysimulation.com/lists/ut.php?u=3D58f4e3c3=
8a321901b99d714dd5f54850&amp;m=3D8" width=3D"1" height=3D"1" border=3D"0" /=
></body></html>


--b1_8938d7bccca9e15cd846714ca4a01d04--

2 个解决方案

#1


2

I ran into the exact problem you are describing where [PlainText DKIM=pass] and [HTMLBody DKIM=fail] when sending to Gmail. I'm using C# MailMessage and by default the body default character set is "us-ascii", which works fine for Text based emails, but not HTML ones. Default character set for Email Subject is UTF-8, so no need to set again.

在发送到Gmail时,我遇到了您描述的确切问题(明文DKIM=pass)和[HTMLBody DKIM=fail]。我使用的是c# MailMessage,默认情况下,body默认字符集是“us-ascii”,它适用于基于文本的电子邮件,而不是HTML格式的邮件。邮件主题的默认字符集是UTF-8,所以不需要再设置。

When sending a HTML Email, you have to code the following parameter before sending:

在发送HTML邮件时,您必须在发送之前编码以下参数:

Mailmessage.BodyEncoding = Encoding.UTF8;

After making this small change, Gmail registers my emails again and I receive a DKIM=pass; when I view the original source. Also these are the relevant headers

在做了这个小小的改变之后,Gmail再次注册了我的邮件,我收到了一个DKIM=pass;当我看到原始的源。这些也是相关的标题。

MIME-Version: 1.0
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: base64
*followed by block of base64 body text*

Perhaps you can mimic the behavior using PHP, and maybe change yours from

也许您可以使用PHP模拟该行为,并可能更改您的行为。

Content-Transfer-Encoding: quoted-printable
to
Content-Transfer-Encoding: base64

更多相关文章

  1. 仅在我的文本框中验证数字和字母
  2. php,检查文本拆分的正确性
  3. 如何使用Ajax或Jquery填充文本框中的值?
  4. Yii2之发送电子邮件
  5. 当excel表格单元格的格式是日期格式非文本格式的时候,phpexcel 应
  6. 从文本文件中读取,然后决定是否要在php中禁用或启用按钮
  7. 如何在php imap函数中看到看不见的电子邮件
  8. MySQL定时检查是否宕机并邮件通知
  9. 可以使用不同文本框编辑的不同弹出窗口?

随机推荐

  1. android实现密码框右侧显示小眼睛
  2. 【整理】Android中EditText中的InputType
  3. GitHub 优秀的 Android 开源项目
  4. [置顶] Android屏幕适配全攻略(最权威的
  5. Android中Button控件Buttons in button b
  6. 21款优秀Android开源库整理推荐
  7. Anddroid各种布局总结
  8. 使用Android Studio与ArcGIS Android SDK
  9. Android技术内幕
  10. Android热修复(2):AndFix热修复框架的使用