<<< Date Index >>>     <<< Thread Index >>>

Re: multipart/alternative question



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On Wednesday, July 15 at 11:59 PM, quoth lee:
>> You can also use the %X sequence in your index_format definition to 
>> display the number of attachments in a message.  However, I don't 
>> think either of those methods pick up on inline attachments.
>
> Hm, I would expect that attachments are attachments and count as 
> such ...

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). The same problem exists with pictures in GUI mailers: 
they can display the picture, or treat it as a file, or both. This is 
what RFC 2813 (the Content-Disposition header) is designed to help 
with. And when multipart/alternative is involved... it gets nutty.

>  I     1 <no description>      [multipa/alternativ, 7bit, 2.0K]
>  I     2 ><no description>     [text/plain, quoted, iso-8859-1, 0.7K]
>  I     3 ><no description>     [text/html, quoted, iso-8859-1, 1.0K]
>  I     4 <no description>      [text/plain, 7bit, us-ascii, 0.2K]
>
>
> For that one, %X says the mail has 1 (one) attachment. But apparently 
> it has 4 attachments, so what's %X for?

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.

Details of how this works and why it's hard are here: 
http://www.mutt.org/doc/devel/manual.html#attachments

> If you can find out if what they are doing is compliant with RFCs or 
> not, you could act accordingly. Unfortunately that's a difficult 
> task, but if they are compliant, you need to change something on 
> your side.

It *is* (or at least, can be) compliant.

~Kyle
- -- 
Arguing with an engineer is like wrestling with a pig in mud, after a 
while you realize the pig is enjoying it.
                                                             -- Unknown
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!

iQIcBAEBCAAGBQJKXzbiAAoJECuveozR/AWeaP8P/Rwy5pNNGsYF1z18i3mnV+lz
qUH0msZ+/EyG/zpSOKHZFNCADT9AXvN1nWp6uRzolYwJccsz2hTCGAk9GxlYM4uB
YZow4vHAXpJ3Opk7q1aHOk6eg3U7nPUPKCGTA2FjNYaJNVavsQ00JhfAeqxfwrDF
kBq3YSJBxXK5rLh+Eikpu9hMQUL6ZKDtd+bDgEA+oRAmWejovN57AHaQ+jDbkwBd
POiu7aVbKslfy/ftNRkTR5NiUg2RQBPoVx/YeELjezNUx25wvvppufVu65dpi20I
mF/SSNu/q0BYPb91jozi8u2m123a1xIqHMZyKtfJjfOsiLTUuCg4DyeysiyW3P8b
vrQw3ajWSEBv7+sDjFi99tMOq9+k5G+Uz2tDuDApI5qJwpiTjN4MVIXrEq8d5KbP
znb3l4Nt4E2QGSK36CXP/NGbIk0PxD37tpDKHv3YcK3++SzJmP54QSLedi7lDVND
PaB7lKMdMwMcL+qBb0tMa7lHopHwNVV0mphPssDmPCZY/zv8fBHd0ve4NePtq0VE
Ciej5z62xBjSrYN8CmzIR6FjLsg6A1RwGQAQDYib+GlNsfNHjtL7E7lkOL9IbFhj
GVH4i3wdSAyIhvdNk+wCdfdmG7mbAMT5piMOwcOWyDAvsGUFxcwg36+ZnlYk63tL
PIqaZoZX9Cx6bhd8t7Dx
=W066
-----END PGP SIGNATURE-----