Hi!  In preparation for a migration to a new server, I've had to touch
all ~140k mailboxes on my system, and I've discovered a handful that are
listed by "cyrus mboxlist" (this is Debian/Ubuntu with their "cyrus"
helper script), but that do not correspond to any directory in the 
filesystem.

How can I delete these?  "reconstruct" in cyradm or "cyrus reconstruct"
produce errors like the following:

# cyrus reconstruct user.[redacted].Templates
user.[redacted].Templates: failed to read index header
user.[redacted].Templates: Invalid mailbox name (null)

# cyradm -u cyrus localhost
Password: 
localhost> reconstruct user.[redacted].Templates
reconstruct: Invalid mailbox name

And "deletemailbox" says "Permission denied":

localhost> dm user.[redacted].Templates
deletemailbox: Permission denied

but I can't change ACLs on the ghost mailboxes:

localhost> sam user.[redacted].Templates cyrus all
setaclmailbox: cyrus: lrswipkxtea: Invalid mailbox name

I can, however, list their current ACL:

localhost> lam user.[redacted].Templates
[redacted] lrswipcda

(Again, these do NOT correspond to any directory on the filesystem.)

Obviously, there's nothing in these and the users haven't been able to 
access them, but how can I delete them from the database?

I guess this is sort of a moot point for me since my attempt to transfer
them to the new server is not going to succeed and the bogus mailboxes
won't exist on the new server, but it would be nice not to have to keep
track of which failures (real mailboxes) are problematic and which are
not.

I'm also kind of curious how the mailbox database got in this state.  I 
do notice that these mailboxes tend to have "Trash" or "Test" in them
somewhere, or seem to have the same folder name as another mailbox elsewhere
in the user's hierarchy, so it may be a problem with users moving folders.
Also, I can imagine it might have to do with partially completed restores 
from tape backup, but if so they're probably before my time here.

This is on 2.4.17, BTW.  (Working on a migration to 3.4.3.  After some
failed attempts at setting up replication, I'm just going to be using
imapsync to move people's mailboxes.)

Jay

-- 
Jay Sekora
Linux system administrator and postmaster,
The Infrastructure Group
MIT Computer Science and Artificial Intelligence Laboratory


------------------------------------------
Cyrus: Info
Permalink: 
https://cyrus.topicbox.com/groups/info/Te4b694eca4c5d369-M75454d0dafacd87befaed919
Delivery options: https://cyrus.topicbox.com/groups/info/subscription

Reply via email to