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 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 801 bytes Desc: OpenPGP digital signature URL: <https://dovecot.org/pipermail/dovecot/attachments/20180814/f6e304a7/attachment-0001.sig>
can you turn on mail_debug=yes and run doveadm -Dv mailbox delete and provide output and logs from both servers? ---Aki TuomiDovecot oy -------- Original message --------From: Ralf Becker <rb at egroupware.org> Date: 14/08/2018 16:13 (GMT+02:00) To: dovecot at dovecot.org Subject: doveadm mailbox delete not working 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://dovecot.org/pipermail/dovecot/attachments/20180814/dae8dbf4/attachment.html>
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, 14 Aug 2018, Ralf Becker wrote:> Date: Tue, 14 Aug 2018 15:13:12 +0200 > From: Ralf Becker <rb at egroupware.org> > To: dovecot at dovecot.org > Subject: doveadm mailbox delete not working > > 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> Any ideas?I haven't seen this idea and you've wrote nothing about the ^M: The ^M means that there is a "\015" / \r at the end of the output. Where does this char come from? In "normal" output, this char is almost invisible, esp. at the end of a line. I don't know how Dovecot handles this char internally. The char should show up in the JSON formatted list, Aki suggested, too: doveadm -fjson mailbox list -u user INBOX/* But I haven't seen the output in your replies. Can you verify in the filesystem, if the char is there, too? E.g. ls -1 | cat -v Maybe doveadm mailbox delete? -u <username> 'INBOX/Fachbereiche '"\015" Would help? - -- Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEVAwUBW3QxbcQnQQNheMxiAQJ1vggAmYnlV4xnMJmec34RnpkQpHlz+NK+JnPY JYB3HsI4RwShJwFp7kDpa8GQDub4Hml249v2Hy2TAd270j7QYJn258vyLMJjrIzy Gi82Q/M65mF6seYtOXsR6sl9qqXcEZaVPsSUmHTpP+JfNEGye1RCfuqoaoV0pSuu Kdv8naUDtdTvXVqJfe3McPRbx/+PZouMGLk1AuH3ol0fM+K4SMM65eZDp4VlbZvb ZBklQleH7K8bz2p1rV6yhsJ/1KooS/QgaGz4Ejfm5U2FVFb2dpuAkVFNMu1LpJP9 gD9Y5cH6CbuPYlp2t/8xrozIUpZ/q7CBfdRZVdm3DsaiEnRtq4g4Lg==OaBM -----END PGP SIGNATURE-----
Hi Steffen, Am 15.08.18 um 15:58 schrieb Steffen Kaiser:> On Tue, 14 Aug 2018, Ralf Becker wrote: > > > Date: Tue, 14 Aug 2018 15:13:12 +0200 > > From: Ralf Becker <rb at egroupware.org> > > To: dovecot at dovecot.org > > Subject: doveadm mailbox delete not working > > > 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 > > > Any ideas? > > I haven't seen this idea and you've wrote nothing about the ^M:The ^M is the regular CR from the doveadm output converted by cat -v and I used it to show there is a trailing space.> The ^M means that there is a "\015" / \r at the end of the output. > Where does this char come from? In "normal" output, this char is > almost invisible, esp. at the end of a line. I don't know how Dovecot > handles this char internally. > > The char should show up in the JSON formatted list, Aki suggested, too: > > doveadm -fjson mailbox list -u user INBOX/* > > But I haven't seen the output in your replies. > > Can you verify in the filesystem, if the char is there, too? E.g. > ls -1 | cat -vroot at ka-nfs-mail:/poolN/dovecot/imap/<domain>/<user>/mdbox/mailboxes# ls -1|cat -v|grep hbereich [Fachbereiche [Fachbereiche [Fachbereiche] Fachbereiche hbereiche So there is no ^M/CR in the filename itself. Ralf> Maybe > > doveadm mailbox delete? -u <username> 'INBOX/Fachbereiche '"\015" > Would help? > > -- Steffen Kaiser-- 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 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 801 bytes Desc: OpenPGP digital signature URL: <https://dovecot.org/pipermail/dovecot/attachments/20180815/9c4d1ea4/attachment-0001.sig>
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 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 801 bytes Desc: OpenPGP digital signature URL: <https://dovecot.org/pipermail/dovecot/attachments/20180815/337e9de9/attachment.sig>
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 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 801 bytes Desc: OpenPGP digital signature URL: <https://dovecot.org/pipermail/dovecot/attachments/20180815/2935a8f7/attachment.sig>