Can't recursively delete mailboxes

Steffen Kaiser skdovecot at smail.inf.fh-brs.de
Thu Aug 17 10:26:53 EEST 2017


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, 17 Aug 2017, Murray T. | Dreamscape wrote:

> This appears to be some sort of dovecot bug.  When I use the -r option to recursively delete a mailbox and sub-folders, it removes the sub-folders but not the inbox.  It gives me the error below:
>
> doveadm mailbox delete -u denise at lifelinetechnique.com.au -r -s inbox
> doveadm(denise at lifelinetechnique.com.au): Error: Can't delete mailbox inbox: INBOX can't be deleted.
>
> Our user database is in ldap and I am using dovecot-ee v2:2.2.31.2-1.  Could you please acknowledge that this is a bug or let me know the correct way of recursively deleting a mailbox as there is nothing in the man page about the -r option.

It's on purpose:

         if (mailbox_is_any_inbox(box)) {
                 /* IMAP protocol allows this, but I think it's safer to
                    not allow it. */
                 mailbox_free(&box);
                 client_send_tagline(cmd, "NO INBOX can't be deleted.");
                 return TRUE;
         }

Why do you want to delete the INBOX of the user?

- -- 
Steffen Kaiser
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEVAwUBWZVFPXz1H7kL/d9rAQIs2wf/X2l5XvHLit36SV9ZwEp6xXccfEv4W+92
nelVf0hk9pSAB5Ai2OkjnTyEMWdCB5hOsoz7saNazjTK6IXd/0C2mIRgZvkUVSXT
tEYIf7rd+IAVYSwzmYKxYagcmf36lwzzqMx8PR5bC4w5n9XvyrO6VNVdULvFu8G1
7jzdBWDcSeLocgQj+V5VtVjOnSqyD3jsRZ1uUW7vLeeJPm97DDtAuIzKs39TfvHt
tNBGRje0kGIs2jjdsE9CIDNG053LaLb6bz2BnCBPsRL39uE/L6++I/IF9Gk8nTTk
4skKAWdZTfinQh0w2zaFR2KiBLN5cdJtI4MpN51uIxKH+zKdHaAhpw==
=MhpO
-----END PGP SIGNATURE-----


More information about the dovecot mailing list