imap transfer

Raymond Sundland raymond at sundland.com
Thu Sep 1 15:49:37 EDT 2005


Ah yeah this is good, too.  I didn't think of that in my response.  This way
you don't need to distribute new passwords.

 

But a small modification to this flow, because I don't think you need to go
so far with storing passwords.  This is assuming, of course, you have full
access to LDAP in the first place:

 

Generate file with usernames (source and dest if they are different)

Cycle through File:

*	Save userPassword entry from LDAP1
*	Reset userPassword entry on LDAP1 to something generic
*	Reset userPassword entry on LDAP2 to the same generic
*	Use imapsync to perform the synchronization of the mailbox (using
the generic password for both IMAP boxes)
*	Set the userPassword entry on LDAP2 with the hashed value obtained
from LDAP1

 

Email is transferred, password doesn't change.

 

 

-----Original Message-----
From: info-cyrus-bounces at lists.andrew.cmu.edu
[mailto:info-cyrus-bounces at lists.andrew.cmu.edu] On Behalf Of Kevin Baker
Sent: Thursday, September 01, 2005 3:15 PM
To: Sujit Choudhury
Cc: info-cyrus at lists.andrew.cmu.edu
Subject: Re: imap transfer

 

A solution to this is a script setup like this:
- external file with
username_src,known_password_src,username_dest,known_password_dest
- cycle through file
    - login to ldap on src account 
        - save current encrypted password
        - change password to SHA or MD5 enc version of  password_src above
    - migrate mail with imapsync for account
    -login to ldap on dest account
       - change password to saved current(original) encyrpted password. No
need to reencrypt

I ended up just changing everyones password to "password" and had them
change it back after... but was heading to ward the above.

Hope this helps... Sounds funky but the above is actually not that complex.
I'm not  a shell guy so was going ot write it in PHP to be run at
commandline.

Kevin Baker




Sujit Choudhury wrote: 

After getting advice from various people I tried imapsync, as I was moving
one mailbox to another within cyrus environment on the same machine. 
So far everything went ok; however only one problem I encountered - I
required the passwords of both set of accounts.  As I will be dealing with
400+ accounts, this might be the biggest challenge. 
To make the matter worse, the accounts are authenticated via ldap. 
Anyway I have done two so far and one person was overjoyed. 

Thanks to everybody who came up with various suggestions. 

Sujit Choudhury 



Sujit Choudhury wrote: 



We have two users.  We would like to copy all the mail from one user to
another.  What is the best way to do it? 
Copying file by file will not work as it would clash with existing names
like 300. etc. 
Renaming is out of question as we would like to preserve both the accounts. 

Any idea will be appreciated. 

Regards 

Sujit 
---- 
Cyrus Home Page: http://asg.web.cmu.edu/cyrus 
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu 
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html 

---- 
Cyrus Home Page: http://asg.web.cmu.edu/cyrus 
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu 
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html 



 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.andrew.cmu.edu/mailman/private/info-cyrus/attachments/20050901/b96c8294/attachment.html


More information about the Info-cyrus mailing list