[Users] IMAP server-side search?

Colin Leroy colin at colino.net
Mon Dec 17 17:01:39 CET 2012

On Mon, 17 Dec 2012 10:45:37 -0500, Jeremy Schneider
<jeremy.schneider at ardentperf.com> wrote:

> Aside from reading source code and/or looking for patches... anyone
> know where I can find info about the new "server-side IMAP search"
> feature that was announced in the 3.9.0 release notes? For example...
> when does it get used or not get used - do all the extended search
> options support it?  Will any searches trigger downloading all the
> message bodies in a folder?

Normally no, apart if the server fails to search and returns an error.
Then, there's a fallback to local body matching.

Server-side matching could be used for most of the extended searches,
but it will be used for body matching, and non-cached headers matching.
For the rest, local searches are faster.

> Is there a wiki page or anything where this info is gathered? Since
> this is something I'm using, is there someplace I could post a digest
> of my findings if I ever manage to put that together? Maybe just back
> to this list?  :)

Yes, good idea.
> Also, any quick tips about where to look for the actual source - I'm
> curious how it was implemented and might read a little bit when I have
> some time.

In src/imap.c, you'll find the folder search_msgs implementation, with
most of the extended search/IMAP syntax matching done in

The rest is in src/etpan/imap-thread.c, but that's mostly plumbing there.

More information about the Users mailing list