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"?
Timo Sirainen wrote:> doveadm multi [-A | -u wildcards] <separator string> <comand 1> [<separator string> <command 2> [...]] > > Thoughts?Would be nice if this also worked through doveadm director proxy and executes the command sequence on the correct backend host for each user. As command name I could also think of "doveadm sequence", which implies the commands being executed in serial order. Regards Daniel -- https://plus.google.com/103021802792276734820
On 09/20/2012 06:01 PM, Timo Sirainen wrote:> Thoughts? Any better name for the command than "multi"?How about 'execute' or 'exec'. -- Aleksander 'A.L.E.C' Machniak LAN Management System Developer [http://lms.org.pl] Roundcube Webmail Developer [http://roundcube.net] --------------------------------------------------- PGP: 19359DC1 @@ GG: 2275252 @@ WWW: http://alec.pl
>>>>> Timo Sirainen <tss at iki.fi>:> Thoughts?How about: a) Dropping into a command prompt where it's possible to give commands? b) Making it possible to feed commands through a pipe (ie reading lines from stdin)?
Timo Sirainen wrote:> On 21.9.2012, at 8.28, Timo Sirainen wrote: > > >> Timo Sirainen wrote: > >>> doveadm multi [-A | -u wildcards] <separator string> <comand 1> [<separator string> <command 2> [...]] > >>> > >>> Thoughts? > > > >> As command name I could also think of "doveadm sequence", which > >> implies the commands being executed in serial order. > > > > Hmm. Maybe. > > "sequence" is already commonly used by IMAP protocol and Dovecot code to mean message sequence numbers. I think it would be too confusing to use that word for other things.Ok, so how about "batch"? It reads a series of commands and collects them into one "batch job" which is then carried out. http://en.wikipedia.org/wiki/Batch_(Unix) Regards Daniel -- https://plus.google.com/103021802792276734820