Fixing stale entries in 'mailboxes.db'...

Karl Pielorz kpielorz_lst at tdx.co.uk
Mon Mar 18 07:21:12 EDT 2019


Hi,

We're running Cyrus IMAP 2.5.12 under FreeBSD.

While 'spring cleaning' one of our IMAP servers - aside from having to 
reconstruct a mailbox, I also found in 'mailboxes.db' (seen via 
'ctl_mboxlist -d') we have some entries that have no corresponding 
directories on the disk, e.g.

  user.kpielorz.Archive.1-OldLogs    16 (null)

This doesn't appear to be causing an issue - but I can't see a way to 
remove them.

e.g. If I use 'cyradm' to "cm" that mailbox, and then log in with an IMAP 
client - and delete it, the client correctly deletes it - and it goes from 
the shown hierarchy.

If I then expire the deleted folder with 'cyr_expire -D0 -p 
DELETED.user.kpielorz' - I can see it's "really been" deleted in syslog 
[and from the 'DELETED' IMAP folder] - but the entry in mailboxes.db 
persists.

Is there any way of removing these? - Are they OK to leave behind?

I don't really want to have to dump / re-load mailboxes.db - there's 
entries in that "16   (null)" state from a long time ago - they seem to be 
getting 'left behind' when folders are deleted / expired? Some seem to be 
very, very old (so it doesn't appear they'll timeout and disappear or 
anything).

Anyone seem similar, or know what can be done with them?

Thanks,

-Karl


More information about the Cyrus-devel mailing list