[Mailman-Developers] Headers and footers for MIME messages

Andrew McNamara andrewm@connect.com.au
Tue, 03 Apr 2001 13:04:57 +1000

>Ug.  It's probably inevitable, but I really don't want Mailman to
>become a hypergeneralized MIME slicer-n-dicer.

Yes - I think it's sort of inevitable. If you structure your MIME
parser correctly, it may be relatively painless.

BTW, you should look at the perl MIME module (as used by Majordomo 2) -
I understand that it's one of the best MIME interfaces around (although
reading other people's perl is futile, it's interface doco might
suggest some ideas for your code).

>    AM> BTW, I think there's a special mime type for headers and
>    AM> footers - text/plain isn't the right one. Can't remember off
>    AM> the top of my head.
>I'm not aware of it, so I'd appreciate pointers.  Maybe you're
>thinking of multipart/digest or message/* types?   Neither is exactly
>appropriate in this context.

I had a quick look when I posted, but couldn't find it. I think I was
probably thinking of the multipart/digest and message/* stuff, as you

>    AM> - if it's
>    AM> mime, and it's not already a multipart/mixed, create a
>    AM> text/multipart with header/original mime/footer.
>I think you mean "create a multipart/mixed with 3 subparts, the
>header, the original article, and the footer".

Yes - wrap the original mime message in a new multipart/mixed with 3
subparts. Mime is intended to be a hierarchy, so this is safe.

It will also be a good test for your Python MIME code - if it's going
to cope with the random crap that people mail around, it shouldn't have
much trouble producing this.

Personally, I find MIME problematic - the basic idea was okay, but when
people start nesting objects several levels deep the utility starts to
disappear. Also, it assumes that SMTP is a file transport protocol,
which it isn't (if it was, it would support restarting failed
transfers). I also turn it off in my MUA (exmh) as it slows it down

>My main objective is above all "to do no harm", so for now, I'm going
>to adopt these rules:


>    - if it's not MIME or it's text/plain, do the old thing
>    - if it's multipart/mixed, add the header and footers as
>      additional subparts
>    - anything else, pass the message through unchanged
>We can elaborate on that last one later if necessary.


Andrew McNamara (System Architect)

connect.com.au Pty Ltd
Lvl 3, 213 Miller St, North Sydney, NSW 2060, Australia
Phone: +61 2 9409 2117, Fax: +61 2 9409 2111