Cyrus 2.4.X delete mailbox oddities

David Carter dpc22 at cam.ac.uk
Tue Jun 28 03:58:56 EDT 2011


If I delete a mailbox selected by the current IMAP session in 2.4.X then 
the underlying files are are only removed on logout. I suspect that this 
is a consequence of the new mailbox code, which is fair enough.

I have however discovered two wrinkles when deleting mailboxes selected by 
some other IMAP session. PINE might leave a mailbox selected for days.

1) Deleted mailboxes remained locked:
=====================================

If I delete a mailbox which is selected (either in the current IMAP 
session or some completely unrelated session) then it is not possible to 
create a new mailbox with the same name:

C1:
    . SELECT foo

C2:
    . DELETE foo
    . OK Completed

    . CREATE foo
    . NO Mailbox is locked

until any sessions which have the old mailbox selected are shut down.

2) Debris left on the filesystem
================================

If I DELETE a mailbox which is selected in a separate IMAP session:

C1:
    . SELECT foo

C2:
    . DELETE foo
    . OK Completed

    . LOGOUT

C1:
    . LOGOUT

The cyrus.* and messages files are left on disk, and overwritten in place 
when a subsequent login session creates a mailbox with the same name.

Is this deliberate?

I suppose that the only real danger is that reconstruct might resuscitate 
messages belonging to an earlier version of a mailbox with the same name.

-- 
David Carter                             Email: David.Carter at ucs.cam.ac.uk
University Computing Service,            Phone: (01223) 334502
New Museums Site, Pembroke Street,       Fax:   (01223) 334679
Cambridge UK. CB2 3QH.


More information about the Info-cyrus mailing list