[Dovecot] Index maintenance
Timo Sirainen
tss at iki.fi
Fri Apr 25 02:29:21 EEST 2008
On Fri, 2008-04-25 at 01:17 +0200, Anders wrote:
> Timo Sirainen wrote:
> > On Tue, 2008-04-08 at 09:58 +0200, Anders wrote:
> >> Anders wrote:
> >>
> >>> I am unable to find information about what happens to the index file if I
> >>> use something like the cron script at the bottom of
> >>> http://wiki.dovecot.org/Plugins/Expire
> >>>
> >>> There must be some information in the index that is no longer needed. When
> >>> and how will Dovecot clean this up?
> >
> > When the mailbox is next opened by a client (or STATUS command issued).
>
> Does this mean that if users never check the folder, the index file will
> grow indefinitely, even though I delete old messages every night?
No. If something is adding new data to indexes, it's also removing the
old data. So if you're using deliver it does both of it. (If you're not
using deliver, then nothing is adding new mails to the index anyway.)
> >> A similar question is whether the expire plugin will help me at all, when
> >> it is only used for folders that receive new messages each day?
> >>
> >> Will the expire-tool give me the index maintenance that I am looking for?
> >
> > Do you mean that no clients would ever even see the messages? If you're
> > using Dovecot's deliver they are also expunged.
>
> Just to be sure: this means that deliver will clean up the index as soon
> as the next spam arrives? That would be okay, even though some users are
> still on procmail.
deliver will clean the index from those mails that have already been
expunged externally, but it doesn't expunge any new messages. It just
marks timestamp to the expire database when expire-tool should next
check this mailbox.
> Then it seems to me that the expire-tool does not give me much
> advantage, and adds the burden of an extra database. I guess it is most
> useful if you have it watch folders that are not used every day?
I also thought about having expire plugin do the expunging directly
instead of always leaving the job to expire-tool, but currently it
doesn't support it. One problem with that would be that it could slow
down mail deliveries or interactive IMAP session by expunging lots of
messages. Also in large systems the expunge runs could be done while
there's less disk I/O going on.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20080425/dcf6f9c7/attachment.bin
More information about the dovecot
mailing list