So, along with the problem of lots of folders ending in 1 1 1 1, I'd like to have a strategy to delete these. I was trying to understand if it is possible to use http://linux.die.net/man/1/doveadm-expunge to delete empty folders, but without also deleting messages? Is this possible and if so what is the syntax? Kind regards, Samuel
With doveadm mailbox status -u ... messages"*" There is a list of folders and the number of messages and then with doveadm mailbox delete -u ... "<name>" to delete. Am 20.03.2015 um 21:18 schrieb Samuel Williams:> So, along with the problem of lots of folders ending in 1 1 1 1, I'd like > to have a strategy to delete these. > > I was trying to understand if it is possible to use > http://linux.die.net/man/1/doveadm-expunge to delete empty folders, but > without also deleting messages? Is this possible and if so what is the > syntax? > > Kind regards, > Samuel
Thanks Hardy. I have 1600 folders to delete.. in the end I did find -type d -name "* 1" -exec rm -r {} \; On 21 March 2015 at 21:22, Hardy Flor <HFlor at gmx.de> wrote:> With > doveadm mailbox status -u ... messages"*" > There is a list of folders and the number of messages and then with > doveadm mailbox delete -u ... "<name>" > to delete. > > Am 20.03.2015 um 21:18 schrieb Samuel Williams: > > So, along with the problem of lots of folders ending in 1 1 1 1, I'd like >> to have a strategy to delete these. >> >> I was trying to understand if it is possible to use >> http://linux.die.net/man/1/doveadm-expunge to delete empty folders, but >> without also deleting messages? Is this possible and if so what is the >> syntax? >> >> Kind regards, >> Samuel >> >
On 21 Mar 2015, at 05:18, Samuel Williams <space.ship.traveller at gmail.com> wrote:> > So, along with the problem of lots of folders ending in 1 1 1 1, I'd like > to have a strategy to delete these. > > I was trying to understand if it is possible to use > http://linux.die.net/man/1/doveadm-expunge to delete empty folders, but > without also deleting messages? Is this possible and if so what is the > syntax?-d Delete the mailbox if it is empty after expunging. So create an expunge query that matches no messages: doveadm expunge -d mailbox '*' not all