Advice on seen status migration

Robert Baldwin rbaldwin at bynari.net
Wed Sep 22 00:32:19 CEST 2010


Gavin, Thank you for your reply.

My script performs these actions prior to migrating mail.
1) It initializes just the authentication backend(SASL/LDAP) and IMAP 
server for both the old and new servers.
2) Migrates the user authentication information from the old LDAP 
implementation to the new LDAP implementation running as part of Kolab 
server.
It does this using Perl Net::LDAP to make the connection to both 
creating a record for in Kolab LDAP corresponding to each user.

3) Connects as the administrator user to the old IMAP and manager to the 
Kolab IMAP.
It does this user Perl Cyrus::IMAP::Admin to parser the mailbox list.  
Creating each mailbox on the new Kolab server and updating the ACLs as 
it goes.
4) This is all the script does for now and where I am currently stuck.

I am doing the next part manually for now as I try to establish a 
working protocol.

I copy a test users mailbox from the old servers /var/spool/imap folder 
to the users new folder beneath /kolab/var/imapd/spool...  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.  ie: old server ACLs for each user 
testuser1 instead of testuser1 at example.net
Maybe I need to keep one/all these files and fix ACLs afterwards?

I then copy the users .seen file from the old servers /var/imap/user 
folder to the Kolab servers 
/kolab/var/imapd/domain/[a-z]/[domain]/user/[a-z]/[username].seen
ie:
cp /var/imap/user/testuser1.seen 
kolab/var/imapd/domain/e/example.net/user/t/testuser1.seen

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.



On 09/21/2010 04:55 PM, Gavin McCullagh wrote:
> Hi,
>
> On Tue, 21 Sep 2010, Robert Baldwin wrote:
>
>    
>> I am working on a script to migrate users from an standard Cyrus
>> installation to a Kolab server installation.
>> On the source IMAP server the users have simple usernames ie: testuser1
>> whereas on the Kolab server these users are migrating to a full
>> username, ie: testuser1 at example.net, due to this change I believe I
>> cannot simply point the Kolab server at the old Cyrus spool folders.
>>      
> Have you tried?  This is exactly what I did just recently and it worked
> perfectly.  We were migrating kolab v1 to v2 but the usernames changed in
> the same way.  You need to transfer the mail folders themselves into the
> right locations on kolab as well as the .seen, .sub, quota info.  You
> probably also need to do some translation on the cyrus.index file and the
> mailboxes.db.
>
>    
>> My alternative is to copy each users Cyrus spool folder from the old
>> location to the new Cyrus spool folder beneath the Kolab folder and
>> perform a cyrus reconstruct, however that leaves seen/unseen status
>> un-migrated.   Does anyone have any tools or pointers for migrating
>> message seen/unseen status?
>>      
> I did a reconstruct alright but as long as you take the .seen file over
> with you, it should be okay.  We certainly kept all seen flags.
>
> Gavin
>
> _______________________________________________
> Kolab-users mailing list
> Kolab-users at kolab.org
> https://kolab.org/mailman/listinfo/kolab-users
>    




More information about the users mailing list