How to clean up database garbages?

Simon Brown sbrown at firstcollateral.com
Tue Aug 15 21:07:27 EDT 2006


On 8/15/06 5:07 PM, "info-cyrus-request at lists.andrew.cmu.edu"
<info-cyrus-request at lists.andrew.cmu.edu> wrote:

> I'm in the process of migrating from uw-imap servers to cyrus servers. I
> cloned my second cyrus server from the first one and forgot to
> initialize the database. My second machine is in production. I found the
> first machine's accounts are on the second one and I can not delete them
> because the mail store is gone. Does anybody know if there is any force
> delete option to clean up this?


The following is how I've done it on an OSX Server. Anyone else have a
better method?

>>  - su - cyrusimap
>>  - ctl_mboxlist -d > ~/mboxlist.txt
>>  - cp ~/mboxlist.txt ~/mboxlist.bak
>>  - edit ~/mboxlist.txt and remove lines containing this user.
>>  - cp /Volumes/GroupWare\ Data/mail_datqbase/mailboxes.db ~
>>  - rm /Volumes/GroupWare\ Data/mail_datqbase/mailboxes.db
>>  - cat ~/mboxlist.txt | ctl_mboxlist -u
>>  - rm -rf /var/spool/imap/username
>>  - rm /var/lib/imap/user/?/*username*
>>  - rm /var/lib/imap/quota/?/*username* 

-- 
Simon Brown
Network Support Analyst
First Collateral Services
(925) 349-1397





More information about the Info-cyrus mailing list