<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p><br>
</p>
<div class="moz-cite-prefix">On 6.3.2019 10.24, Maria Arrea via
dovecot wrote:<br>
</div>
<blockquote type="cite"
cite="mid:trinity-52d94905-8830-44d9-9b3a-48bfda36d943-1551860678951@3c-app-mailcom-bs01">
<div>We are happy users of Dovecot 2.3.4.1 . We run a cronjob that
deletes from Trash messages older than 15 days, this is the
command we run:</div>
<div> </div>
<div><em>/usr/bin/doveadm expunge -u $USER mailbox Trash
savedbefore 15d</em></div>
<div> </div>
<div>But this commands does NOT delete folders inside Trash.
doveadm-expunge man page says nothing about recursive expunge.
Maybe is not implemented?</div>
<div> </div>
<div>We can not use doveadm mailbox delete, because has no search
query argument. We could elaborate a complex doveadm-search
query and with xargs feed it do mailbox delete, but must be an
easier way, how do you cope with old folders in Trash?</div>
</blockquote>
<p><br>
</p>
<p>Expunge only deletes mails. Just like IMAP EXPUNGE command. You
need to use mailbox delete to delete mailboxes.<br>
</p>
<p>Aki<br>
</p>
</body>
</html>