RE: CR CR LF-mail body as there is an error

From: Murray S. Kucherawy <msk_at_cloudmark.com>
Date: Fri, 19 Nov 2010 22:06:09 -0800

Here's your sample input file:

% hexdump -C in
00000000 46 72 6f 6d 3a 62 75 67 40 65 78 61 6d 70 6c 65 |From:bug_at_example|
00000010 2e 63 6f 6d 0a 0a 61 61 0a 61 61 20 0d 0a 61 61 |.com..aa.aa ..aa|
00000020 0a 0a |..|
00000022

Here's a configuration file I set up to test it:

% cat conf
Domain example.com
KeyFile /var/db/dkim/default.key.pem
Selector default
KeepTemporaryFiles True

Then I signed it with opendkim in test mode:

% ./opendkim -b s -x conf -t in -v -v -v

This resulted in the canonicalized body and header being left in /var/tmp. Here's the header after processing:

% hexdump -C /var/tmp/dkim.DEBUG-i.1ICNzD
00000000 61 61 0d 0a 61 61 20 0d 0a 61 61 0d 0a |aa..aa ..aa..|
0000000d

The code in libopendkim is converting LFs to CRLFs, as required (RFC5322 as previously cited, and also RFC4871 Section 5.3), while leaving the CRLF alone.

Again, bare CRs are not legal input.


From: opendkim-users-bounce_at_lists.opendkim.org [mailto:opendkim-users-bounce_at_lists.opendkim.org] On Behalf Of vfx9as
Sent: Friday, November 19, 2010 8:50 PM
To: opendkim-users_at_lists.opendkim.org
Subject: Re: CR CR LF-mail body as there is an error


2010/11/20 Murray S. Kucherawy <msk_at_cloudmark.com<mailto:msk_at_cloudmark.com>>
> There are features of libopendkim that attempt to deal with input like this by "fixing" the signed body. You could try signing with "FixCRLF" set and see if that works.

"FixCRLF" was confirmed again, and even set up "bad signature data" was.
Received on Sat Nov 20 2010 - 06:06:21 PST

This archive was generated by hypermail 2.3.0 : Mon Oct 29 2012 - 23:19:49 PST