MIME restructuring [was: Re: release-candidate/0.6]

Subject: MIME restructuring [was: Re: release-candidate/0.6]

Date: Mon, 16 May 2011 16:50:06 -0400

To: Carl Worth

Cc: Notmuch Mail

From: Daniel Kahn Gillmor

On 05/16/2011 04:42 PM, Carl Worth wrote:
> 	Meanwhile, I still can't tell exactly what the behavioral change
> 	intended is. The commit message talks about "fully recursing"
> 	and "match[ing] the MIME structure of the message". Was it not
> 	fully recursing before? In what way did the output not match the
> 	MIME structure before?

before, the output was a linearized version of the mime tree, in
particular removing the multipart pieces and only enumerating the leaves
in a depth-first walk of the tree.

So a message like this:

A└┬╴multipart/signed 355339 bytes
B ├┬╴multipart/mixed 353462 bytes
C │├╴text/plain 235 bytes
D │└╴image/jpeg attachment [foo.jpg] 352752 bytes
E └╴application/pgp-signature attachment [signature.asc] 1030 bytes

would come out with three parts:

 1) C
 2) D
 3) E

the new code assigns this message to 5 parts:

 1) A
 2) B
 3) C
 4) D
 5) E

This change is critical to be able to properly delineate which parts of
a message were signed and/or encrypted.



signature.asc (application/pgp-signature)