[Dovecot] Expire plugin / expire-tool redesign for doveadm

Steffen Kaiser skdovecot at smail.inf.fh-brs.de
Wed Apr 14 11:04:11 EEST 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue, 13 Apr 2010, Timo Sirainen wrote:

> 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.

My first idea, that hit me after reading through the whole post, was to 
keep track of all mailboxes of all users and issue the commands later.
The plugin saves just one value per physical mailbox, when a) the first 
message arrives an empty mailbox or messages are expunged? Or each time a 
message is received. What would be the impact of monitoring all mailboxes?

> There will be a new doveadm command:
>
> doveadm expunge [-u user | -A] <mailbox> <search query>

What about shared mailboxes and namespaces? Can "<mailbox>" be a phyiscal 
path rather than a IMAP mailbox name?

> 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

> TODO:
>
> - 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..

Hmm, does doveadm support to read commands from stdin / file?
If I imagine such scenario with some hundreds of users having configured 
expire for some folders, that leads to plenty of process creations etc.pp.

doveadm <<EOT
expunge -A Trash savedbefore 1w
expunge -u user1 INBOX savedbefore 1y
expunge -u user2 INBOX savedbefore 1m
EOT

Regards,

- -- 
Steffen Kaiser
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iQEVAwUBS8V2/b+Vh58GPL/cAQJloggAwxk85Y3pCeu6u6timuP25JJ1tRy/mlfr
L2sgMooKtQOjz5VJZeLQnQEwDfbFItdRMMbwSg60R740h+yIVhNiJ+sQZ8FdUohj
hlUpvMJzdY2XG1R3/dBqEhhHx2YXYfxszyPykvjPOXFz7v/TXqvGJUHdZG13uqRL
/qVuhlstR/DBot9xlcqDWiJ/v2hiE53BQxfMn1Umfm05le8C/i9ELHCHC2NKIo6a
zCURknf0ORwxoL8E2whRVpUXUCeaJHjDYcKTnGtAsZPlpFRylMiaGN/cDSTrqqpw
kMpUtQ8cQbdgkaLgvpRhwxNZm5OjUaa6LyEsTSBTEHTSLa1SM6GSPw==
=Yfvd
-----END PGP SIGNATURE-----


More information about the dovecot mailing list