On Oct 29, 2007, at 9:20 AM, mortee wrote: > James Edward Gray II wrote: >> I've been looking into this a little this morning. >> >> We do receive multipart/related messages, though they seem fairly >> uncommon compared to multipart/alternative. They don't appear to be >> gated properly. In fact, the mailing list archives don't even >> seem to >> show them. For example 271796 was a multipart/related message and I >> can't find it in the archives or on comp.lang.ruby. >> >> To understand what we are dealing with here, I read: >> >> http://www.faqs.org/rfcs/rfc2387.html >> >> This type does not seem easy to deal with and I open to >> suggestions for >> the best strategy to use. > > AFAIK it's mostly used for HTML messages with images embedded in the > email itself. Yeah, I think that's what I'm seeing in my analysis of the messages. > I guess it would mostly be one part of a multipart/alternative > message, of which one alternative should be text/plain anyway. Most of the cases I have found have a multipart/alternative section inside the multipart/related section, like this example shows: 271796: multipart/related () multipart/alternative () image/png () Obviously I need to extend my statistics gathering script to handle the nesting, but I've checked this message by hand and there was a text/plain part in there. > Otherwise, you're most likely left with HTML to > strip, and images which you may either drop or attach to the output as > files. Right. Which means I still need to settle on an HTML strategy as well. > Sorry if I happen to be wrong on one point or the other. The other usage that seems common, more common than the HTML case in fact, is as part of a signed message: 271822: multipart/signed () multipart/related () application/pgp-signature () I've not yet checked to see if these messages are gated properly with our current setup. James Edward Gray II