Last active
August 29, 2015 14:01
-
-
Save DanielVF/61229d54311a42fe2a93 to your computer and use it in GitHub Desktop.
Using imapsync to copy accounts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Install and use imapsync to copy imap accounts between servers | |
| # Known issues: | |
| # - Same username on both servers | |
| # - Same password on both servers | |
| # - No special characters in passwords | |
| # - You'll want to run in parallel on big moves. | |
| aptitude install libmail-imapclient-perl libterm-readkey-perl libio-socket-ssl-perl libdigest-hmac-perl liburi-perl libfile-copy-recursive-perl | |
| git clone https://github.com/imapsync/imapsync.git | |
| cd imapsync | |
| function transfer { | |
| USER=$1 | |
| PASS=$2 | |
| SRC=#PUT SRC IP HERE | |
| DEST=#PUT DEST IP HERE | |
| echo transfering $USER | |
| ./imapsync --host1 $SRC --user1 $USER --password1 $PASS --host2 $DEST --user2 $USER --password2 $PASS | |
| } | |
| # usage | |
| # transfer [email protected] paskfwpekfpwkf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment