[Mailman-Developers] MIME footers

Daniel Kahn Gillmor dkg at fifthhorseman.net
Tue Feb 24 23:08:42 CET 2015


On Tue 2015-02-24 15:26:36 -0500, Murray S. Kucherawy wrote:

> A while back I introduced an experimental draft about DKIM signature
> generation that's sensitive to MIME structure.  I'm planning to revisit and
> maybe even implement this to get some experimentation going.  It would help
> guide the design work if I knew this:
>
> How does, or how would, Mailman add a footer to a MIME message?  My guess
> is that it would make a multipart that contains the original message
> (message/rfc822) as one part and the footer as a text/plain in a second
> part, but that's purely a guess.

Mailman does not generate any message/rfc822 MIME parts.  Here's what it
does to add a footer (there are three cases):


-------

If the main content-type of the message is text/plain, then mailman just
appends the footer to the body of the message directly.

So it goes from this:

A └─╴text/plain 1216 bytes

to this:

B └─╴text/plain 1418 bytes


-------

If the main content-type of the message is multipart/mixed, it simply
appends a new text/plain part at the end of the message.  So it goes
from this:

C └┬╴multipart/mixed 8690 bytes
D  ├─╴text/plain 625 bytes
E  └─╴text/plain attachment [foo.diff] 1290 bytes

to this:

F └┬╴multipart/mixed 8795 bytes
G  ├─╴text/plain 625 bytes
H  ├─╴text/plain attachment [patch.loadlin.diff.txt] 1290 bytes
I  └─╴text/plain inline 200 bytes

(part I is the mailman footer).

-------

If the main content-type of the message is neither text/plain nor
multipart/mixed, mailman creates a new root MIME node of type
multipart/mixed, takes the previous mime structure as the first child of
that root, and places the footer as the second child with a content-type
of text/plain.

so it goes from this:

J └┬╴multipart/alternative 10003 bytes
K  ├─╴text/plain 1459 bytes
L  └─╴text/html 1996 bytes

to this:

M └┬╴multipart/mixed 10572 bytes
N  ├┬╴multipart/alternative 3881 bytes
O  │├─╴text/plain 1459 bytes
P  │└─╴text/html 1996 bytes
Q  └─╴text/plain inline 120 bytes




> Equally important: What would it do to sign a message that's not MIME
> to begin with?  Could it be compelled to turn it into a MIME message,
> perhaps treating the original as a single-part text/plain message and
> doing the same wrapping I described?

Mailman doesn't usually sign messages.  What kind of signatures are you
asking about?

hth,

       --dkg


More information about the Mailman-Developers mailing list