Unexpected behavior of doveadm mailbox delete -e -s

Mar Alegre dovecot at mar.alemor.org
Sun Dec 13 06:59:17 EET 2020


Hello,

I have encountered what I believe to be a bug, or at least inaccurate 
documentation. I am running version 2.3.4.1 of Dovecot (installed via 
the default repo for Debian 10), so my apologies if this has been fixed 
in a more recent version. I tried to look for changelogs but was not 
able to find any.

The `doveadm mailbox delete` command accepts flags `-e` and `-s` (among 
others). The flags are described by both the man pages and the wiki as 
follows:

- `-e`: Require mailboxes to be empty before deleting.
- `-s`: Unsubscribe deleted mailboxes.

Based on these descriptions, I would expect that when both of these 
flags are combined, a directory that is not empty would be neither 
deleted nor unsubscribed. However, I have discovered that when I run the 
command `doveadm mailbox delete -u $myusername -e -s $non_empty_dir`, 
the result is that the directory is not deleted, but it *is* unsubscribed.

I assume this is a bug, but if it is intended, the documentation should 
probably be updated to more clearly communicate that the `-s` flag will 
cause a directory to be unsubscribed even if it is not deleted.

Best,
Mar Alegre


More information about the dovecot mailing list