expunging all mailboxes

Luuk dovecot at vosslamber.nl
Sat Dec 31 14:51:39 UTC 2016



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


More information about the dovecot mailing list