Haravikk
2016-Feb-25 22:23 UTC
[Feature Request] doveadm option to return number of messages acted upon
So I have a script for handling my specific archive and expunge needs, but it?d be nice to be able to track how many messages are being affected. Currently I?m doing it by firing the same search queries into doveadm search and counting the lines of the result with wc -l, but that?s not a very pretty solution. While I?m mostly doing it out of interest on a personal server, I can?t imagine it?s a very scalable way to do it if you wanted to gather some kind of metrics for example. What I think would make sense would be for relevant doveadm commands such as move, expunge (probably purge too) and others I haven?t thought of to have a new option that, if enabled, will cause the command to output the number of messages affected as the final line of output (most of these commands don?t have any output anyway). A doveadm count command could also be a convenient, more efficient, alternative to doveadm search | wc -l.
A. Schulze
2016-Feb-26 07:25 UTC
[Feature Request] doveadm option to return number of messages acted upon
Haravikk:> So I have a script for handling my specific archive and expunge > needs, but it?d be nice to be able to track how many messages are > being affected. > > Currently I?m doing it by firing the same search queries into > doveadm search and counting the lines of the result with wc -l, but > that?s not a very pretty solution. While I?m mostly doing it out of > interest on a personal server, I can?t imagine it?s a very scalable > way to do it if you wanted to gather some kind of metrics for example. > > What I think would make sense would be for relevant doveadm commands > such as move, expunge (probably purge too) and others I haven?t > thought of to have a new option that, if enabled, will cause the > command to output the number of messages affected as the final line > of output (most of these commands don?t have any output anyway). A > doveadm count command could also be a convenient, more efficient, > alternative to doveadm search | wc -l.+1 statistics are always nice Andreas