> Huh, it certainly did for me, although I used "all" instead of > "savedbefore 30d" since I just wanted to empty the trash. What > version of Dovecot? Mine is 2.2.27.Well, not for me. doveadm search -u user at domain ALL savedbefore 2d -- returns some messages doveadm expunge -u user at domain mailbox '*' savedbefore 2d -- nothing shown, but no error doveadm search -u user at domain ALL savedbefore 2d -- returns the same messages as before I've got 2.2.9 (Ubuntu package for 14.04)> I guess that's reasonable for a critical application, but normally I > would expect an IMAP client to request headers-only, or just recent > messages. My phone's K9 client defaults to something like 2 weeks.Right. But your phone has 100s of kbps or even Mbps of bandwidth, full duplex. But when multiple users are sharing a simplex 56kbps radio channel, even just the headers of old/irrelevant mail are to be avoided. Michael
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 at domain ALL savedbefore 2d > -- returns some messages > doveadm expunge -u user at domain mailbox '*' savedbefore 2d > -- nothing shown, but no error > doveadm search -u user at domain ALL savedbefore 2d > -- returns the same messages as beforeThe 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
On 31-12-16 07:53, Michael Fox wrote:>> Huh, it certainly did for me, although I used "all" instead of >> "savedbefore 30d" since I just wanted to empty the trash. What >> version of Dovecot? Mine is 2.2.27. > > Well, not for me. > doveadm search -u user at domain ALL savedbefore 2d > -- returns some messages > doveadm expunge -u user at domain mailbox '*' savedbefore 2d > -- nothing shown, but no error > doveadm search -u user at domain ALL savedbefore 2d > -- returns the same messages as before > > I've got 2.2.9 (Ubuntu package for 14.04) > > >> I guess that's reasonable for a critical application, but normally I >> would expect an IMAP client to request headers-only, or just recent >> messages. My phone's K9 client defaults to something like 2 weeks. > > Right. But your phone has 100s of kbps or even Mbps of bandwidth, full > duplex. But when multiple users are sharing a simplex 56kbps radio channel, > even just the headers of old/irrelevant mail are to be avoided. > > Michael >ok, i did setup a test, and these are the results ;) sh-4.3# doveadm search -u luuk savedbefore 2d 6e076801a027c655aa700000e4766c2b 1 a11f76379f27c655a4700000e4766c2b 1 sh-4.3# doveadm expunge -u luuk mailbox INBOX savedbefore 2d sh-4.3# doveadm search -u luuk savedbefore 2d 6e076801a027c655aa700000e4766c2b 1 sh-4.3# doveadm fetch -u luuk mailbox savedbefore 2d | sed 's/^L//g' mailbox: Sent sh-4.3# doveadm expunge -u luuk mailbox '*' savedbefore 2d sh-4.3# doveadm fetch -u luuk mailbox savedbefore 2d | sed 's/^L//g' sh-4.3# doveadm search -u luuk savedbefore 2d sh-4.3# maybe the debug option '-D' gives a clue why it failes on your site? doveadm -D expunge -u user at domain mailbox '*' savedbefore 2d
> maybe the debug option '-D' gives a clue why it failes on your site? > > doveadm -D expunge -u user at domain mailbox '*' savedbefore 2dI don't see any errors in the debug output. And if there was an error, one would expect to see an error message when running the expunge command even without debugging turned on. Thanks for trying. I've got to put this aside for a few days to meet a deadline for another project. I'll pick it up with more testing after that. Michael