MBOX-Line: From the RFC 3501:
To: imap-protocol@u.washington.edu

"It indicates the [CHARSET] of the strings that appear in the search
criteria. [MIME-IMB] content transfer encodings, and [MIME-HDRS] strings
in [RFC-2822]/[MIME-IMB] headers, MUST be decoded before comparing text
in a [CHARSET] other than US-ASCII."

If I read this correctly, searching logic works like this:

If search charset is US-ASCII, server either
a) simply does a substring match for the entire message, or
b) decodes MIME parts based on Content-Transfer-Encoding header and
decodes the MIME headers themselves, and then does substring matching

If search charset is not US-ASCII, only b) is allowed.

If the search key is invalid for the given character set, should server
return BAD error to client? Are non-ASCII characters in search key
invalid for US-ASCII charset?

What about if search key contains non-ASCII characters but no charset
parameter is given? Currently I assume this means just doing a substring
search from messages without doing any charset conversions (i;octet
comparator).

I don't see it clearly mentioned how searching MIME parts should work,
but since it only talks about substring matching, I assume that it
shouldn't really care about MIME parts that much.

Especially BODY searching talks about searching from message bodies. Are
MIME part headers part of a message body? I guess not, because UW-IMAP
skips them.

More interesting are MIME footer and trailer sections. Should they be
searched? UW-IMAP skips them. What about MIME boundary lines? UW-IMAP
searches these, but not if you include its "--" prefix in search key.

Is "Header: value" searching required to work? I think it is, and works
with UW-IMAP. Is "line\r\nline2" (as literal of course with real CR+LF)
searching required to work in message body? Again, I think so and works
with UW-IMAP. But then is "Header: value\r\nHeader2: value2" searching
required to work? I don't see why not, but this doesn't work anymore
with UW-IMAP.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://mailman13.u.washington.edu/pipermail/imap-protocol/attachments/20060414/780673b4/attachment.sig>
