Difference between revisions of "Talk:Imapsync"
(install on SME9beta2) |
(Example using regextrans2) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
− | ==== Install imapsync on SME9beta2 | + | ====Example Renaming Destination Folder==== |
+ | Imapsync can rename folders as it transfers email. This example transfers 'zLearnAsSpam' and 'zLearnAsHam' from 'Public Folders' on server1 to 'LearnAsSpam' and 'LearnAsSpam' in the root of the destination user's mailbox. | ||
+ | |||
+ | The renaming is accomplished using the 'regextrans2' directive. | ||
+ | |||
+ | Tested with imapsync v1.350 | ||
+ | |||
+ | <nowiki>usr/bin/imapsync \ | ||
+ | --noauthmd5 --buffersize 8192000 --nosyncacls \ | ||
+ | --host1 192.168.1.11 --port1 993 --ssl1 --user1 username1 --passfile1 /root/secret1 \ | ||
+ | --delete --expunge1 --prefix1 "Public Folders." \ | ||
+ | --host2 localhost --port2 993 --ssl2 --user2 username2 --passfile2 /root/secret2 \ | ||
+ | --folder "Public Folders/zLearnAsSpam" \ | ||
+ | --folder "Public Folders/zLearnAsHam" \ | ||
+ | --regextrans2 's/Public.Folders.//' \ | ||
+ | --regextrans2 's/zLearn/Learn/' \ | ||
+ | --noauthmd5</nowiki> | ||
+ | |||
+ | == Install imapsync on SME9beta2 == | ||
CentOS6 / SME9 includes one of the imapsync dependencies (perl-Parse-RecDescent) in the 'base' repo. Consequently, it does not exist in the dag repo. | CentOS6 / SME9 includes one of the imapsync dependencies (perl-Parse-RecDescent) in the 'base' repo. Consequently, it does not exist in the dag repo. | ||
Line 5: | Line 23: | ||
yum --enablerepo=dag,base install imapsync | yum --enablerepo=dag,base install imapsync | ||
+ | |||
+ | == Older Notes and Comments == | ||
<nowiki>==== Install imapsync ==== | <nowiki>==== Install imapsync ==== | ||
yum --enablerepo=dag install perl-Mail-IMAPClient-2.2.9 imapsync | yum --enablerepo=dag install perl-Mail-IMAPClient-2.2.9 imapsync |
Latest revision as of 02:32, 5 January 2014
Example Renaming Destination Folder
Imapsync can rename folders as it transfers email. This example transfers 'zLearnAsSpam' and 'zLearnAsHam' from 'Public Folders' on server1 to 'LearnAsSpam' and 'LearnAsSpam' in the root of the destination user's mailbox.
The renaming is accomplished using the 'regextrans2' directive.
Tested with imapsync v1.350
usr/bin/imapsync \ --noauthmd5 --buffersize 8192000 --nosyncacls \ --host1 192.168.1.11 --port1 993 --ssl1 --user1 username1 --passfile1 /root/secret1 \ --delete --expunge1 --prefix1 "Public Folders." \ --host2 localhost --port2 993 --ssl2 --user2 username2 --passfile2 /root/secret2 \ --folder "Public Folders/zLearnAsSpam" \ --folder "Public Folders/zLearnAsHam" \ --regextrans2 's/Public.Folders.//' \ --regextrans2 's/zLearn/Learn/' \ --noauthmd5
Install imapsync on SME9beta2
CentOS6 / SME9 includes one of the imapsync dependencies (perl-Parse-RecDescent) in the 'base' repo. Consequently, it does not exist in the dag repo.
In order to make perl-Parse-RecDescent available to yum, add the 'base' repo to the installation command:
yum --enablerepo=dag,base install imapsync
Older Notes and Comments
==== Install imapsync ==== yum --enablerepo=dag install perl-Mail-IMAPClient-2.2.9 imapsync '''IMPORTANT''' If you install imapsync without specifying perl-Mail-IMAPClient-'''2.2.9''' on the command line as shown above, yum will download and install the latest available version of perl-Mail-IMAPClient - currently 3.x - which does not work according to the author of imapsync. If this happens, you will get an error about IMAPClient every time you run imapsync. If you have accidentally installed the wrong version of IMAPClient, you can correct the problem using the command below. When done, reinstall imapsync as shown above. yum remove perl-Mail-IMAPClient
Above warning removed from main page as it no longer seems relevant. Mmccarn 15:59, 24 September 2011 (MDT)
Brilliant piece of kit - worked very well for me to move some older folders from one account into an archive account on the same server:
imapsync --noauthmd5 --host1 localhost --user1 sourceaccount --host2 localhost --user2 destaccount --folderrec "Name Of Folder With Old Emails In" --password1 "xxxxxxxx" --password2 "xxxxxxxx"
Judgej 13:50, 25 June 2010 (UTC)