[Dovecot] Question about pre-indexing maildirs
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.
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)
If this sounds do-able, let me know where I can find an imaptest version which works with latest dovecot trunk code and the syntax for using it. Seems like I saw this once on the dovecot site.
Thanks.
- David
-- Like feeling your best ever, all day, every day? Here's how... Your simple secrets are here - http://RadicalHealth.com
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.
participants (2)
-
David Favor
-
Timo Sirainen