Advice on seen status migration

Gavin McCullagh gavin.mccullagh at gcd.ie
Wed Sep 22 12:55:45 CEST 2010


Hi,

On Tue, 21 Sep 2010, Robert Baldwin wrote:

> I copy a test users mailbox from the old servers /var/spool/imap folder 
> to the users new folder beneath /kolab/var/imapd/spool...  

Okay.

> When I copy the mailbox data I avoid copying cyrus.header, cyrus.index or
> cyrus.cache because including these results in overwriting the new ACLs 
> with the old now incorrect ACLs.  

What I did was 

0. Stop all cyrus related processes
1. Sync the mailbox, ommitting cyrus.cache and cyrus.squat only
2. Translate the cyrus.header file to update the ACLs both with the new
   user at domain and the new ACL value using two reg expressions:
	"s/([a-z0-9.-]*)(\s*)(lrs[wipkxtecda]*)/\2@$DOMAIN\3\4/ig"
	"s/lrswipcda/lrswipkxtecda/"
3. Copy the .seen and .sub files from their old location to their new.
4. Make sure permissions and ownerships are correct in the new locations.
5. Run a reconstruct on the mailbox.

I can't say this will work for every situation, but it worked for ours.

> With the mailbox data and seen file in place I then perform a 
> reconstruct.  When the account is accessed afterwards all email appears 
> as unseen.  I can verify afterwards that the seen file was accessed 
> because it now no longer matches md5sum with the .seen file it was 
> copied from.

I wonder is this due to the loss of cyrus.index and/or cyrus.header.

Gavin




More information about the users mailing list