Reconstruct mailbox for a specific user.

Andrew Morgan morgan at
Tue Dec 11 23:55:04 EST 2012

On Wed, 12 Dec 2012, anant at wrote:

>>>>> One of the users mailbox has one more level of sub folder like
>>>>> Right now, folders of level are seen, but folders at
>>>>> including ABC are not seen.
>>>>> Should I run,
>>>>> /usr/lib/cyrus-imapd/reconstruct -rf 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 
>>> 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 or cm and 
>>> then run reconstruct -r -f
>> Create a cyrus.header file in the ABC directory, set the ownership 
>> and permissions.  Something like this:
>> touch cyrus.header
>> chown cyrus:mail cyrus.header
>> chmod 600 cyrus.header
>> Then run:
>> reconstruct -x -f
>> I should have asked at the beginning - are there any message files 
>> in (1., 2., 3., etc) in the ABC directory?
>> 	Andy
> NO. There are no message files in ABC directory.  There are only 
> directories in ABC directory and each such directory has message files 
> and also cyrus.* files.
> I am thinking of another option, move all such directories under ABC 
> to one level higher, that is at level and run reconstruct -r 
> -f
> But, you still suggest, which is the best way.

What happens when you run:

reconstruct -x -f



More information about the Info-cyrus mailing list