Re: multipart/alternative question
-----BEGIN PGP SIGNED MESSAGE-----
On Thursday, July 16 at 08:18 PM, quoth lee:
>> The definition of "attachment" is not as clear as you would think.
>> For example, we tend to think of MIME components whose type is
>> text/* as not being "attachments", but sometimes they can be (e.g.
>> if I sent you a txt file).
> Yeah, but mutt already has a way of showing a list of attachments.
Those aren't attachments, they're MIME components. There's a
difference, at least in modern lingo. MIME components have *semantics*
that are important. For example, if someone sends me a message that is
a multipart/alternative container with both a text/plain component
(that simply says "Your reader cannot read HTML!") and a text/html
component, *very* few people would consider that message to have THREE
attachments, besides the fact that it has three MIME components.
> If you have used the mail client built into Mozilla, it would
> distinguish between forwarding messages inline vs. as attachment.
> And inline was actually inline, while attachment was attachment.
> So what's the difference between "inline" and "attachment"?
In the case of forwarding mail? The difference is usually between
"copy the text of the forwarded mail into the text of a new mail, and
maybe quote it or indicate that it came from another message somehow"
(that's "inline") and the alternative "preserve the original message
EXACTLY and encapsulate it within a separate MIME container appended
to the MIME structure of a new message" (that's "attachment"). Mutt
does similar things based on the $forward_mime setting.
Unfortunately, those terms mean different (albeit related) things in
the sense of MIME disposition. In MIME disposition terms, "inline"
means "display the contents of this MIME component when the reader
views the mail" and non-inline means "don't display the contents of
this MIME component when the reader views the mail".
>> Here's a wacky message structure my mom sent me (using Apple Mail):
>> I 1 <no description> [multipa/alterna, 7bit, 653K]
>> I 2 |-><no description> [text/plain, utf-8, 2.0K]
>> I 3 `-><no description> [multipa/mixed, 7bit, 651K]
>> I 4 |-><no description> [text/html, quoted, windows-1252, 3.0K]
>> I 5 |->Typeface Ideas.pdf [applica/pdf ...]
>> I 6 `-><no description> [text/html, 7bit, us-ascii, 0.2K]
>> I haven't set up attachment detection properly, so %X says this
>> message has 0 attachments.
> All the attachments of this message are designated inline. But you can
> even set
> attachments +A */.*
> attachments +I */.*
> and mutt doesn't count attachments that are inline.
Yes it does. But it doesn't recurse into some MIME containers (as
we've been discussing).
For example, I have a message with the following MIME structure:
I 1 <no description> [text/plain]
I 2 forwarded message [message/rfc822]
I 3 `-><no description> [text/plain]
With your two rules, mutt tells me that this message has ONE
attachment. They're ALL inline, so *something* got counted!
As I understand it (David would know for sure) the "main body" of the
message (MIME component #1) doesn't count toward the total. Also, mutt
doesn't look at the sub-components of MIME component #2 (why? I don't
know), so there is only one attachment: component #2 itself.
> (Imho, there's no such thing as an "inline attachment". Something is
> either attached or inline, and it cannot be both. Creating mails
> with inline attachments is silly.)
Then you're not understanding the idea.
It's all about *display*. Do you want the contents a given
"attachment" (or MIME component) to be *displayed* when the rest of
the message is displayed, or do you want it to be represented more
succinctly, merely letting the viewer know that it exists? The former
is an "inline" attachment, the latter is a non-inline attachment.
If you include a JPEG in an email, should that JPEG be displayed when
the user views the message, or should it just show up as an icon that
can be downloaded and saved to disk? If you want it to display when
the user opens the message, is that JPEG "attached" to the message?
(if it is not attached, how would you describe its relationship to the
message?) Should the user be able to save it separately from the rest
of the message? Should it be allowed to have a filename associated
The answers, according to the standard RFCs, is that yes, that JPEG is
"attached" to the message, yes it can have a filename, and yes the
user should be able to separate the picture from the rest of the
message. It is merely an "inline attachment".
It is easier to be critical than to be correct.
-- Benjamin Disraeli
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!
-----END PGP SIGNATURE-----