Re: imap transfer
I have now managed to download imapsync. As I will be transferring mail from one account to another account within the SAME server, do I need to use the passwords of the accounts (which are not available to us)? I can do it as cyrus user hopefully? I am asking this question because I am dealing with live server and don't want to mess it up. If it is successful, is it necessary to do reconstruct? Thanks for all your help. Sujit Tarjei Huse wrote: On Thu, 2005-08-25 at 13:37 +0100, Sujit Choudhury wrote: The problem is little simpler. we have two accounts - one current, the other one is an old one. The idea is to migrate the mail from old one to the current one and expunge the old account at some future date. However the user has only access to the current account, no access to the old account. So the user can not drag or drop or anything like that. On top of that, we also don't have the passwords of neither accounts. Multiply the problem with 450 pairs - this is what we are facing. Maybe you can use a commandline tool like imapsync as and admin user (f.x. cyrus) and do it that way? T Regards Sujit Choudhury Craig White wrote: On Thu, 2005-08-25 at 11:35 +0100, 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. why not use the ACL's to share the one mailbox with the other user? Craig 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 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
Re: imap transfer
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
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 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
RE: imap transfer
Pick a day of the transfer. Generate new passwords for all users on the system. Notify all users of their new passwords as of the date of the transfer you decide on. On the day of the transfer, update the LDAP (or both LDAPs if there are two) with the password assigned and previously distributed to each user. At this point, the password is now the same as the one you distributed, and if you're using two different LDAP servers, the password will be the same on both systems. Now you can use imapsync to migrate the mailbox of the user, knowing what their password is... because you just set it. Being able to script all of this would really be the best way to do it considering the number of users on the system. Likewise, you could do this on an individual basis as well. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of John Madden Sent: Thursday, September 01, 2005 2:40 PM To: Sujit Choudhury Cc: Sujit Choudhury; info-cyrus@lists.andrew.cmu.edu Subject: Re: imap transfer 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. We're about to go through this for about 5,000 accounts (also LDAP-backed). We'll be sending them new passwords that as of such-and-such a date will be what they use to log in. (Generate this list beforehand, then drop the new passwords into place on the migration date.) John -- John Madden UNIX Systems Engineer Ivy Tech Community College of Indiana [EMAIL PROTECTED] 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
RE: imap transfer
Ah yeah this is good, too. I didnt think of that in my response. This way you dont need to distribute new passwords. But a small modification to this flow, because I dont 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 doesnt change. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kevin Baker Sent: Thursday, September 01, 2005 3:15 PM To: Sujit Choudhury Cc: info-cyrus@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 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
RE: imap transfer
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. Yeah, sorry about that. In our situation, we're changing the password hash, so we've got to change them. John -- John Madden UNIX Systems Engineer Ivy Tech Community College of Indiana [EMAIL PROTECTED] 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
Re: imap transfer
Exactly... I guess your version is a bit more clear.. when I say store, I meant in memory ;) I am pretty temped to put this together. As you say it would be ge great for reducing downtime to users... only currently migrated users would have any interuption. Another addition might be to have an ongoing log as to migration status.. The way you could just tail the file for status... Raymond Sundland wrote: Ah yeah this is good, too. I didnt think of that in my response. This way you dont need to distribute new passwords. But a small modification to this flow, because I dont 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 doesnt change. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Kevin Baker Sent: Thursday, September 01, 2005 3:15 PM To: Sujit Choudhury Cc: info-cyrus@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 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
Re: imap transfer
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. We're about to go through this for about 5,000 accounts (also LDAP-backed). We'll be sending them new passwords that as of such-and-such a date will be what they use to log in. (Generate this list beforehand, then drop the new passwords into place on the migration date.) John -- John Madden UNIX Systems Engineer Ivy Tech Community College of Indiana [EMAIL PROTECTED] 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
imap transfer
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
Re: imap transfer
On Thu, 2005-08-25 at 11:35 +0100, 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. why not use the ACL's to share the one mailbox with the other user? Craig 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
Re: imap transfer
The problem is little simpler. we have two accounts - one current, the other one is an old one. The idea is to migrate the mail from old one to the current one and expunge the old account at some future date. However the user has only access to the current account, no access to the old account. So the user can not drag or drop or anything like that. On top of that, we also don't have the passwords of neither accounts. Multiply the problem with 450 pairs - this is what we are facing. Regards Sujit Choudhury Craig White wrote: On Thu, 2005-08-25 at 11:35 +0100, 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. why not use the ACL's to share the one mailbox with the other user? Craig 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
Re: imap transfer
Sujit Choudhury wrote: The problem is little simpler. we have two accounts - one current, the other one is an old one. The idea is to migrate the mail from old one to the current one and expunge the old account at some future date. However the user has only access to the current account, no access to the old account. So the user can not drag or drop or anything like that. On top of that, we also don't have the passwords of neither accounts. Multiply the problem with 450 pairs - this is what we are facing. Well, the original idea still holds. Let the new user read INBOX of old, via ACLs. The new user should just drag-n-drop mails from the old to his new account and you can close the old account. Nix. 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
Re: imap transfer
The problem is little simpler. we have two accounts - one current, the other one is an old one. The idea is to migrate the mail from old one to the current one and expunge the old account at some future date. However the user has only access to the current account, no access to the old account. So the user can not drag or drop or anything like that. On top of that, we also don't have the passwords of neither accounts. Multiply the problem with 450 pairs - this is what we are facing. You could just move the content of the old mailbox to a subfolder of the new mailbox, reconstruct should do the rest. Simon Regards Sujit Choudhury Craig White wrote: On Thu, 2005-08-25 at 11:35 +0100, 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. why not use the ACL's to share the one mailbox with the other user? Craig 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 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
Re: imap transfer
On Thu, 2005-08-25 at 13:37 +0100, Sujit Choudhury wrote: The problem is little simpler. we have two accounts - one current, the other one is an old one. The idea is to migrate the mail from old one to the current one and expunge the old account at some future date. However the user has only access to the current account, no access to the old account. So the user can not drag or drop or anything like that. On top of that, we also don't have the passwords of neither accounts. Multiply the problem with 450 pairs - this is what we are facing. Maybe you can use a commandline tool like imapsync as and admin user (f.x. cyrus) and do it that way? T Regards Sujit Choudhury Craig White wrote: On Thu, 2005-08-25 at 11:35 +0100, 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. why not use the ACL's to share the one mailbox with the other user? Craig 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 -- Tarjei Huse [EMAIL PROTECTED] 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
Re: imap transfer
You may try deliver. a line like : /opt/cyrus/bin/deliver $dest message iterated over the messages,where $dest stands for the destination mailbox name, should do the trick. It must be run as the cyrus user I tried that only to copy inbox to inbox You may check man deliver for further details Hope this helps Regards Pascal 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 -- Pascal Mouret DSII - Direction du Système d'Information et de l'Informatique Université de Provence - 3, place Victor Hugo - 13331 Marseille cedex 3 Tél: 04 91 10 64 02E-mail: [EMAIL PROTECTED] Fax: 04 91 08 35 00 ou[EMAIL PROTECTED] (Ligne d'assistance (interne) : 04 91 10 85 55 / 04 42 95 34 54) 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