Mailbox deletion race: folders and files are never deleted

Jeroen van Meeuwen (Kolab Systems) vanmeeuwen at
Thu Feb 26 14:31:20 EST 2015

On 2015-02-26 16:51, Samir Aguiar wrote:
> Proposed solution:
> - Patch the mailbox_close() function to reload the index before trying 
> to
> clean the files (and merge the current index changes with the ones 
> found)
> - Because the above would still be skipped when shutting down Cyrus: 
> expand
> cyr_expire to find mailboxes with the deleted flag set (by looping 
> through the
> filesystem, and not by using the database) and try to remove them. This 
> could
> then be run periodically by administrators.
> What do you think?

Please do not take my word for it, but I think Cyrus IMAP 2.5 introduces 
a state flag of MBTYPE_DELETE for mailboxes [1] in the actual mboxlist, 
so the related functions would still be able to find it after the facts 
of the case.

IIRC, I ran in to this (particular MBTYPE) because it purges ACLs, and 
rendered (discrete) murder topologies unable to ctl_mboxlist -m (as well 
as made ctl_mboxlist -d segfault).

I think the intention is exactly what you describe is the scenario, but 
if it is I'm not certain it also properly addresses it.

Kind regards,

Jeroen van Meeuwen


Systems Architect, Kolab Systems AG

e: vanmeeuwen at
m: +41 79 951 9003

pgp: 9342 BF08

More information about the Cyrus-devel mailing list