[Dovecot] Expire plugin / expire-tool redesign for doveadm
Timo Sirainen
tss at iki.fi
Tue Apr 13 21:20:24 EEST 2010
Expire plugin / expire-tool seems annoyingly inflexible currently, so I
was thinking about a more generic redesign:
The expire plugin keeps track of the oldest message in configured
mailboxes. Its only configuration is the list of tracked mailboxes.
There's no configuration like what the expire timeouts are or anything.
There will be a new doveadm command:
doveadm expunge [-u user | -A] <mailbox> <search query>
So when you want to expunge all mails from Trash older than 1 week for
all users, you say:
doveadm expunge -A Trash savedbefore 1w
This command works even without expire plugin. To optimize it to avoid
looking into all users' Trash mailbox, there's a new expire doveadm
plugin, which can use the expire dict to filter out users who don't have
anything to expunge.
This also supports another feature that the plugin can optimize:
doveadm move -A INBOX Archive/2009/INBOX since 2009-01-01 before 2010-01-01
And since people have had problems waiting for expire dict to fill,
there could be also a new parameter that does the filling immediately.
TODO:
- dbox altmove feature will be removed from expire plugin. it may need
another plugin, or some other way to configure expire plugin for it.
it's anyway a special case.
- When using multiple mailboxes it would be more optimal to handle all
mailboxes for a user at once, rather than using separate doveadm
commands. Maybe the command syntax needs some more thinking to support
this. Different mailboxes could have different rules though..
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20100413/f5be64d8/attachment.bin
More information about the dovecot
mailing list