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.
It seems especially unclear because, according to RFC 3501, "MIME" in
a FETCH BODY is disallowed without a part specifier but, in this
case, it seems that a BODY[1.MIME] would be equivalent to BODY[MIME]
were that allowed. One could read this as indicating that
BODY[1.MIME] in this context is not considered a proper use of the
protocol. And, while I do not recall, that may be how I interpreted
matters when I wrote my server because it responds with NIL. But
that, evidently, is not what this client expects.
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. But if the latter is appropriate
then, if I extract all "MIME-Version:" and "Content-<anything>:"
headers, is that guaranteed to be inclusive enough?
And what about the case when the single part is, say, of type
"message/rfc822"? There I am completely lost!
Pete Maclean