doveadm mailbox delete not working
Aki Tuomi
aki.tuomi at dovecot.fi
Wed Aug 15 20:23:56 EEST 2018
Actually you are using separator /, so making folder
INBOX/[Test / Test] =>
"INBOX" sep "[Test " sep " Test]"
but it will not create "INBOX/[ Test " (it will be noselect folder, parent for "INBOX/[Test / Test]")
and thus will be deleted once you delete INBOX/[Test / Test]
"doveadm(testuser1): Error: Can't delete mailbox INBOX/[Test : Mailbox has children, delete them first"
also mailbox list has feature that it will always list whatever folder you give it, so even if you do
doveadm mailbox list "This Does Not Exist"
you will still see it. A feature, not a bug. =)
you could try
doveadm exec imap -u victim
LIST "INBOX/" "*"
to see which are the select, and which are the noselect parent ones, they should go away once you delete the children.
Aki
> On 15 August 2018 at 19:37 Ralf Becker <rb at egroupware.org> wrote:
>
>
> One more update, I tried renaming that "[Test " folder to just "Test",
> which creates an also not deletable folder "Test".
>
> Good news is, if I delete these folders on both replication nodes from
> mdbox/mailboxes and mdbox/subscriptions they seem to be really gone.
> I can event create the folder "Test" again and it behaves normal aka. I
> can delete it afterwards via IMAP.
>
> Any objections againts that workaround (deleting the folder in
> mdbox/mailboxes and from mdbox/subscriptions)?
>
> Ralf
>
> Am 15.08.18 um 18:23 schrieb Ralf Becker:
> > I found a way to reproduce the problem :)
> >
> > Use an arbitrary mailbox (maybe my Dovecot config with mdbox etc. required).
> > Then use Thunderbird (52.9.1 on Mac) to create eg. the following folder
> > (without the quotes!):
> >
> > "[Test / Test]"
> >
> > This is a space, a slash and a space between the Test in square brackets.
> >
> > TB now creates the following two folders:
> >
> > 1. "INBOX/[Test " (not subscribed)
> > 2. "INBOX/[Test / Test]" (subscribed)
> >
> > I can delete the 2. one, but the 1. one is not deletable, neither via TB
> > nor doveadm command:
> >
> > / # doveadm mailbox status -u bb at bb-trunk.egroupware.de all 'INBOX/[Test '
> > doveadm(bb at bb-trunk.egroupware.de): Error: Mailbox INBOX/[Test : Failed
> > to lookup mailbox status: Mailbox doesn't exist: INBOX/[Test
> > / # doveadm mailbox delete -u bb at bb-trunk.egroupware.de 'INBOX/[Test '
> > doveadm(bb at bb-trunk.egroupware.de): Info: Mailbox deleted: INBOX/[Test
> > / # doveadm mailbox list -u bb at bb-trunk.egroupware.de 'INBOX/[Test '
> > INBOX/[Test
> >
> > I can see the folder under mdbox/mailboxes and in mdbox/subscriptions.
> >
> > I hope that allows you to reproduce it.
> >
> > Ralf
> >
> > Am 14.08.18 um 15:13 schrieb Ralf Becker:
> >> I have a user who has several folders in his mailbox, which we can not
> >> delete, neither via IMAP nor via doveadm:
> >>
> >> root at ka-nfs-mail:~# doveadm mailbox list -u <username> | grep hbereiche
> >> | cat -v
> >> INBOX/[Fachbereiche ^M
> >> INBOX/Fachbereiche ^M
> >> INBOX/hbereiche^M
> >> INBOX/hbereiche/LAGen]^M
> >> INBOX/hbereiche/LAG^M
> >> INBOX/[Fachbereiche^M
> >> INBOX/[Fachbereiche/LAGen]^M
> >> INBOX/[Fachbereiche]^M
> >> INBOX/[Fachbereiche]/LAGen]^M
> >> INBOX/[Fachbereiche]/LAGe^M
> >> root at ka-nfs-mail:~# doveadm mailbox delete -u <username>
> >> 'INBOX/Fachbereiche '
> >> doveadm(<username>): Info: Mailbox deleted: INBOX/Fachbereiche
> >> root at ka-nfs-mail:~# doveadm mailbox list -u <username>| grep hbereiche |
> >> cat -v
> >> INBOX/[Fachbereiche ^M
> >> INBOX/Fachbereiche ^M
> >> INBOX/hbereiche^M
> >> INBOX/hbereiche/LAGen]^M
> >> INBOX/hbereiche/LAG^M
> >> INBOX/[Fachbereiche^M
> >> INBOX/[Fachbereiche/LAGen]^M
> >> INBOX/[Fachbereiche]^M
> >> INBOX/[Fachbereiche]/LAGen]^M
> >> INBOX/[Fachbereiche]/LAGe^M
> >>
> >> As far as I tried none of these folders can be deleted (I added single
> >> quotes for trailing space and tried to delete subfolders first).
> >>
> >> Mailbox is in mdbox format on a replication pair under Dovecot 2.2.36
> >> and I tried both nodes of the replication with same result.
> >>
> >> Any ideas?
> >>
> >> Ralf
> >>
>
> --
> Ralf Becker
> EGroupware GmbH [www.egroupware.org]
> Handelsregister HRB Kaiserslautern 3587
> Geschäftsführer Birgit und Ralf Becker
> Leibnizstr. 17, 67663 Kaiserslautern, Germany
> Telefon +49 631 31657-0
>
>
More information about the dovecot
mailing list