On Tue, 20 Aug 2003, Timo Sirainen wrote:
> SEARCH BODY and TEXT isn't really well defined regarding how they're
> supposed to handle multipart messages. There's a comment that servers
> may exclude non-text parts, so they're not always required to do exact
> text matching at least..
There is a reason for this: compatibility with the past. In IMAP2, TEXT
was a free text search through the entire message as a string and BODY was
a free text search through the entire RFC822.TEXT as a string.
In IMAP4, we have the concept of MIME, the idea that MIME decoding should
be done, and that searching should only be through textual context (e.g.
TEXT/xxx body parts) and not through non-text (e.g. IMAGE/xxx) content.
How that is implemented is left to the server; however, UW and Cyrus are
both very close in doing this and in canonicalizing all text to Unicode
before searching.
> Should MIME headers be decoded before applying the search?
Yes, but they should be searched only for TEXT searches.
> Should searching check MIME boundary lines? Headers and trailers?
I think not.
> Must multi-line search key match in headers too? Both main and MIME
> headers? eg.: {123}
> Content-Type: text/plain
> Foo: bar
I am neutral on this, especially since this sort of search is very
unlikely.
-- Mark --
http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.
Si vis pacem, para bellum.