Reconstruct mailbox for a specific user.

anant at isac.gov.in anant at isac.gov.in
Mon Dec 10 22:43:07 EST 2012


----- Message from dwhite at olp.net ---------
     Date: Mon, 10 Dec 2012 13:21:03 -0600
     From: Dan White <dwhite at olp.net>
  Subject: Re: Reconstruct mailbox for a specific user.
       To: anant at isac.gov.in
       Cc: info-cyrus at lists.andrew.cmu.edu


> On 12/10/12 16:42 +0530, anant at isac.gov.in wrote:
>> Dear Experts,
>>
>> I did reconstruct mailboxes of all users, using the script in
>> README.HOWTO-recover-mailboxes.db.  Following is the extract of the
>> script (for reconstruct)
>>
>> --
>> find /var/spool/imap/user -maxdepth 1 -mindepth 1 | \
>> while read i; do
>>    i=$(basename $i)
>>    /usr/lib/cyrus-imapd/reconstruct -rf user.${i}
>>    /usr/lib/cyrus-imapd/quota -f user.${i}
>> done
>> --
>>
>> One of the users mailbox has one more level of sub folder like
>>
>> user.xxx.ABC
>> user.xxx.ABC.def
>>
>> Right now, folders of level user.xxx are seen, but folders at
>> user.xxx.ABC including ABC are not seen.
>>
>> Should I run,
>> /usr/lib/cyrus-imapd/reconstruct -rf user.xxx.ABC now? That is when
>> Cyrus-imapd is already running?  Or I should stop the service and run
>> reconstruct?  Please advise.
>
> You can run reconstruct and quota while cyrus-imapd is running.
>
> If reconstruct does not succeed, verify the mailbox(es) are listed within
> the output of 'ctl_mboxlist -d'. If not, you should add them via cyradm.
> reconstruct may also fail for a given mailbox if you are missing the
> cyrus.* files within its directory.
>
> You might wish to backup the contents of the directories in question before
> proceeding, in case you end up with missing flags or other data.
>
> -- 
> Dan White

What I found is

1. /var/spool/imap/user/xxx exists
2. /var/spool/imap/user has several directories
3. All other directories except ABC are listed as folders under  
user.xxx and are seen by IMAP clients.
4. ABC directory has subfolders like /var/spool/imap/user/xxx/ABC/1, 2  
3 etc and each of these subdirectories has cyrus.* files except ABC  
directory.  As you said, as ABC directory does not have cyrus.* files,  
reconstruct has failed to recognise it and hence its subdirectories.

Should I run reconstruct -r -f user.xxx.ABC or cm user.xxx.ABC and  
then run reconstruct -r -f user.xxx.ABC?

Sorry to bother you.  Thanks in advance.

Regards
Anant


>


----- End message from dwhite at olp.net -----



------------------------------------------------------------------------------
Confidentiality Notice: This e-mail message, including any attachments, is for
the sole use of the intended recipient(s) and may contain confidential and
privileged information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient, please
contact the sender by reply e-mail and destroy all copies of the original
message.
------------------------------------------------------------------------------


More information about the Info-cyrus mailing list