On Tue, 24 Jan 2012, Pete Maclean wrote:
> I have just come across an IMAP client, ibisMail, that sends
> FETCH n BODY[1.MIME]
> commands for single-part messages. If memory serves, this is the
> first time I have seen such behavior and I find myself unclear as to
> how a server should handle it.
Simple answer: for all body parts that are not children of a MULTIPART,
the "MIME" specifier returns the empty string (not NIL).
> Considering the case when the MIME part is anything bar a message, it
> seems reasonable either to send the full header section of the
> message (as I observe the Cyrus server does) or to send just the MIME
> headers extracted from the lot.
Both of these behaviors are incorrect. MIME returns only the mini-headers
of a MIME encapsulated part (under the "--boundary") and does not parse
or extract from any message header.
> And what about the case when the single part is, say, of type
> "message/rfc822"? There I am completely lost!
Return the empty string. To reiterate:
MIME returns only the mini-headers of a MIME encapsulated part (under the
"--boundary") and does not parse or extract from any message header.
Only a child of a MULTIPART has a .MIME part.
-- Mark --
http://panda.com/mrc
Democracy is two wolves and a sheep deciding what to eat for lunch.
Liberty is a well-armed sheep contesting the vote.