How to clean up database garbages?

Kai Wang kwang at ucalgary.ca
Wed Aug 16 11:37:32 EDT 2006


I did 'ctl_mboxlist -d > mboxlist.txt' and found all the mailbox names 
in mboxlist.txt are valid. The old mailbox names only appear in the 
/usr/lib/cyrus-imapd/quota command output. In this case, I guess, I just 
need to do the last two steps ('rm /var/lib/imap/user/?/*username*' and 
'rm /var/lib/imap/quota/?/*username*') and can do them while services 
are still on, . Am I right?


Simon Brown wrote:
> 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* 
>>>       
-- 
Kai Wang
System Services
Information Technologies, University of Calgary,
2500 University Drive, N.W.,
Calgary, Alberta, Canada T2N 1N4
Phone (403) 220-2423, Fax (403) 282-9361



More information about the Info-cyrus mailing list