On Mon, 12 Mar 2007, Bill Janssen wrote:
> I basically want to be able to do searches across my entire mail
> database, instead of just folder-by-folder, and I'm wondering how to
> plaster that into the protocol.
There is an unpublished extension, implemented by UW imapd, called SCAN
which is a LIST with a third argument that consists of text to be looked
up in the mailbox, and which acts as a filter on the LIST results. Only
the mailboxes which contain that text are returned in untagged LIST
responses.
However, SCAN is a disgusting hack that was done to create the equivalent
of "greping through mail files" since there were oldtimers who refused to
use IMAP unless they could "grep over IMAP" (actually, "fgrep" since they
didn't actually use regular expressions and neither does SCAN).
The problem with SCAN is that, like [f]grep, it makes no distinction
between mailbox metadata and message data. Thus, the command
tag SCAN "" % "mbx"
will match all mailboxes on a system which uses mbx-format as the mail
store, since every mbx-format mailbox starts with "*mbx*".
A much better thing to do would be to implement to corresponding
functionality in LISTEXT.
-- Mark --
http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.
Si vis pacem, para bellum.