Am 2016-12-31 um 07:53 schrieb Michael Fox:
Huh, it certainly did for me, although I used "all" instead of
"savedbefore 30d" since I just wanted to empty the trash.
Well, not for me.
doveadm search -u user@domain ALL savedbefore 2d
-- returns some messages
doveadm expunge -u user@domain mailbox '*' savedbefore 2d
-- nothing shown, but no error
doveadm search -u user@domain ALL savedbefore 2d
-- returns the same messages as before
The inefficiency of compiling a list of folders and expunging from each
single one seems quite minor to me. That is, as it seems, when "expunge"
search-query requires a real mailbox/folder name.
Maybe you can "doveadm move" selected messages to a /fresh/ folder and
then expunge that one completely? Slightly less efficient, easier to
script though all the time.
--
peter