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"?