[Dovecot] doveadm with multiple commands

Timo Sirainen tss at iki.fi
Thu Sep 20 19:01:05 EEST 2012


This has been in my TODO for a while and today I implemented it (but didn't dare to test it yet :) So the problem has been that you want to run for example:

doveadm expunge -A mailbox Trash savedbefore 7d
doveadm purge -A

This is annoying because it scans through the users' mailboxes twice, wasting disk IO and CPU. So how to make it do the scan only once? The syntax I thought of today would be:

doveadm multi [-A | -u wildcards] <separator string> <comand 1> [<separator string> <command 2> [...]]

So the first two commands could be for example:

doveadm multi -A : expunge mailbox Trash savedbefore 7d : purge

The ':' character is the separator. Any other string could be used as well, for example "?SEP?" or whatever.

Thoughts? Any better name for the command than "multi"?




More information about the dovecot mailing list