On 21.6.2007, at 3.50, David Favor wrote:

I have a situation with many users and an existing mail delivery
agent. Seems like I once saw an imaptest program which I imagine
might be used to pre-index maildirs.

imaptest is mostly useful for benchmarking and stress testing. Although stress testing your server with your users' mailboxes does index the maildirs, it's not really the optimal solution. :)

For example...

   - remember which users and user maildirs have changed since
     last pre-index

   - when system quiet pre-index any maildirs which have had
     mail delivered and no access by a mail client (using some
     inotify magic)

The main problem I see with this is that "indexing" isn't that simple. http://wiki.dovecot.org/IndexFiles has some explanations how it works.

The most useful thing a pre-indexing can do is to update cache file, but different clients use different fields, so your pre-indexing should cache all those fields, and preferrably not more because that will then cause extra disk I/O for the cache file.

I don't think there's any easy way to make Dovecot cache the useful fields. Or perhaps fetching RFC822.SIZE for all messages causes that, at least it should for v1.1 but I'm not sure about v1.0. You could try and then check if all the fields were added to cache file. You can check that with:

idxview dovecot.index dovecot.index.cache

I should probably build some indexer binary that updates the index/ cache files with all the useful changes.

Attachment: PGP.sig
Description: This is a digitally signed message part

Reply via email to