From b7c835d670d55b69e078a72bedd4aaf2f596c319 Mon Sep 17 00:00:00 2001 From: Nick Bebout Date: Thu, 3 Dec 2015 11:16:32 -0600 Subject: [PATCH] 1.670 --- CREDITS | 10 +- ChangeLog | 127 +- FAQ | 423 +- FAQ.d/FAQ.Domino.txt | 30 +- FAQ.d/FAQ.Dovecot.txt | 4 +- FAQ.d/FAQ.Duplicates.txt | 11 +- FAQ.d/FAQ.Exchange.txt | 141 +- FAQ.d/FAQ.Flags.txt | 4 +- FAQ.d/FAQ.Folders_Mapping.txt | 38 +- FAQ.d/FAQ.Gmail.txt | 205 +- FAQ.d/FAQ.ISP.txt | 72 + FAQ.d/FAQ.Massive.txt | 89 +- FAQ.d/FAQ.Messages_selection.txt | 93 + FAQ.d/FAQ.Oracle-UCS.txt | 15 + FAQ.d/FAQ.Security.txt | 21 + FAQ.d/FAQ.SmarterMail.txt | 46 + FAQ.d/FAQ.Various_Server_Softwares.txt | 283 + FAQ.d/FAQ.XOAUTH2.txt | 110 + INSTALL | 15 +- INSTALL.d/INSTALL.CPanel.txt | 3 + INSTALL.d/INSTALL.Centos.txt | 40 +- INSTALL.d/INSTALL.Darwin.txt | 115 +- INSTALL.d/INSTALL.Debian.txt | 6 + INSTALL.d/INSTALL.FreeBSD.txt | 6 +- INSTALL.d/INSTALL.Mandriva.txt | 2 + INSTALL.d/INSTALL.Ubuntu.txt | 2 + LICENSE | 4 +- Makefile | 111 +- NOLIMIT | 4 +- OPTIONS | 408 +- README | 44 +- S/external.shtml | 10 +- S/imapservers.shtml | 10 +- S/imapsync_sold_by_country.txt | 82 + S/news.shtml | 112 +- S/template.shtml | 2 +- TODO | 30 +- VERSION | 2 +- VERSION_EXE | 2 +- W/.BUILD_EXE_TIME | 34 + W/{CONCEPTION => CONCEPTION.txt} | 0 W/LOG_imapsync/2015_10_22_15_58_28.txt | 33 + W/Mail-IMAPClient-3.37.tar.gz | Bin 0 -> 188964 bytes W/Mail-IMAPClient-3.37/Changes | 2291 +++ W/Mail-IMAPClient-3.37/MANIFEST | 40 + W/Mail-IMAPClient-3.37/META.json | 56 + W/Mail-IMAPClient-3.37/META.yml | 36 + W/Mail-IMAPClient-3.37/Makefile.PL | 138 + W/Mail-IMAPClient-3.37/README | 97 + W/Mail-IMAPClient-3.37/examples/build_dist.pl | 172 + W/Mail-IMAPClient-3.37/examples/build_ldif.pl | 235 + W/Mail-IMAPClient-3.37/examples/cleanTest.pl | 64 + .../examples/copy_folder.pl | 147 + .../examples/cyrus_expire.pl | 111 + .../examples/cyrus_expunge.pl | 85 + .../examples/find_dup_msgs.pl | 217 + W/Mail-IMAPClient-3.37/examples/idle.pl | 231 + .../examples/imap_to_mbox.pl | 266 + .../examples/imtestExample.pl | 226 + .../examples/migrate_mail2.pl | 326 + .../examples/migrate_mbox.pl | 131 + .../examples/populate_mailbox.pl | 319 + .../examples/sharedFolder.pl | 88 + W/Mail-IMAPClient-3.37/lib/Mail/IMAPClient.pm | 3468 ++++ .../lib/Mail/IMAPClient.pod | 3981 ++++ .../lib/Mail/IMAPClient/BodyStructure.pm | 576 + .../IMAPClient/BodyStructure/Parse.grammar | 189 + .../Mail/IMAPClient/BodyStructure/Parse.pm | 17063 ++++++++++++++++ .../Mail/IMAPClient/BodyStructure/Parse.pod | 15 + .../lib/Mail/IMAPClient/MessageSet.pm | 280 + .../lib/Mail/IMAPClient/Thread.grammar | 18 + .../lib/Mail/IMAPClient/Thread.pm | 1039 + .../lib/Mail/IMAPClient/Thread.pod | 14 + W/Mail-IMAPClient-3.37/prepare_dist | 43 + W/Mail-IMAPClient-3.37/t/basic.t | 487 + W/Mail-IMAPClient-3.37/t/body_string.t | 76 + W/Mail-IMAPClient-3.37/t/bodystructure.t | 172 + W/Mail-IMAPClient-3.37/t/fetch_hash.t | 317 + W/Mail-IMAPClient-3.37/t/messageset.t | 37 + W/Mail-IMAPClient-3.37/t/pod.t | 10 + W/Mail-IMAPClient-3.37/t/simple.t | 36 + W/Mail-IMAPClient-3.37/t/thread.t | 30 + W/Mail-IMAPClient-3.37/test_template.txt | 5 + W/OSI_request.txt | 29 + W/{RECORD => RECORD.txt} | 0 W/{TESTING => TESTING.txt} | 0 W/{TIME => TIME.txt} | 0 W/build_exe.bat | 89 +- W/build_mac.sh | 5 + W/imapsync.1 | 46 +- W/install_module_one.bat | 28 + W/install_module_ssl.bat | 28 + W/install_modules.bat | 23 +- W/learn/10990.txt | 1 + W/learn/10_99.txt | 450 + W/learn/getoptlong | 14 + W/learn/imap_rename_regex | 46 + W/learn/imap_rename_regex_examples.txt | 7 + W/learn/imap_utf7_decode | 2 - W/learn/imap_utf7_encode | 23 + W/learn/imapclient_quota_qq | 31 + W/learn/imapclient_quota_qq_memo | 4 + ...t3xx_skeleton_test => imapclient_skeleton} | 8 +- W/learn/increaseline | 9 + W/learn/mail2world | 2 +- W/learn/re_backslashb | 15 + W/{livredor => livredor.txt} | 0 W/memo | 102 +- W/paypal.shtml | 6 +- W/paypal_reply/imapsync_sold_by_country.txt | 82 + W/paypal_reply/memo | 29 + W/paypal_reply/paypal_bilan | 28 +- W/paypal_reply/paypal_bilan_1.78 | 1445 ++ W/paypal_reply/paypal_bilan_1.79 | 1445 ++ W/paypal_reply/paypal_build_invoices | 22 +- W/perlcritic_1.out | 2646 +++ W/perlcritic_2.out | 1492 +- W/perlcritic_3.out | 162 +- W/perlcritic_4.out | 9 + W/prereq.Ubuntu | 4 +- W/prereq.scandeps | 451 +- W/test2.bat | 63 +- W/test3.bat | 31 +- W/test3_boxon.bat | 54 + W/test3_gmail.bat | 8 +- W/test_tests.bat | 4 +- ...archive_per_month => archive_per_month.sh} | 4 +- examples/file.txt | 17 +- examples/sync_loop_unix.sh | 42 +- examples/sync_loop_windows.bat | 58 +- i3 | 4 +- imapsync | 1892 +- index.shtml | 28 +- tests.sh | 339 +- 134 files changed, 44448 insertions(+), 2810 deletions(-) mode change 100755 => 100644 FAQ.d/FAQ.Gmail.txt create mode 100644 FAQ.d/FAQ.ISP.txt mode change 100755 => 100644 FAQ.d/FAQ.Massive.txt create mode 100644 FAQ.d/FAQ.Messages_selection.txt create mode 100644 FAQ.d/FAQ.Oracle-UCS.txt create mode 100644 FAQ.d/FAQ.Security.txt create mode 100755 FAQ.d/FAQ.SmarterMail.txt create mode 100644 FAQ.d/FAQ.Various_Server_Softwares.txt create mode 100644 FAQ.d/FAQ.XOAUTH2.txt create mode 100644 S/imapsync_sold_by_country.txt rename W/{CONCEPTION => CONCEPTION.txt} (100%) create mode 100644 W/LOG_imapsync/2015_10_22_15_58_28.txt create mode 100644 W/Mail-IMAPClient-3.37.tar.gz create mode 100644 W/Mail-IMAPClient-3.37/Changes create mode 100644 W/Mail-IMAPClient-3.37/MANIFEST create mode 100644 W/Mail-IMAPClient-3.37/META.json create mode 100644 W/Mail-IMAPClient-3.37/META.yml create mode 100644 W/Mail-IMAPClient-3.37/Makefile.PL create mode 100644 W/Mail-IMAPClient-3.37/README create mode 100755 W/Mail-IMAPClient-3.37/examples/build_dist.pl create mode 100755 W/Mail-IMAPClient-3.37/examples/build_ldif.pl create mode 100755 W/Mail-IMAPClient-3.37/examples/cleanTest.pl create mode 100755 W/Mail-IMAPClient-3.37/examples/copy_folder.pl create mode 100755 W/Mail-IMAPClient-3.37/examples/cyrus_expire.pl create mode 100755 W/Mail-IMAPClient-3.37/examples/cyrus_expunge.pl create mode 100755 W/Mail-IMAPClient-3.37/examples/find_dup_msgs.pl create mode 100755 W/Mail-IMAPClient-3.37/examples/idle.pl create mode 100755 W/Mail-IMAPClient-3.37/examples/imap_to_mbox.pl create mode 100755 W/Mail-IMAPClient-3.37/examples/imtestExample.pl create mode 100755 W/Mail-IMAPClient-3.37/examples/migrate_mail2.pl create mode 100755 W/Mail-IMAPClient-3.37/examples/migrate_mbox.pl create mode 100755 W/Mail-IMAPClient-3.37/examples/populate_mailbox.pl create mode 100755 W/Mail-IMAPClient-3.37/examples/sharedFolder.pl create mode 100644 W/Mail-IMAPClient-3.37/lib/Mail/IMAPClient.pm create mode 100644 W/Mail-IMAPClient-3.37/lib/Mail/IMAPClient.pod create mode 100644 W/Mail-IMAPClient-3.37/lib/Mail/IMAPClient/BodyStructure.pm create mode 100644 W/Mail-IMAPClient-3.37/lib/Mail/IMAPClient/BodyStructure/Parse.grammar create mode 100644 W/Mail-IMAPClient-3.37/lib/Mail/IMAPClient/BodyStructure/Parse.pm create mode 100644 W/Mail-IMAPClient-3.37/lib/Mail/IMAPClient/BodyStructure/Parse.pod create mode 100644 W/Mail-IMAPClient-3.37/lib/Mail/IMAPClient/MessageSet.pm create mode 100644 W/Mail-IMAPClient-3.37/lib/Mail/IMAPClient/Thread.grammar create mode 100644 W/Mail-IMAPClient-3.37/lib/Mail/IMAPClient/Thread.pm create mode 100644 W/Mail-IMAPClient-3.37/lib/Mail/IMAPClient/Thread.pod create mode 100755 W/Mail-IMAPClient-3.37/prepare_dist create mode 100644 W/Mail-IMAPClient-3.37/t/basic.t create mode 100644 W/Mail-IMAPClient-3.37/t/body_string.t create mode 100644 W/Mail-IMAPClient-3.37/t/bodystructure.t create mode 100644 W/Mail-IMAPClient-3.37/t/fetch_hash.t create mode 100644 W/Mail-IMAPClient-3.37/t/messageset.t create mode 100644 W/Mail-IMAPClient-3.37/t/pod.t create mode 100644 W/Mail-IMAPClient-3.37/t/simple.t create mode 100644 W/Mail-IMAPClient-3.37/t/thread.t create mode 100644 W/Mail-IMAPClient-3.37/test_template.txt create mode 100755 W/OSI_request.txt rename W/{RECORD => RECORD.txt} (100%) rename W/{TESTING => TESTING.txt} (100%) rename W/{TIME => TIME.txt} (100%) create mode 100644 W/install_module_one.bat create mode 100644 W/install_module_ssl.bat create mode 100644 W/learn/10990.txt create mode 100644 W/learn/10_99.txt create mode 100755 W/learn/getoptlong create mode 100755 W/learn/imap_rename_regex create mode 100644 W/learn/imap_rename_regex_examples.txt create mode 100755 W/learn/imap_utf7_encode create mode 100755 W/learn/imapclient_quota_qq create mode 100755 W/learn/imapclient_quota_qq_memo rename W/learn/{imapclient3xx_skeleton_test => imapclient_skeleton} (72%) mode change 100755 => 100644 create mode 100755 W/learn/increaseline create mode 100755 W/learn/re_backslashb rename W/{livredor => livredor.txt} (100%) create mode 100644 W/paypal_reply/imapsync_sold_by_country.txt mode change 100644 => 100755 W/paypal_reply/memo create mode 100755 W/paypal_reply/paypal_bilan_1.78 create mode 100755 W/paypal_reply/paypal_bilan_1.79 create mode 100644 W/perlcritic_1.out create mode 100644 W/perlcritic_4.out rename examples/{archive_per_month => archive_per_month.sh} (91%) diff --git a/CREDITS b/CREDITS index 27c89c7..e469d78 100644 --- a/CREDITS +++ b/CREDITS @@ -1,5 +1,5 @@ #!/bin/cat -# $Id: CREDITS,v 1.182 2015/05/26 10:16:16 gilles Exp gilles $ +# $Id: CREDITS,v 1.184 2015/11/05 20:57:21 gilles Exp gilles $ If you want to make a donation to me, imapsync author, Gilles LAMIRAL, use any of the following ways: @@ -24,6 +24,14 @@ I thank very much all of these people. I thank also very much all people who bought imapsync from the homepage but I don't cite them here. +Mike Salonia +Contributed by using and validating the multi-archive Gmail +destination account. See FAQ.d/FAQ.Gmail.txt + +Sebastian Lemke +Contributed by moving hosts from sync_loop_unix.sh to the +credentials file "file.txt". + Ingo Wichmann Contributed by giving the book 14.95 USD "Rambles Through My Library" diff --git a/ChangeLog b/ChangeLog index f7d1bde..7263bf7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,17 +1,136 @@ RCS file: RCS/imapsync,v Working file: imapsync -head: 1.644 +head: 1.670 branch: locks: strict - gilles: 1.644 + gilles: 1.670 access list: symbolic names: keyword substitution: kv -total revisions: 644; selected revisions: 644 +total revisions: 670; selected revisions: 670 description: ---------------------------- -revision 1.644 locked by: gilles; +revision 1.670 locked by: gilles; +date: 2015/12/03 02:36:41; author: gilles; state: Exp; lines: +11 -12 +Bugfix. logfile missed user2. +---------------------------- +revision 1.669 +date: 2015/12/03 02:03:53; author: gilles; state: Exp; lines: +138 -83 +--logdir --logfile now compatible with old --logfile alone. tests cases. +---------------------------- +revision 1.668 +date: 2015/12/02 13:23:22; author: gilles; state: Exp; lines: +94 -86 +Fixed some perlcritics. +---------------------------- +revision 1.667 +date: 2015/11/30 02:44:12; author: gilles; state: Exp; lines: +156 -60 +--automap implemented. +Added --justautomap to see what will happen with --automap and --f1f2 options. +---------------------------- +revision 1.666 +date: 2015/11/23 14:56:56; author: gilles; state: Exp; lines: +50 -19 +Doc fix. --logfile path inline and in usage(). +Added require JSON::WebToken::Crypt::RSA and Crypt::OpenSSL::RSA to a good build on Win32. +Tested OAUTH2 on windows. Works. +Bug fix. Changed "Host1: checking all wanted folders exist" not efficient algorythm + to allow a 2.4 million folders account. Yes, some people have this... +---------------------------- +revision 1.665 +date: 2015/11/06 00:45:35; author: gilles; state: Exp; lines: +29 -9 +Made quota wrnings, quota human usable. +---------------------------- +revision 1.664 +date: 2015/11/04 18:09:22; author: gilles; state: Exp; lines: +362 -323 +Back to require IO::Socket::SSL; +instead of use. + +Reformated the usage output. +Added --f1f2 str1=str2 : Force folder str1 to be synced to str2. +--f1f2 overrides any automap mapping and any regextrans2 +---------------------------- +revision 1.663 +date: 2015/10/03 23:59:27; author: gilles; state: Exp; lines: +12 -9 +Bugfix. Return with previous Debug when no quota available. +---------------------------- +revision 1.662 +date: 2015/10/03 22:14:37; author: gilles; state: Exp; lines: +84 -24 +Added quota_extract_storage_limit_in_bytes() +Added quota_extract_storage_current_in_bytes() +---------------------------- +revision 1.661 +date: 2015/09/28 15:36:41; author: gilles; state: Exp; lines: +18 -19 +Better prints. +---------------------------- +revision 1.660 +date: 2015/09/28 14:18:10; author: gilles; state: Exp; lines: +21 -15 +IMAP output as an early stage of quota and ID. +---------------------------- +revision 1.659 +date: 2015/09/21 22:47:50; author: gilles; state: Exp; lines: +107 -29 +Better ID format sent. Order terms like in thr RFC. +Added imapsync_id_github, in case. +---------------------------- +revision 1.658 +date: 2015/09/19 08:56:07; author: gilles; state: Exp; lines: +8 -8 +RCS date in id. +---------------------------- +revision 1.657 +date: 2015/09/19 08:26:04; author: gilles; state: Exp; lines: +206 -77 +Started to use global $sync-> in order to reduce number of parameters in routines. +---------------------------- +revision 1.656 +date: 2015/09/13 16:11:07; author: gilles; state: Exp; lines: +46 -24 +Some perlcritic fixes. +---------------------------- +revision 1.655 +date: 2015/09/11 01:57:51; author: gilles; state: Exp; lines: +15 -12 +Bugfix testing automap. +---------------------------- +revision 1.654 +date: 2015/09/11 01:23:42; author: gilles; state: Exp; lines: +121 -76 +Added --automap to implement rfc6154. Turned on by default. +Use --noautomap to avoid it. +---------------------------- +revision 1.653 +date: 2015/09/05 21:35:56; author: gilles; state: Exp; lines: +27 -25 +IO::Socket::SSL mandatory to run. +SSL_VERIFY_NONE in --ssl and --tls +---------------------------- +revision 1.652 +date: 2015/08/28 14:59:59; author: gilles; state: Exp; lines: +8 -8 +"Initial difference" -> "Start difference" +---------------------------- +revision 1.651 +date: 2015/08/18 22:35:05; author: gilles; state: Exp; lines: +8 -8 +fixed xoauth2 calls. +---------------------------- +revision 1.650 +date: 2015/08/16 00:42:58; author: gilles; state: Exp; lines: +28 -28 +Changed some output, added Host1: or Host2 at the begining of line. +---------------------------- +revision 1.649 +date: 2015/08/10 03:10:15; author: gilles; state: Exp; lines: +7 -7 +576 tests. +---------------------------- +revision 1.648 +date: 2015/08/10 02:58:21; author: gilles; state: Exp; lines: +99 -39 +Added guess_prefix() and guess_separator() +Guess prefixes and separators instead of forcing the user to find them. +---------------------------- +revision 1.647 +date: 2015/08/07 04:35:15; author: gilles; state: Exp; lines: +33 -20 +Added folders counting outputs. +---------------------------- +revision 1.646 +date: 2015/08/07 00:07:39; author: gilles; state: Exp; lines: +16 -6 +Added sub imap_utf7_encode( ). Not used. +---------------------------- +revision 1.645 +date: 2015/07/31 14:48:11; author: gilles; state: Exp; lines: +11 -11 +Better outpout in login_imap() +---------------------------- +revision 1.644 date: 2015/07/17 01:22:52; author: gilles; state: Exp; lines: +9 -7 Added NOOP in --dry mode during fake APPEND. ---------------------------- diff --git a/FAQ b/FAQ index d6f4caa..1327f8d 100644 --- a/FAQ +++ b/FAQ @@ -1,5 +1,5 @@ #!/bin/cat -# $Id: FAQ,v 1.209 2015/05/09 20:53:23 gilles Exp gilles $ +# $Id: FAQ,v 1.216 2015/11/13 23:58:12 gilles Exp gilles $ +-------------------+ | FAQs for imapsync | @@ -65,21 +65,30 @@ R. Use md5sum to check integrity of the file. ======================================================================= Q. How to install imapsync? -R. Read the INSTALL file in the tarball also available at +R. Read the INSTALL files in the tarball also available at http://imapsync.lamiral.info/INSTALL + http://imapsync.lamiral.info/INSTALL.d/ ======================================================================= Q. How to configure and run imapsync? -R. Read the README and FAQ files in the tarball also available at +R. Read the README, OPTIONS and FAQ files in the tarball also + available at: http://imapsync.lamiral.info/README + http://imapsync.lamiral.info/OPTIONS http://imapsync.lamiral.info/FAQ ======================================================================= Q. Can you give some configuration examples? -R. The FAQ file contains many examples for several scenarios - http://imapsync.lamiral.info/FAQ +R1. Basic usage is described there: + http://imapsync.lamiral.info/#DOC_BASIC + + imapsync --host1 test1.lamiral.info --user1 test1 --password1 secret1 \ + --host2 test2.lamiral.info --user2 test2 --password2 secret2 + +R2. The FAQ files contains many examples for several scenarios + http://imapsync.lamiral.info/FAQ ======================================================================= Q. How can I have commercial support? @@ -277,17 +286,24 @@ option --justfoldersizes (no transfer will be done) ======================================================================= -Q. I see warning messages like -"Host1 Sent/15 size 1428 ignored (no header so we ignore this message)" +Q. I see warning messages like the following: +"Host1 Sent/15 size 1428 ignored (no header so we ignore this message. +To solve this: use --addheader)". + What can I do to transfer those messages? -R1. Use --addheader option, it will add a header like - "Message-Id: <15@imapsync>" and transfer the message on host2. - Duplicates won't happen in next runs. + +R1. Like suggested inline, use --addheader option. +Option --addheader will add an header line like +Message-Id: <15@imapsync> +where 15 is the message UID number on host1. +Then imapsync will transfer the changed message on host2. +Duplicates won't happen on next runs. imapsync ... --addheader -R2. Use --useuid then imapsync will avoid dealing with headers. +R2. Other solution. +Use --useuid then imapsync will avoid dealing with headers. imapsync ... --useuid @@ -343,7 +359,7 @@ Q. How can I try imapsync with latest Mail::IMAPClient 3.xx perl module? Three solutions at least. R1 - Look at the script named "i3" in the tarball, it can be used to - run imapsync with the included Mail-IMAPClient-3.35/ wherever you + run imapsync with the included Mail-IMAPClient-3.37/ wherever you unpacked the imapsync tarball R2 Run: @@ -367,10 +383,10 @@ R3 If you want to install the Perl module locally in a directory - run imapsync with perl and -I option tailing to use the perl module Mail-IMAPClient-3.xx. Example: - perl -I./Mail-IMAPClient-3.35/lib ./imapsync ... + perl -I./Mail-IMAPClient-3.37/lib ./imapsync ... or if imapsync is in directory /path/ - perl -I./Mail-IMAPClient-3.35/lib /path/imapsync ... + perl -I./Mail-IMAPClient-3.37/lib /path/imapsync ... ======================================================================= @@ -573,7 +589,12 @@ The file imapsync.pid contains the PID of the imapsync process. This file is removed at the end of a normal run. You can safely ignore the warning if you don't use imapsync.pid file. +======================================================================= +Q. Quantifier in {,} bigger than 32766 in regex; marked by <-- HERE in + m/(.{ <-- HERE 1,49947})(?:,|$)/ at Mail/IMAPClient.pm line 2121. +R. Do not use a bigger value than 3276 with --split1 or --split2 + ======================================================================= Q. Couldn't create [INBOX.Ops/foo/bar]: NO Invalid mailbox name: INBOX.Ops/foo/bar @@ -628,63 +649,6 @@ R1. Use it with --subscribed R2. There is also the --subscribe_all option that subscribe to all folders on host2. -======================================================================= -Q. Is there a way we can specify a date range to sync emails? - If yes, can you please share an example? - -R. Yes, with the --search option. - - imapsync ... --search "SENTSINCE 1-Jan-2010 SENTBEFORE 31-Dec-2010" - - Jan - Feb - Mar - Apr - May - Jun - Jul - Aug - Sep - Oct - Nov - Dec - -======================================================================= -Q. Is there a way we can specify an age to sync emails? - If yes, can you please share some examples? - -R. Yes, with the --maxage or the --minage option. - -E.1 Sync only messages less than 2 days old: - - imapsync ... --maxage 2 - -E.2 Sync only messages more than 2 days old: - - imapsync ... --minage 2 - -E.3 Sync only messages more than 30 days old and less than 365 days old: - - imapsync ... --minage 30 --maxage 365 - -E.4 Sync only messages less than 30 days old or more than 365 days old: - - imapsync ... --maxage 30 --minage 365 - -Full explanation: - ---maxage : Skip messages older than days. - final stats (skipped) don't count older messages - see also --minage ---minage : Skip messages newer than days. - final stats (skipped) don't count newer messages - You can do (+ are the messages selected): - past|----maxage+++++++++++++++>now - past|+++++++++++++++minage---->now - past|----maxage+++++minage---->now (intersection) - past|++++minage-----maxage++++>now (union) - - ======================================================================= Q. On Unix, some passwords contain * and " characters. Login fails. R. Use a backslash to escape the characters: @@ -1056,12 +1020,12 @@ b) Replace manually the whitespace by a colon in string "From " but you header lines of the message) c) Run imapsync with the following option (this replaces "From "by "From:"): - --regexmess 's/\AFrom /From:/' + --regexmess 's/\AFrom /From: /' or may be better (no other "From:" collision): d) Run imapsync with the following option (this replaces "From "by "X-om:"): - --regexmess 's/\AFrom /X-om:/' + --regexmess 's/\AFrom /X-From: /' e) Run imapsync with the following option (this removes the whole "From " line): --regexmess 's{\AFrom\ [^\n]*(\n)?}{}gxms' @@ -1087,319 +1051,6 @@ using the same server, we can use $from->copy Therefore we seem to not download and upload the message and therefore we do not have any format issues. And now it works fine. (Thanks to Hansjoerg.Maurer) -======================================================================= - Server specific issues and solutions -======================================================================= - -======================================================================= -Q. From Zimbra to XXX - -imapsync ... \ - --exclude "Conversation Action Settings" \ - --exclude "Quick Step Settings" \ - --exclude "News Feed" - -======================================================================= -Q. From or to HMailServer version 4.4.1. - -R. You have to add prefix and separator manually because 4.4.1 doesn't -honor the NAMESPACE imap command. - -Example for host1: - -imapsync ... \ - --prefix1 "" --sep1 . - -No specific option for HMailServer 5.3.3 since NAMESPACE is supported. - -Maybe --subscribe_all will help you to see all migrated folders. - - -======================================================================= -Q. Synchronizing from Kerio Connect to XXX - -R. No special options required. -See also: -http://www.linux-france.org/prj/imapsync_list/msg01756.html -http://www.safetynet-it.com/it-support/mac-kerio-server-to-microsoft-exchange-2010-migration-1/ -http://www.safetynet-it.com/it-support/mac-kerio-server-to-microsoft-exchange-2010-migration-2/ - - -======================================================================= -Q. Synchronizing from SmarterMail to XXX - -imapsync --host1 imap.d1.org --user1 joe --password1 secret1 --sep1 "/" \ - --host2 imap.d2.org --user2 joe --password2 secret2 \ - --prefix1 "" \ - --regextrans2 "s#Sent Items$#Sent#" \ - --dry --justfolders - -Maybe add other --regextrans2 to change folder names and see the result. -When satisfied, run without --dry --justfolders - - -======================================================================= -Q. Synchronizing from Yahoo to XXX - -R. Use --host1 imap.mail.yahoo.com --sep1 '/' - -./imapsync \ - --host1 imap.mail.yahoo.com \ - --user1 billy \ - --password1 secret \ - --host2 XXX \ - --user2 billy \ - --password2 secret \ - --sep1 '/' - -Can also add --ssl1 to gain encrypted transfer from yahoo. -SSL seems to be mandatory for yahoo (since november 2011) - -======================================================================= -Q. from Microsoft's Exchange 2007 to Google Apps for your Domain - (GAFYD) - -R. Take a look at: -http://mark.ossdl.de/2009/02/migrating-from-exchange-2007-to-google-apps-mail/ - -======================================================================= -Q. Syncing from Google Apps domain to Googlemail account - -A known bug encountered with this output (Alexander is a folder name): - -++++ Verifying [Alexander] -> [Alexander] ++++ -+ NO msg #16 [A96Dh4AwlLVphOAW5MS/eQ:779824] in Alexander -+ Copying msg #16:779824 to folder Alexander -flags from : [\Seen]["04-Jul-2007 14:32:22 +0100"] -Couldn't append msg #16 (Subject:[Rieter-Event (please accept with -comments)]) to folder Alexander: 46 NO Invalid folder: Sent (Failure) - -In fact folder "Sent" is just the last folder listed previously -as a: -... -To Folder [Sent] does not exist yet -To Folder [Sonja] Size: 1024546 Messages: 96 -... - -R. Just run imapsync a time like this : -imapsync ... --folder Alexander - -======================================================================= -Q. Migrating from or to Parallels Plex Server - -R. It depends on the OS - -Parallells Plesk Panel for Windows requires --sep2 / --prefix2 "" -Parallells Plesk Panel for Linux works with default parameters. - -======================================================================= -Q. I'm migrating from WU to Cyrus, and the mail folders are under - /home/user/mail but the tool copies everything in /home/user, how - can i avoid that? - -Two solutions: - -R. Use - imapsync ... --include '^mail' - -R. or (better) - imapsync ... --subscribed --subscribe - - -======================================================================= -Q. I'm migrating from WU to Cyrus, and the mail folders are under - /home/user/mail directory. When imapsync creates the folders in - the new cyrus imap server, it makes a folder "mail" and below that - folder puts all the mail folders the user have in /home/user/mail, - i would like to have all those folders directly under INBOX. - -R. Use - imapsync ... --regextrans2 's/^mail/INBOX/' --dry - look at the simulation and if all transformations seem - good then remove the --dry option. - - -======================================================================= -Q. Migrating from Groupwise to Cyrus - -R. By Jamie Neil: - -I eventually managed to get the mail to migrate without errors using the -following options: - ---sep1 / - - doesn't report separator so has to be set explicitly. - ---nosyncacls - - doesn't support ACLs. - ---skipheader '^Content-Type' - - MIME separator IDs seem to change every time a mail is accessed so - this is required to stop duplicates. - ---maxage 3650 - - some messages just don't seem to want to transfer and produce the - perl errors I mentioned before. This prevents the errors, but the - bad messages don't transfer. - -Even though the mail migrated OK, there are a couple of gotchas with -Groupwise IMAP: - -1) Some of the GW folders are not real folders and are not available -to IMAP, the main problem one being "Sent Items". I could find no way -of coping the contents of these folders. The nearest I got was to -create a "real" folder and copy/move the sent items into it, but -imapsync still didn't see the messages (I think because there is -something funny about the reported dates/sizes). - -It think this problem has been rectified in GW6.5. - -2) The "skipheader '^Content-Type'" directive is required to stop -duplicate messages being created. GW seems to generate this field on -the fly for messages that have MIME separators and so it's different -every time. - -3) Version 6.0.1 of the Groupwise Internet Connector sucks. I was -getting server aborts when I pushed it a bit hard! I eventually had to -upgrade to 6.0.4 which seems to be a lot more stable. - - -======================================================================= -Q. Migrating from iPlanet Messaging Server -5.2 Patch 2 (built Jul 14 2004)) to Groupwise 7.0 -I encounter many errors like this: -"Error trying to append string: 17847 BAD APPEND" - -R. GroupWise 7 seems buggy. Apply GroupWise 7 support pack 1 - -======================================================================= -Q. Migrating from David Tobit V10 (DvISE Mail Access Server MA-...) - -R. Use the following options: - -imapsync ... --prefix1 "" --sep1 / --idatefromheader ^ - --nofoldersizes --useuid --nocheckmessageexists - -======================================================================= -Q. Migrating from David Tobit V8 - ("* OK IMAP4rev1 DvISE Mail Access Server MA-8.10a (0126)") - -First try above V10 solution since improvments have been made -to support Tobit. - -R. Use the following options : -imapsync ... --prefix1 INBOX. --sep1 / --subscribe --subscribed - -======================================================================= -Q. Migrating from Tobit David Server 6 - ("DvISE Mail Access Server MA-6.60a (0118)") - -First try above V10 solution since improvments have been made -to support Tobit. - -R. Look at the discussion: -http://www.linux-france.org/prj/imapsync_list/msg00582.html -http://www.linux-france.org/prj/imapsync_list/threads.html#00582 -patch saved in ./patches/imapsync-1.337_tobit_V6.patch - -======================================================================= -Q. I need to migrate 1250 mailboxes, passwords are in a MySQL Database. -Can you tell me if your script suits my needs? - -R. Mailboxes must exist before running imapsync. -You have to extract users logins and passwords in a csv file. -See the "HUGE MIGRATION" section in the README file. - - -====================================================================== -Q: From MailEnable 1.75 -R: --sep1 "/" --prefix1 "" - -Q: From MailEnable 2.2 -R: --sep1 "." --prefix1 "" - -Q: To MailEnable -R: --sep2 / --prefix2 "" --addheader --messageidnodomain --syncflagsaftercopy - -====================================================================== -Q. From GMX IMAP4 StreamProxy -R. Use: - --prefix1 INBOX and --sep1 . - -====================================================================== -Q. From Courier to Archiveopteryx -R. You can read http://www.archiveopteryx.org/migration/imapsync - Default values might be fine now with latest imapsync. - -====================================================================== -Q. To Sun Java(tm) System Messaging Server 6.2-7.05 -Q. To Communigate Pro - Solaris version - -R. See and run patches/imapsync_1.267_jari - - -====================================================================== -Q. From Softalk Workgroup Mail 7.6.4 - -R. Old Softalk releases don't support the IMAP SEARCH command. - Here are the options to get it working. - -imapsync ... --sep1 '.' --prefix1 '' \ - --noabletosearch --nocheckmessageexists --addheader - -(Thanks to Andrew Tucker) - -====================================================================== -Q. From or to QQMail IMAP4Server - -R. imapsync ... --noabletosearch - -====================================================================== -Q. From FirstClass to XXX - http://www.firstclass.com/ - -R. Migrating from FirstClass is not easy because FirstClass, strangely, - does not show all messages via IMAP. To make it show all messages, - a trick, painful to follow by hand, is moving emails - out and back in, for each folder. May be it can be done by a script. - - FirstClass releases prior to release 12 do not shows the "Sent" - folder in IMAP but FirstClass release 12 shows it. - I advice you to upgrade to FirstClass release 12 before leaving it - with imapsync or another imap tool. - -Here is a command line used to migrate from FirtClass release 12: - - imapsync ... \ - --tmpdir /var/tmp --usecache \ - --useheader Message-ID \ - --idatefromheader \ - --addheader \ - --regextrans2 "s,(/|^) +,\$1,g" --regextrans2 "s, +(/|$),\$1,g" \ - --regextrans2 "s/[\^]/_/g" \ - --regextrans2 "s/['\"\\\\]/_/g" \ - --regextrans2 "s,&AC8-,-,g" \ - --regextrans2 "s,&APg-,oe,g" - -On Windows, in the previous example containing \$1 you have to -replace the two \$1 by $1 (remove the \ before $). - -Special thanks to Kristian Wind and Joey Alexander for helping me -writing this FAQ item. -See also this worth reading discussion in a Zimbra forum: -http://www.zimbra.com/forums/migration/20349-help-needed-migrating-firstclass.html - -====================================================================== -Q. From XXX to FTGate - -R. Do NOT use --usecache since new UIDs are not given by FTGate and also - badly guessed by imapsync. UIDEXPUNGE does not work so use also - --expunge2 when using --delete2 - - imapsync ... \ - --sep2 / --prefix2 "" \ - --useheader Message-Id \ - ====================================================================== Q: How can I write an .rpm with imapsync diff --git a/FAQ.d/FAQ.Domino.txt b/FAQ.d/FAQ.Domino.txt index f31d1f9..5289b75 100644 --- a/FAQ.d/FAQ.Domino.txt +++ b/FAQ.d/FAQ.Domino.txt @@ -1,39 +1,51 @@ #!/bin/cat -$Id: FAQ.Domino.txt,v 1.2 2015/03/26 04:24:17 gilles Exp gilles $ +# $Id: FAQ.Domino.txt,v 1.4 2015/09/19 08:58:34 gilles Exp gilles $ ====================================================================== - Domino specific issues and solutions + Imapsync. Domino specific issues and solutions ====================================================================== + ====================================================================== Q. From Domino Notes to xxx On Windows use: - imapsync.exe ... --sep2 "\\" --prefix2 "" - + imapsync.exe ... --sep1 "\\" --prefix1 "" On Unix use: - imapsync ... --sep2 '\\' --prefix2 '' + imapsync ... --sep1 '\' --prefix1 '' ====================================================================== Q. From xxx to Domino Notes -For Domino anywhere with imapsync.exe on Windows use: +Domino doesn't accept INBOX subfolders. + +On Windows: imapsync.exe ... ^ --sep2 "\\" --prefix2 "" ^ - --regextrans2 "s,^INBOX\\(.*),$1," + --regextrans2 "s,^Inbox\\(.*),$1,i" -Explanation: Domino doesn't accept INBOX subfolders. +On Unix: + + imapsync ... \ + --sep2 '\' --prefix2 '' \ + --regextrans2 's,^Inbox\\(.*),$1,i' If you want to sync the complete host1 mailbox in a subfolder called OLDBOX use: +On Windows: imapsync.exe ... ^ --sep2 "\\" --prefix2 "" ^ - --regextrans2 "s,(.*),OLDBOX\\$1," --justfolders --dry + --subfolder2 "OLDBOX" --justfolders --dry +On Unix: + imapsync ... \ + --sep2 '\' --prefix2 '' \ + --subfolder2 'OLDBOX' --justfolders --dry + If the output is correct for you then remove --dry and have a run. Verify the folder hierarchy is good on host2 then remove --justfolders to sync the messages. diff --git a/FAQ.d/FAQ.Dovecot.txt b/FAQ.d/FAQ.Dovecot.txt index 28e9caf..bec2efb 100644 --- a/FAQ.d/FAQ.Dovecot.txt +++ b/FAQ.d/FAQ.Dovecot.txt @@ -1,8 +1,8 @@ #!/bin/cat -$Id: FAQ.Dovecot.txt,v 1.1 2015/03/23 00:16:43 gilles Exp gilles $ +$Id: FAQ.Dovecot.txt,v 1.2 2015/07/18 22:35:27 gilles Exp gilles $ ======================================================================= - Dovecot specific issues and solutions + Imapsync. Dovecot specific issues and solutions ======================================================================= diff --git a/FAQ.d/FAQ.Duplicates.txt b/FAQ.d/FAQ.Duplicates.txt index d7ad840..eb36e4c 100644 --- a/FAQ.d/FAQ.Duplicates.txt +++ b/FAQ.d/FAQ.Duplicates.txt @@ -1,8 +1,8 @@ #!/bin/cat -$Id: FAQ.Duplicates.txt,v 1.3 2015/04/02 23:40:08 gilles Exp gilles $ +$Id: FAQ.Duplicates.txt,v 1.5 2015/09/19 08:59:14 gilles Exp gilles $ ====================================================================== - Imapsync and message duplicates issues + Imapsync and duplicated messages issues. ====================================================================== ======================================================================= @@ -62,6 +62,11 @@ and Received lines? Often standalone Message-Id works: imapsync ... --useheader "Message-Id" +Once imapsync does not generate duplicates, the previous duplicates +can be deleted with option --delete2duplicates + + imapsync ... --useheader "Message-Id" --delete2duplicates + Another good way toward a solution is to isolate two or three messages in a BUG folder and send me the --debug output by email at gilles.lamiral@laposte.net @@ -69,7 +74,7 @@ gilles.lamiral@laposte.net imapsync ... --debug --folder BUG I will take a close look at the log and modify imapsync to fix -this faulty duplicate behaviour. +this faulty duplicate behavior. Remark. (Trick found by Tomasz Kaczmarski) diff --git a/FAQ.d/FAQ.Exchange.txt b/FAQ.d/FAQ.Exchange.txt index 1dff510..81ccead 100644 --- a/FAQ.d/FAQ.Exchange.txt +++ b/FAQ.d/FAQ.Exchange.txt @@ -1,13 +1,60 @@ #!/bin/cat -$Id: FAQ.Exchange.txt,v 1.4 2015/06/03 15:33:48 gilles Exp gilles $ +$Id: FAQ.Exchange.txt,v 1.14 2015/11/30 16:12:18 gilles Exp gilles $ ======================================================================= - Exchange 20xx and Office365 specific issues and solutions + Imapsync. Exchange 20xx and Office365 specific issues and solutions ======================================================================= +Questions anwswered in this FAQ are: + +Q. Can I use imapsync to transfer from or to Exchange or Office365 accounts? + +Q. How to sync from XXX to Exchange 2010/2013 or Office365 + +Q. For Office365 I have double and triple checked the username and + password spelling but I still get a "LOGIN failed". Any clue? + +Q. Exchange fails with "User is authenticated but not connected". + +Q. From XXX to Exchange 2013 or Office365, read receipts are all + resent again after a sync. Even for old messages. How can I fix that? + +Q. From XXX to Exchange 2010/2013 or Office365 I get this error message + sometimes: "BAD Command Argument Error 11". What does it mean? + +Q. From XXX to Exchange 2010 or 2013 or Office365 the flag Flagged does + not seem to be well synced. What can I do? + +Q. Exchange and Office365 have throttle mechanisms to limit any huge + usage. Sometimes imapsync transfers are too stressful for servers. + How to deal with that? + +Q. How to migrate from or to Exchange 2007/2010 with an + admin/authuser account? + +Q. How to migrate from or to Office 365 with an admin/authuser account? + +Q. How to migrate from or to Exchange 2003 with an admin/authuser + account? + +Q. Couldn't create folder [trash] "Mailbox already exists". + +Q. Migrating to Exchange 201O, messages get date of the transfer, + this is bad for sorting and listing. What can I do? + +Q. How to sync from any to Exchange2007? + +Q. How to sync from Microsoft Exchange 2000 IMAP4rev1 server? ======================================================================= -Q. From XXX to Exchange 2010/2013 or Office365 +Q. Can I use imapsync to transfer from or to Exchange or Office365 accounts? + +R. Yes. But IMAP access to a Exchange or Office365 account is not always + allowed by default so it has to be allowed in the server configuration + part: + +======================================================================= +Q. How to sync from XXX to Exchange 2010/2013 or Office365 R. Here is a command line resume that solves most encountered issues when migrating to Exchange or Office365. To understand or change the @@ -19,9 +66,13 @@ On Windows: imapsync.exe ... ^ --maxsize 10000000 ^ --maxlinelength 9900 ^ + --maxmessagespersecond 4 ^ --regexflag "s/\\Flagged//g" ^ --disarmreadreceipts ^ - --maxlinelength 9000 + --regexmess "s,(.{9900}),$1\r\n,g" + + On Unix + imapsync ... --regexmess 's,(.{9900}),$1\r\n,g' On Unix: @@ -29,18 +80,50 @@ On Unix: imapsync ... \ --maxsize 10000000 \ --maxlinelength 9900 \ - --regexflag "s/\\Flagged//g" \ + --maxmessagespersecond 4 \ + --regexflag 's/\\Flagged//g' \ --disarmreadreceipts \ --maxlinelengthcmd 'reformime -r7' -To get the "reformime" command on Linux install the "maildrop" package -No "reformime" on Windows so for now messages with too long line length -can't be synced to Exchange or Office365. +On Linux, to get the "reformime" command, install the "maildrop" package. +In case you don't have it you can use + --regexmess 's,(.{9900}),$1\r\n,g' +instead of --maxlinelengthcmd 'reformime -r7' +On Windows, no "reformime" is available so messages with too long line length +can be synced to Exchange or Office365 by inserting a CRLF every 9900 +characters on long lines, using --regexmess "s,(.{9900}),$1\r\n,g" ======================================================================= -Q. From XXX to Exchange 2013 or Office365 read receipts are all - resent again after a sync. Even for old messages. How can I fix that? +Q. For Office365 I have double and triple checked the username and + password spelling but I still get a "LOGIN failed". Any clue? + +R1. Triple check the hostname then. Try all of these: + * imap-mail.outlook.com + * imap.outlook.com + * outlook.office365.com + +R2. Also triple check a license is assigned to that account + in Office365. + +R3. Try with a classic email client like Thunderbird and the same + parameters. + +======================================================================= +Q. Exchange fails with "User is authenticated but not connected". + +R. "The message “User is authenticated but not connected” is due to a + bug in the Exchange server's IMAP implementation. If the client + presents a valid user name but an invalid password, the server + accepts the login, but subsequent commands fail with the + aforementioned error message." Source: +http://unix.stackexchange.com/questions/164823/user-is-authenticated-but-not-connected-after-changing-my-exchange-password +Thanks to James Abbottsmith for this link and explanation at +https://github.com/imapsync/imapsync/issues/32#issuecomment-153561647 + +======================================================================= +Q. From XXX to Exchange 2013 or Office365, read receipts are all + resent again after a sync. Even for old messages. How can I fix that? R. imapsync can remove the header containing this read receipt request. @@ -74,7 +157,7 @@ Thanks to David Karnowski for pointing and solving this issue. ======================================================================= Q. From XXX to Exchange 2010/2013 or Office365 I get this error message - sometimes: "BAD Command Argument Error 11" + sometimes: "BAD Command Argument Error 11". What does it mean? R. This error message comes from Exchange IMAP server when it encounters any problem. Most of the time it is one of the following: @@ -101,6 +184,15 @@ R. This error message comes from Exchange IMAP server when it imapsync ... --maxlinelength 9900 + In case you prefer fixing messages with long lines the hard way, + instead of skipping them with --maxlinelength 9900, just use: + + On Windows + imapsync ... --regexmess "s,(.{9900}),$1\r\n,g" + + On Unix + imapsync ... --regexmess 's,(.{9900}),$1\r\n,g' + Have also in mind that Exchange closes the connection after 10 errors encountered so you might also see "BYE Connection closed" errors from Exchange, which means Exchange leaves the session and say goodbye, @@ -108,7 +200,7 @@ come back later. Rerun a sync then. ======================================================================= Q. From XXX to Exchange 2010 or 2013 or Office365 the flag Flagged does - not seem to be well synced. + not seem to be well synced. What can I do? R. Use the following trick. Run imapsync twice, one with --regexflag and one without, like this: @@ -128,7 +220,15 @@ With STORE it sets and gets the "\Flagged" flag everywhere. Thanks to Dave Murray and Simon Savva for reporting and solving this issue. +====================================================================== +Q. Exchange and Office365 have throttle mechanisms to limit any huge + usage. Sometimes imapsync transfers are too stressful for servers. + How to deal with that? +R. It looks like limiting 4 messages per second is enough to never + reach any throttle limit. + + imapsync ... --maxmessagespersecond 4 ====================================================================== Q. How to migrate from or to Exchange 2007/2010 with an @@ -245,8 +345,7 @@ In case you are not aware: ======================================================================= -Q. Couldn't create folder [trash] from [INBOX.trash]: - 588 NO Mailbox already exists. +Q. Couldn't create folder [trash] "Mailbox already exists". R. Some servers take care about character case in folder names, some servers do not, like Exchange. Since non-respecting case @@ -275,10 +374,13 @@ R. Some servers take care about character case in folder names, mandatory, otherwise imapsync will sync messages from the first Trash and then delete them when syncing trash. + In order to avoid merging folders that are considered different + on host1 but the same on destination host2 because of case + sensitivities and insensitivities, use --nomixfolders ====================================================================== Q. Migrating to Exchange 201O, messages get date of the transfer, - this is bad for sorting and listing. + this is bad for sorting and listing. What can I do? R1. Be sure to have at least Exchange 2010 SP2 Rollup 5 http://www.tribalchicken.com.au/15-technical/29-imapsync-exchange2010 @@ -291,7 +393,7 @@ It's often shorter to change one server than thousands clients so R1 might be easier to do. ====================================================================== -Q. From any to Exchange2007 +Q. How to sync from any to Exchange2007? Several problems: - Big messages: increase the "send- and receive-connector" @@ -310,10 +412,9 @@ Two users succeeded by using "MS Transporter Suite" (which is closed expensive non-free software). ====================================================================== -Q. From Microsoft Exchange 2000 IMAP4rev1 server version 6.0.6487.0. +Q. How to sync from Microsoft Exchange 2000 IMAP4rev1 server? -R. imapsync ... \ - --prefix1 INBOX. +R. imapsync ... --prefix1 "INBOX." -======================================================================= \ No newline at end of file +======================================================================= diff --git a/FAQ.d/FAQ.Flags.txt b/FAQ.d/FAQ.Flags.txt index 88d6a42..213c8a5 100644 --- a/FAQ.d/FAQ.Flags.txt +++ b/FAQ.d/FAQ.Flags.txt @@ -1,8 +1,8 @@ #!/bin/cat -$Id: FAQ.Flags.txt,v 1.3 2015/04/03 21:05:11 gilles Exp gilles $ +$Id: FAQ.Flags.txt,v 1.4 2015/07/18 22:35:27 gilles Exp gilles $ ====================================================================== - Imapsync and flags + Imapsync and flags ====================================================================== Questions answered here are: diff --git a/FAQ.d/FAQ.Folders_Mapping.txt b/FAQ.d/FAQ.Folders_Mapping.txt index 2192879..090b146 100644 --- a/FAQ.d/FAQ.Folders_Mapping.txt +++ b/FAQ.d/FAQ.Folders_Mapping.txt @@ -1,9 +1,9 @@ #!/bin/cat -$Id: FAQ.Folders_Mapping.txt,v 1.5 2015/05/11 10:36:33 gilles Exp gilles $ +$Id: FAQ.Folders_Mapping.txt,v 1.8 2015/12/03 02:37:45 gilles Exp gilles $ -=========================================== - Imapsync changing folders names -=========================================== +====================================================================== + Imapsync. Changing folders names +====================================================================== Things to know and understand before playing with --regextrans2 @@ -61,18 +61,23 @@ Q. Give examples about --regextrans2 Examples: -1) To remove INBOX. in the name of destination folders: +1) To remove INBOX. in the name of destination folders - --regextrans2 's/^INBOX\.(.+)/$1/' + imapsync ... --regextrans2 's/^INBOX\.(.+)/$1/' -2a) To sync all folders to INBOX: +2) To change only INBOX to Inbox_Migrated + + imapsync ... --regextrans2 's{^INBOX$}{Inbox_Migrated}' + + +2a) To sync all folders to INBOX imapsync ... --regextrans2 "s/.*/INBOX/" -2b) To sync a complete account in a subfolder called FOO: +2b) To sync a complete account in a subfolder called FOO -Since imapsync release 1.641 simply use: +Since imapsync release 1.641 simply use imapsync ... --subfolder2 FOO @@ -130,6 +135,21 @@ On Windows: --regextrans2 s,\^",_,g +3c) to substitute all characters *%. by underscores _ +You can increase the *%. list by any unwanted character. + +On Linux/Unix: + + --regextrans2 'tr,*%.#,_,' + +On Windows: + + --regextrans2 "tr,*%.#,_," + +3d) It is a bad idea to substitute & characters since & +is a character to encode non-ascii characters in IMAP folder names. + + 4) to change folder names like this: [mail/Sent Items] -> [Sent] diff --git a/FAQ.d/FAQ.Gmail.txt b/FAQ.d/FAQ.Gmail.txt old mode 100755 new mode 100644 index 320514d..f118b75 --- a/FAQ.d/FAQ.Gmail.txt +++ b/FAQ.d/FAQ.Gmail.txt @@ -1,13 +1,78 @@ #!/bin/cat -$Id: FAQ.Gmail.txt,v 1.2 2015/05/11 01:11:40 gilles Exp gilles $ +$Id: FAQ.Gmail.txt,v 1.13 2015/11/05 21:01:12 gilles Exp gilles $ ====================================================================== - Imapsync with Gmail + Imapsync with Gmail ====================================================================== +Questions anwswered in this FAQ are: + +Q. Can I use imapsync to transfer from or to Gmail accounts? +Q. How to synchronize from Gmail to Gmail? +Q. How to synchronize from XXX to Gmail? +Q. How to synchronize from Gmail to XXX? +Q. How to avoid the [IMAP] prefix on Gmail side? +Q. I can't authenticate with Gmail via IMAP + and Gmail says "Please log in via your web browser" +Q. Can not open imap connection on [imap.gmail.com] +Q. Gmail does not really delete messages in folder [Gmail]/All Mail +Q. Does imapsync have the capability to do 2 stage authentication? +Q. How to use XOAUTH2 to globally authenticate gmail users? +Q. How to use XOAUTH to globally authenticate gmail users? +Q. How to use a Gmail account to backup several different imap accounts? +Q. How to migrate email from gmail to google apps? + +======================================================================= +Q. Can I use imapsync to transfer from or to Gmail accounts? + +R. Yes. But IMAP access to a Gmail account is not allowed by default so +it has to be allowed in the Gmail configuration part: + -> Settings + -> Forwarding and POP/IMAP + -> IMAP Access + -> Enable IMAP + +======================================================================= +Q. How to synchronize from Gmail to Gmail? + + +R. Use the following example: + +./imapsync \ + --host1 imap.gmail.com \ + --ssl1 \ + --user1 account1@gmail.com \ + --password1 gmailsecret1 \ + --host2 imap.gmail.com \ + --ssl2 \ + --user2 account2@gmail.com \ + --password2 gmailsecret2 \ + --exitwhenover 500000000 \ + --exclude "\[Gmail\]$" + + +Explanations: + +--ssl1 --ssl2 are mandatory since Gmail only supports +imap ssl connections. + +--exitwhenover 500000000 ( ~500 MB ) option is here to avoid +locking or errors when transfers exceed maximum limit. +See http://support.google.com/a/bin/answer.py?hl=en&answer=1071518 +--exitwhenover is not mandatory in the sense you may be able to +use an upper value than 500 MB without disconnections; I don't +know the hard value, it seems to vary, so just have some tries +and report me what you discover in case you detect something +reliable. + +--exclude "\[Gmail\]$" is just there to avoid a warning error +when selecting this not used folder. + +======================================================================= + ======================================================================= -Q. Synchronizing from XXX to Gmail +Q. How to synchronize from XXX to Gmail? R. There are some details to get the special [Gmail] sub-folders right. Here's an example of migrating an old "Sent" folder to @@ -102,31 +167,23 @@ unselect some "System labels", depending on your needs. The "All Mail" archive pseudo-folder should be updated automatically. - ======================================================================= -Q. Some of the folders are getting created with [IMAP] prefix on Google -side. How to stop creating folder with this prefix? -Any switch we can use? e.g. [IMAP]/Archive +Q. How to synchronize from Gmail to XXX? -R. No switch in imapsync since [IMAP]/ prefix is done by Gmail, - it might be configurable with Gmail parameters. - -======================================================================= -Q. Synchronizing from Gmail to XXX - -R. Gmail needs SSL +R. Use this example: ./imapsync \ --host1 imap.gmail.com \ --user1 gilles.lamiral@gmail.com \ --password1 gmailsecret \ - --host2 localhost + --host2 localhost \ --user2 tata \ --password2 tatasecret \ --ssl1 \ --exitwhenover 2500000000 \ --useheader="X-Gmail-Received" \ --useheader "Message-Id" \ + --regextrans2 "s,\[Gmail\].,," \ --skipcrossduplicates \ --folderfirst "Work" \ --folderfirst "Friends" \ @@ -138,8 +195,9 @@ Explanations: --ssl1 is mandatory since Gmail only supports imap ssl connections. ---exitwhenover 2500000000 option is here to avoid locking when -transfers exceed maximum limit. +--exitwhenover 2500000000 (2.5 GB) option is here to avoid +locking when transfers exceed maximum limit. + See http://support.google.com/a/bin/answer.py?hl=en&answer=1071518 --exitwhenover is not mandatory in the sense you may be able to use an upper value than 2.5 GB without disconnections; I don't @@ -154,9 +212,9 @@ by imapsync can not fail using this header. "Message-Id" is there for safety about this Gmail rule. -If your destination imap server doesn't like "[Gmail]" name, just add -option: - --regextrans2 's/\[Gmail\]/Gmail/' +--regextrans2 "s,\[Gmail\].,," +If your destination imap server doesn't like "[Gmail]" name, +get rid of this "[Gmail]" part with that. You can select folders exported to imap within the gmail preferences, for example you may unselect all "System labels". @@ -186,9 +244,17 @@ label CanWait and only it. --skipcrossduplicates, will only put in "[Gmail]/All Mail" the messages that are not labeled at all. +======================================================================= +Q. How to avoid the [IMAP] prefix on Gmail side? +How to stop creating folder with this prefix? +Any switch we can use? e.g. [IMAP]/Archive + +R. No switch in imapsync since [IMAP]/ prefix is done by Gmail, + it might be configurable within Gmail parameters configuration. + ======================================================================= Q. I can't authenticate with Gmail via IMAP - Gmail says "Please log in via your web browser" + and Gmail says "Please log in via your web browser" R1. See Coert Grobbelaar solution: https://security.stackexchange.com/questions/86404/how-do-i-interact-with-google-to-import-email-via-imapsync @@ -200,8 +266,40 @@ so I logged for this account via a web browser, it asked me to receive a code via a mobile, I said yes, I entered the code and everything went ok. +R3. Use https://www.google.com/settings/security/lesssecureapps + (thanks to Flavio Zarur) + See https://support.google.com/accounts/answer/6010255?hl=en + ======================================================================= -Q. Gmail does not really delete messages in folder [Gmail]/All Mail +Q. Can not open imap connection on [imap.gmail.com]: + Unable to connect to imap.gmail.com + +R0. It looks like this issue is related to ipv6. Both ipv4 and ipv6 +protocols should work with gmail and imapsync, I test that regurlarly, +imapsync works fine for both ipv4 and ipv6. +If you disable ipv6 then disable also ipv6 resolution or at least +make ipv4 answers be taken before ipv6 since default resolution +order is to take ipv6 resolution if any. + +R1. A first simple solution is to use directly gmail ipv4 ip address: + + imapsync ... --host1 74.125.133.108 + +In case it changes, get with any command showing the imap.gmail.com resolution + + nslookup imap.gmail.com + host imap.gmail.com + ping imap.gmail.com +Or go to http://ping.eu/nslookup/ to get the resolution. + +R2. Fix imapsync with the line: + + use IO::Socket::SSL 'inet4' ; + +Thanks to Chris Nolan to report, understand and fix this issue! + +======================================================================= +Q. Gmail does not really delete messages in folder [Gmail]/All Mail What happens? What can I do? R. It's true and explained in Gmail documentation at @@ -209,64 +307,45 @@ https://support.google.com/mail/answer/78755?hl=en To really remove messages in folder "[Gmail]/All Mail", they have to be moved to the "Trash" folder and be deleted from "Trash". - + ======================================================================= -Q. Does imapsync have the capability to do 2 stage authentication for google. +Q. Does imapsync have the capability to do 2 stage authentication? R. No, imapsync doesn't support 2 stage authentication. Reading https://support.google.com/mail/answer/1173270?hl=en it looks like it can't because imapsync uses imap protocol. So you have to follow the Google recommendation and generate an -application-specific password or normal authentication or XOAUTH. +application-specific password or normal authentication +or use XOAUTH or XOAUTH2. ======================================================================= -Q. Is XOAUTH2 authentication available with imapsync? +Q. How to use XOAUTH2 to globally authenticate gmail users? -R. Yes but only on Unix systems and not really well documented. See -* http://www.linux-france.org/prj/imapsync_list/msg02129.html -* https://github.com/imapsync/imapsync/pull/25/files +R. Yes, but really tested on Unix systems, not sure on Windows. See: + http://imapsync.lamiral.info/FAQ.d/FAQ.XOAUTH2.txt ======================================================================= Q. How to use XOAUTH to globally authenticate gmail users? - The XOAUTH code and this FAQ item come from Eduardo Bortoluzzi - Thanks Eduardo! - -R. The goal of OAUTH is to migrate all users from/to Google Apps - Premier Edition without knowing their passwords. - - The global password is available at the Google Apps control panel, - at Advanced Tools -> Manage OAuth domain key. - -./imapsync \ - --host1 imap.gmail.com --ssl1 \ - --user1 foo@lab3.dedal.br \ - --password1 secret1 \ - --authmech1 XOAUTH \ - --host2 imap.gmail.com --ssl2 \ - --user2 bar@lab3.dedal.br \ - --password2 secret2 \ - --authmech2 XOAUTH - -Google Apps is a paid service, but you can try it for 30 days without any cost. - -Some notes about configuring the Google Apps XOAUTH: - - On "Advanced Tools > Manage OAuth domain key > Two-legged OAuth access control" - the "Allow access to all APIs" must be checked - (https://support.google.com/a/bin/answer.py?answer=162105) - - OR - - On "Advanced Tools > Manage third party OAuth client access", - the configured costumer key must have the scope - "https://mail.google.com/" configured - (https://support.google.com/a/bin/answer.py?answer=162106). +R0. XOAUTH is considered obsolete and superseded by XOAUTH2 + See http://imapsync.lamiral.info/FAQ.d/FAQ.XOAUTH2.txt ======================================================================= -Q. migrate email from gmail to google apps +Q. How to use a Gmail account to backup several different imap accounts? + +R. For each account named xxx use: + + imapsync ... --subfolder2 xxx/xxx + +It syncs the account xxx under a sub-subfolder xxx/xxx. This way there +is no supplementary label created on the multi-archive Gmail +destination account. No labels all over the place and all original +xxx sub-folders show up nested within xxx/xxx. + +======================================================================= +Q. How to migrate email from gmail to google apps? R. Take a look at: http://www.linux-france.org/prj/imapsync_list/msg00639.html diff --git a/FAQ.d/FAQ.ISP.txt b/FAQ.d/FAQ.ISP.txt new file mode 100644 index 0000000..c3d4f89 --- /dev/null +++ b/FAQ.d/FAQ.ISP.txt @@ -0,0 +1,72 @@ +#!/bin/cat +$Id: FAQ.ISP.txt,v 1.2 2015/10/21 15:23:07 gilles Exp gilles $ + +================================================= + Imapsync. ISP specific issues and solutions +================================================= + +* IMAP Sync - usage scenario with ISP - by Flvio Zarur Lucarelli. + +I thought Id write a quick step by step on my attempts to learn the +imapsync features that matter the most, so it works as we expected in +the cenario in which we use it, which is to migrate customers from +their old ISP to our ISP/email hosting. Thanks to the master Gilles +Lamiral for all his help and hard work. + +First of all, remember to use --dry to test things first always and +check the log file to see what would actually happen. + +My first goal is to have an exact sync of an account from +current/source host to the new/destination host and be able to sync +several times. The --useuid parameter is very important for that +purpose. This is what I use: + + imapsync --host1 imap.gmail.com --user1 user@domain.com --password1 pwd --ssl1 --host2 imap.myisp.com --user2 user@domain.com --password2 pwd --ssl2 --useuid --delete2 --delete2folders + +This makes it so imap.myisp.com (destination) is an exact copy of the +account at imap.gmail.com (source). This is not a problem, since the +user is not using the new host yet. ]You can check Imapsync log files +and surely you will see the final difference should be 0. Check also +for any possible errors in the log (search for "error"). + +The second goal is to lower the TTL (ex: 5 min) for the host +associated with the MX record, in the domain's DNS server. Let's say +customer has a host mail which his MX points to, with a high TTL +(usually 1 hour). Lower it to 5 min so that, when you change the MX, +it propagates faster. + +When comes time to switch over to the new host, do a final sync with +above syntax, before changing the MX. Then, change the MX and tell +your users to start using exclusively the new host. + +A few hours after the MX change, we will run Imapsync again. We have +to start preserving emails users move or flag in the new host, which +they started using, so we can't do an exact sync anymore. + +The best solution for me was to Sync any new emails (maxage:1) from +source (that could arrive in source even after MX change, due to +cache) and delete such emails from source server. This way, customer's +mailbox is still intact on the source server, except new emails, which +get synced to new server and deleted from source. + + imapsync --host1 imap.gmail.com --user1 user@domain.com --password1 pwd --ssl2 --folder INBOX --useuid --noexpungeaftereach --skipemptyfolders --maxage 1 --delete1 + +I personally prefer to keep a copy of users box intact in source, but +if that's not an issue for you, you can remove --folder INBOX and even +--maxage, but then, all emails in source will be deleted. You can use +--maxage 1 with --delete1, however, for all folder (without specifying +--folder INBOX), so only any new email that arrives at source is +copied to destination and deleted from source. + +My next goal was to automate the process, so I followed this advice: +http://imapsync.lamiral.info/examples/sync_loop_unix.sh + +I also ended up requiring a regex to translate folder names. On the +old server (Gmail), Sent items were in a folder called [Gmail]/E-mails +enviados and on the new server, its simply called SENT. Same with +lixeira (trash) and rascunhos (drafts). + +So this was added: + + --regextrans2 "s,\[Gmail\].,," --regextrans2 "s,E-mails enviados,Sent," --regextrans2 "s,/Lixeira,Trash," --regextrans2 "s,/Rascunhos,Drafts," + diff --git a/FAQ.d/FAQ.Massive.txt b/FAQ.d/FAQ.Massive.txt old mode 100755 new mode 100644 index 92823bb..c673ace --- a/FAQ.d/FAQ.Massive.txt +++ b/FAQ.d/FAQ.Massive.txt @@ -1,8 +1,8 @@ #!/bin/cat -$Id: FAQ.Massive.txt,v 1.1 2015/03/26 05:06:27 gilles Exp gilles $ +$Id: FAQ.Massive.txt,v 1.5 2015/11/05 14:46:20 gilles Exp gilles $ ====================================================================== - Imapsync for massive migrations + Imapsync for massive migrations ====================================================================== Questions answered here are: @@ -10,49 +10,55 @@ Questions answered here are: Q. I need to migrate hundred accounts, how can I do? Q. I have to migrate 500k users using 400 TB of disk space. How do I proceed? +Q. How to determine what is the bottleneck in my current imapsync process? - ======================================================================= Q. I need to migrate hundred accounts, how can I do? R. If you have many mailboxes to migrate think about a little -shell program. Write a file called file.txt (for example) -containing users and passwords. +script program. Write a file called file.txt (for example) +containing hosts users and passwords on both sides. The separator used in this example is ";" -The file.txt file contains: +The file.txt file contains for example: -user001_1;password001_1;user001_2;password001_2 -user002_1;password002_1;user002_2;password002_2 -user003_1;password003_1;user003_2;password003_2 -user004_1;password004_1;user004_2;password004_2 -user005_1;password005_1;user005_2;password005_2 -... +host001_1;user001_1;password001_1;host001_2;user001_2;password001_2; +host002_1;user002_1;password002_1;host002_2;user002_2;password002_2; +host003_1;user003_1;password003_1;host003_2;user003_2;password003_2; +host004_1;user004_1;password004_1;host004_2;user004_2;password004_2; +etc. -On Unix the shell program can be: +On Unix the shell script can be: - { while IFS=';' read u1 p1 u2 p2; do - imapsync --host1 imap.side1.org --user1 "$u1" --password1 "$p1" \ - --host2 imap.side2.org --user2 "$u2" --password2 "$p2" ... - done ; } < file.txt +#!/bin/sh +{ while IFS=';' read h1 u1 p1 h2 u2 p2 fake + do + imapsync --host1 "$h1" --user1 "$u1" --password1 "$p1" \ + --host2 "$h2" --user2 "$u2" --password2 "$p2" + done +} < file.txt -Here is a complete Unix example nearly ready to use: + +Here is a complete Unix example ready to use: http://imapsync.lamiral.info/examples/sync_loop_unix.sh -On Windows the batch program can be: +On Windows the batch script can be: - FOR /F "tokens=1,2,3,4 delims=; eol=#" %%G IN (file.txt) DO imapsync ^ - --host1 imap.side1.org --user1 %%G --password1 %%H ^ - --host2 imap.side2.org --user2 %%I --password2 %%J ... +CD /D %~dp0 +SET csvfile=file.txt +FOR /F "tokens=1,2,3,4,5,6 delims=; eol=#" %%G IN (%csvfile%) DO ( +imapsync ^ + --host1 %%G --user1 %%H --password1 %%I ^ + --host2 %%J --user2 %%K --password2 %%L ... +) -The ... can be replaced by nothing or any supplementary imapsync option. +The final ... can be replaced by nothing or any supplementary imapsync option. Here is a complete Windows example nearly ready to use: http://imapsync.lamiral.info/examples/sync_loop_windows.bat - ======================================================================= Q. I have to migrate 500k users using 400 TB of disk space. How do I proceed? @@ -63,13 +69,15 @@ they can be processed independently. 500k on 400TB is 800 MB per account on average. -No one knows in advance what is the first bottleneck. The first -bottleneck has to be determined, by measurements, not by guesses. -Once this first bottleneck is known and overcome then the next -bottleneck has to be determined and overcome too, if needed. Repeat -the process of looking for the next bottleneck and its resolution -until you estimate the transfer rates, money costs and final dates are -good enough to proceed the whole 500k/400TB migration. +On any process involving several mechanisms there is always a +bottleneck among all elements taking part on the process. No one knows +in advance what is the first bottleneck. The first bottleneck has to +be determined, by measurements, not by guesses. Once this first +bottleneck is known and overcome then the next bottleneck has to be +determined and overcome too, if needed. Repeat the process of looking +for the next bottleneck and its resolution until you estimate the +transfer rates, money costs and final dates are good enough to proceed +the whole 500k/400TB migration. Possible bottlenecks: @@ -96,3 +104,22 @@ Possible bottlenecks: - Bad luck. - ... +======================================================================= +Q. How to determine what is the bottleneck in my current imapsync process? + +R. Divide and conquer. + +In order to detect whether host1/link1 is the bottleneck or +host2/link2, we have several tests to explore: + +1) run a sync from host1 to host1, with a host1 test account as destination. +This way, only host1+link1 are tested. host2 is not concerned. +If performances increase a lot then host2/link2 is the bottleneck. + +2) run a sync from host2 to host2, with a host2 test account as destination. +This way, only host2+link2 are tested. host1 is not concerned. +If performances increase a lot then host1/link1 is the bottleneck. + +If performances increase on both tests 1) and 2), I have no clue to explain that. +Same thing if they both decrease! + diff --git a/FAQ.d/FAQ.Messages_selection.txt b/FAQ.d/FAQ.Messages_selection.txt new file mode 100644 index 0000000..fd36125 --- /dev/null +++ b/FAQ.d/FAQ.Messages_selection.txt @@ -0,0 +1,93 @@ +#!/bin/cat +$Id: FAQ.Messages_selection.txt,v 1.2 2015/10/21 15:39:57 gilles Exp gilles $ + +==================================== + Imapsync. How to select messages +==================================== + +======================================================================= +Q. Is there a way we can specify a date range to sync emails? + If yes, can you please share an example? + +R. Yes, with the --search option. + + imapsync ... --search "SENTSINCE 1-Jan-2010 SENTBEFORE 31-Dec-2010" + + Jan + Feb + Mar + Apr + May + Jun + Jul + Aug + Sep + Oct + Nov + Dec + +======================================================================= +Q. Is there a way we can specify an age to sync emails? + If yes, can you please share some examples? + +R. Yes, with the --maxage or the --minage option. + +E.1 Sync only messages less than 2 days old: + + imapsync ... --maxage 2 + +E.2 Sync only messages more than 2 days old: + + imapsync ... --minage 2 + +E.3 Sync only messages more than 30 days old and less than 365 days old: + + imapsync ... --minage 30 --maxage 365 + +E.4 Sync only messages less than 30 days old or more than 365 days old: + + imapsync ... --maxage 30 --minage 365 + +Full explanation: + +--maxage : Skip messages older than days. + final stats (skipped) don't count older messages + see also --minage +--minage : Skip messages newer than days. + final stats (skipped) don't count newer messages + You can do (+ are the messages selected): + past|----maxage+++++++++++++++>now + past|+++++++++++++++minage---->now + past|----maxage+++++minage---->now (intersection) + past|++++minage-----maxage++++>now (union) + + + +======================================================================= +Q. I want to sync messages based on their UID. + +R. First have in mind that UIDs are uniq only per folder, so work this + way only with one folder at a time, with --folder option. + +To show UIDs, there is the --debugLIST parameter. + + imapsync ... --debugLIST + +To sync only a part of all messages, selected by UIDs +from 10000 to 11000: + + imapsync ... --search1 "UID 10000:11000" + +To sync from INBOX only 3 messages UIDs 20000 20002 20004: + + imapsync ... --search1 'OR OR UID 20000 UID 20002 UID 20004' --folder INBOX + +To sync all messages from INBOX except 3 messages +UIDs 20000 20002 20004: + + imapsync ... --search1 'NOT OR OR UID 20000 UID 20002 UID 20004' --folder INBOX + +If you search n UIDs then you have to put n-1 OR in the search line. +That's IMAP. + + diff --git a/FAQ.d/FAQ.Oracle-UCS.txt b/FAQ.d/FAQ.Oracle-UCS.txt new file mode 100644 index 0000000..dd1d3b6 --- /dev/null +++ b/FAQ.d/FAQ.Oracle-UCS.txt @@ -0,0 +1,15 @@ +#!/bin/cat +$Id: FAQ.Oracle-UCS.txt,v 1.1 2015/07/20 04:34:32 gilles Exp gilles $ + +======================================================================= + Imapsync. Oracle-UCS specific issues and solutions +======================================================================= + +Oracle-UCS was previously Sun JES, IPlanet, etc. + + +"NO Message contains NUL characters" +--skipmess 'm/(\x00)+\Z/' + +"Message contains invalid header" +--skipmess 'm/[\x80-\xff]/' \ No newline at end of file diff --git a/FAQ.d/FAQ.Security.txt b/FAQ.d/FAQ.Security.txt new file mode 100644 index 0000000..0bec110 --- /dev/null +++ b/FAQ.d/FAQ.Security.txt @@ -0,0 +1,21 @@ +#!/bin/cat +# $Id: FAQ.Security.txt,v 1.1 2015/10/21 14:18:27 gilles Exp gilles $ + +====================================================================== + Imapsync. Security issues and solutions +====================================================================== + + +====================================================================== +Q. Imapsync used to use SSL_VERIFY_PEER now it uses SSL_VERIFY_NONE. + How can I change this back to the more secure SSL_VERIFY_PEER? + + +R1. In function "sub set_ssl", replace + IO::Socket::SSL::SSL_VERIFY_NONE() +by + IO::Socket::SSL::SSL_VERIFY_PEER() + + +C1. Don't do this in function "sub set_tls" since it won't work by principle, + tls is done AFTER the application level connexion is established diff --git a/FAQ.d/FAQ.SmarterMail.txt b/FAQ.d/FAQ.SmarterMail.txt new file mode 100755 index 0000000..45d3ffe --- /dev/null +++ b/FAQ.d/FAQ.SmarterMail.txt @@ -0,0 +1,46 @@ +#!/bin/cat +$Id: FAQ.SmarterMail.txt,v 1.6 2015/11/30 02:58:25 gilles Exp gilles $ + +======================================================================= + Imapsync. SmarterMail specific issues and solutions +======================================================================= + + +======================================================================= +Q. Synchronizing from SmarterMail to XXX + +On Unix: +imapsync --host1 imap.d1.org --user1 joe --password1 secret1 \ + --host2 imap.d2.org --user2 joe --password2 secret2 \ + --sep1 "/" --prefix1 "" --useheader Message-Id \ + --regextrans2 "s,Deleted Items,Trash," \ + --regextrans2 "s,Junk E-Mail,Junk," \ + --regextrans2 "s,Sent Items,Sent," + +On Windows: +imapsync.exe --host1 imap.d1.org --user1 joe --password1 secret1 ^ + --host2 imap.d2.org --user2 joe --password2 secret2 ^ + --sep1 "/" --prefix1 "" --useheader Message-Id ^ + --regextrans2 "s,Deleted Items,Trash," ^ + --regextrans2 "s,Junk E-Mail,Junk," ^ + --regextrans2 "s,Sent Items,Sent," + +Maybe add other --regextrans2 to change folder names, for this +see also http://imapsync.lamiral.info/FAQ.d/FAQ.Folders_Mapping.txt + +======================================================================= +Q. Synchronizing from XXX to SmarterMail + +On Unix: +imapsync --host1 imap.d1.org --user1 joe --password1 secret1 \ + --host2 imap.d2.org --user2 joe --password2 secret2 \ + --sep2 "/" --prefix2 "" --useheader Message-Id + +On Windows: +imapsync.exe --host1 imap.d1.org --user1 joe --password1 secret1 ^ + --host2 imap.d2.org --user2 joe --password2 secret2 ^ + --sep2 "/" --prefix2 "" --useheader Message-Id + + +======================================================================= + diff --git a/FAQ.d/FAQ.Various_Server_Softwares.txt b/FAQ.d/FAQ.Various_Server_Softwares.txt new file mode 100644 index 0000000..9d9fc25 --- /dev/null +++ b/FAQ.d/FAQ.Various_Server_Softwares.txt @@ -0,0 +1,283 @@ +#!/bin/cat +$Id: FAQ.Various_Server_Softwares.txt,v 1.2 2015/10/21 15:41:41 gilles Exp gilles $ + +======================================================================= + Imapsync. Server software specific issues and solutions +======================================================================= + + + +======================================================================= +Q. From Zimbra to XXX + +imapsync ... \ + --exclude "Conversation Action Settings" \ + --exclude "Quick Step Settings" \ + --exclude "News Feed" + +======================================================================= +Q. From or to HMailServer version 4.4.1. + +R. You have to add prefix and separator manually because 4.4.1 doesn't +honor the NAMESPACE imap command. + +Example for host1: + +imapsync ... \ + --prefix1 "" --sep1 . + +No specific option for HMailServer 5.3.3 since NAMESPACE is supported. + +Maybe --subscribe_all will help you to see all migrated folders. + + +======================================================================= +Q. Synchronizing from Kerio Connect to XXX + +R. No special options required. +See also: +http://www.linux-france.org/prj/imapsync_list/msg01756.html +http://www.safetynet-it.com/it-support/mac-kerio-server-to-microsoft-exchange-2010-migration-1/ +http://www.safetynet-it.com/it-support/mac-kerio-server-to-microsoft-exchange-2010-migration-2/ + + +======================================================================= +Q. Synchronizing from Yahoo to XXX + +R. Use --host1 imap.mail.yahoo.com --ssl1 + +./imapsync \ + --host1 imap.mail.yahoo.com \ + --user1 billy \ + --password1 secret \ + --ssl1 \ + --host2 XXX \ + --user2 billy \ + --password2 secret + +SSL is mandatory for yahoo since november 2011. + +======================================================================= +Q. from Microsoft's Exchange 2007 to Google Apps for your Domain + (GAFYD) + +R. Take a look at: +http://mark.ossdl.de/2009/02/migrating-from-exchange-2007-to-google-apps-mail/ + + +======================================================================= +Q. Migrating from or to Parallels Plex Server + +R. It depends on the OS + +Parallells Plesk Panel for Windows requires --sep2 / --prefix2 "" +Parallells Plesk Panel for Linux works with default parameters. + +======================================================================= +Q. I'm migrating from WU to Cyrus, and the mail folders are under + /home/user/mail but the tool copies everything in /home/user, how + can i avoid that? + +Two solutions: + +R. Use + imapsync ... --include '^mail' + +R. or (better) + imapsync ... --subscribed --subscribe + + +======================================================================= +Q. I'm migrating from WU to Cyrus, and the mail folders are under + /home/user/mail directory. When imapsync creates the folders in + the new cyrus imap server, it makes a folder "mail" and below that + folder puts all the mail folders the user have in /home/user/mail, + i would like to have all those folders directly under INBOX. + +R. Use + imapsync ... --regextrans2 's/^mail/INBOX/' --dry + look at the simulation and if all transformations seem + good then remove the --dry option. + + +======================================================================= +Q. Migrating from Groupwise to Cyrus + +R. By Jamie Neil: + +I eventually managed to get the mail to migrate without errors using the +following options: + +--sep1 / + - doesn't report separator so has to be set explicitly. + +--nosyncacls + - doesn't support ACLs. + +--skipheader '^Content-Type' + - MIME separator IDs seem to change every time a mail is accessed so + this is required to stop duplicates. + +--maxage 3650 + - some messages just don't seem to want to transfer and produce the + perl errors I mentioned before. This prevents the errors, but the + bad messages don't transfer. + +Even though the mail migrated OK, there are a couple of gotchas with +Groupwise IMAP: + +1) Some of the GW folders are not real folders and are not available +to IMAP, the main problem one being "Sent Items". I could find no way +of coping the contents of these folders. The nearest I got was to +create a "real" folder and copy/move the sent items into it, but +imapsync still didn't see the messages (I think because there is +something funny about the reported dates/sizes). + +It think this problem has been rectified in GW6.5. + +2) The "skipheader '^Content-Type'" directive is required to stop +duplicate messages being created. GW seems to generate this field on +the fly for messages that have MIME separators and so it's different +every time. + +3) Version 6.0.1 of the Groupwise Internet Connector sucks. I was +getting server aborts when I pushed it a bit hard! I eventually had to +upgrade to 6.0.4 which seems to be a lot more stable. + + +======================================================================= +Q. Migrating from iPlanet Messaging Server +5.2 Patch 2 (built Jul 14 2004)) to Groupwise 7.0 +I encounter many errors like this: +"Error trying to append string: 17847 BAD APPEND" + +R. GroupWise 7 seems buggy. Apply GroupWise 7 support pack 1 + +======================================================================= +Q. Migrating from David Tobit V10 (DvISE Mail Access Server MA-...) + +R. Use the following options: + +imapsync ... --prefix1 "" --sep1 / --idatefromheader ^ + --nofoldersizes --useuid --nocheckmessageexists + +======================================================================= +Q. Migrating from David Tobit V8 + ("* OK IMAP4rev1 DvISE Mail Access Server MA-8.10a (0126)") + +First try above V10 solution since improvments have been made +to support Tobit. + +R. Use the following options : +imapsync ... --prefix1 INBOX. --sep1 / --subscribe --subscribed + +======================================================================= +Q. Migrating from Tobit David Server 6 + ("DvISE Mail Access Server MA-6.60a (0118)") + +First try above V10 solution since improvments have been made +to support Tobit. + +R. Look at the discussion: +http://www.linux-france.org/prj/imapsync_list/msg00582.html +http://www.linux-france.org/prj/imapsync_list/threads.html#00582 +patch saved in ./patches/imapsync-1.337_tobit_V6.patch + +======================================================================= +Q. I need to migrate 1250 mailboxes, passwords are in a MySQL Database. +Can you tell me if your script suits my needs? + +R. Mailboxes must exist before running imapsync. +You have to extract users logins and passwords in a csv file. +See the "HUGE MIGRATION" section in the README file. + + +====================================================================== +Q: From MailEnable 1.75 +R: --sep1 "/" --prefix1 "" + +Q: From MailEnable 2.2 +R: --sep1 "." --prefix1 "" + +Q: To MailEnable +R: --sep2 / --prefix2 "" --addheader --messageidnodomain --syncflagsaftercopy + +====================================================================== +Q. From GMX IMAP4 StreamProxy +R. Use: + --prefix1 INBOX and --sep1 . + +====================================================================== +Q. From Courier to Archiveopteryx +R. You can read http://www.archiveopteryx.org/migration/imapsync + Default values might be fine now with latest imapsync. + +====================================================================== +Q. To Sun Java(tm) System Messaging Server 6.2-7.05 +Q. To Communigate Pro - Solaris version + +R. See and run patches/imapsync_1.267_jari + + +====================================================================== +Q. From Softalk Workgroup Mail 7.6.4 + +R. Old Softalk releases don't support the IMAP SEARCH command. + Here are the options to get it working. + +imapsync ... --sep1 '.' --prefix1 '' \ + --noabletosearch --nocheckmessageexists --addheader + +(Thanks to Andrew Tucker) + +====================================================================== +Q. From or to QQMail IMAP4Server + +R. imapsync ... --noabletosearch + +====================================================================== +Q. From FirstClass to XXX + http://www.firstclass.com/ + +R. Migrating from FirstClass is not easy because FirstClass, strangely, + does not show all messages via IMAP. To make it show all messages, + a trick, painful to follow by hand, is moving emails + out and back in, for each folder. May be it can be done by a script. + + FirstClass releases prior to release 12 do not shows the "Sent" + folder in IMAP but FirstClass release 12 shows it. + I advice you to upgrade to FirstClass release 12 before leaving it + with imapsync or another imap tool. + +Here is a command line used to migrate from FirtClass release 12: + + imapsync ... \ + --tmpdir /var/tmp --usecache \ + --useheader Message-ID \ + --idatefromheader \ + --addheader \ + --regextrans2 "s,(/|^) +,\$1,g" --regextrans2 "s, +(/|$),\$1,g" \ + --regextrans2 "s/[\^]/_/g" \ + --regextrans2 "s/['\"\\\\]/_/g" \ + --regextrans2 "s,&AC8-,-,g" \ + --regextrans2 "s,&APg-,oe,g" + +On Windows, in the previous example containing \$1 you have to +replace the two \$1 by $1 (remove the \ before $). + +Special thanks to Kristian Wind and Joey Alexander for helping me +writing this FAQ item. +See also this worth reading discussion in a Zimbra forum: +http://www.zimbra.com/forums/migration/20349-help-needed-migrating-firstclass.html + +====================================================================== +Q. From XXX to FTGate + +R. Do NOT use --usecache since new UIDs are not given by FTGate and also + badly guessed by imapsync. UIDEXPUNGE does not work so use also + --expunge2 when using --delete2 + + imapsync ... \ + --sep2 / --prefix2 "" \ + --useheader Message-Id \ + diff --git a/FAQ.d/FAQ.XOAUTH2.txt b/FAQ.d/FAQ.XOAUTH2.txt new file mode 100644 index 0000000..9e8c22d --- /dev/null +++ b/FAQ.d/FAQ.XOAUTH2.txt @@ -0,0 +1,110 @@ +#!/bin/cat +$Id: FAQ.XOAUTH2.txt,v 1.6 2015/11/30 23:40:10 gilles Exp gilles $ + +======================================================================= + Imapsync. Using XOAUTH2 and XOAUTH authentication (Gmail) +======================================================================= + + +======================================================================= +Q. Is XOAUTH2 authentication available with imapsync? + +R. Yes, but XOAUTH2 has been really tested on Unix systems, + less profund on Windows but it should work. + +First, consider the XOAUTH2 feature at a prototype level. + +Perl modules needed for xoauth2 are: + Crypt::OpenSSL::RSA + JSON + JSON::WebToken + LWP + HTML::Entities + +A easy way to install or upgrade Perl modules is to use cpanm command, +also called cpanminus. + + sudo cpanm JSON::WebToken JSON Crypt::OpenSSL::RSA LWP HTML::Entities + +The code and first explanation comes from Joaquin Lopez at +https://github.com/imapsync/imapsync/pull/25 +http://www.linux-france.org/prj/imapsync_list/msg02129.html + +Also, the binary command "openssl" is needed since it is used to +convert the pk12 file. +On Windows I've tried xoauth2 with openssl from +https://slproweb.com/download/Win32OpenSSL-1_0_2d.exe at +https://slproweb.com/products/Win32OpenSSL.html + + +Here is a complete example for Gmail. It is a little stupid +since it is the same account as source and destination. + +All xoauth2 is given via the --password1 parameter. +It has the form: + + --password1 "A;B;C" + +where A = 108687549524-gj68fg5ho5icoicv3v79dq2rcuf5c85e@developer.gserviceaccount.com +is the name of the Google Developer API service account. + +where B = /g/var/pass/imapsync-xoauth2-15f8456ad5b7_notasecret.p12 +is the location of the keyfile associated with it. + +where C = notasecret +is the password to access the keyfile. + + +imapsync \ + --host1 imap.gmail.com --ssl1 --user1 gilles.lamiral@gmail.com \ + --password1 "108687549524-gj68fg5ho5icoicv3v79dq2rcuf5c85e@developer.gserviceaccount.com;/g/var/pass/imapsync-xoauth2-15f8456ad5b7_notasecret.p12;notasecret" \ + --host2 imap.gmail.com --ssl2 --user2 gilles.lamiral@gmail.com \ + --password2 "108687549524-gj68fg5ho5icoicv3v79dq2rcuf5c85e@developer.gserviceaccount.com;/g/var/pass/imapsync-xoauth2-15f8456ad5b7_notasecret.p12" \ + --justfoldersizes --nofoldersizes \ + --authmech1 XOAUTH2 --authmech2 XOAUTH2 --debug + +Use your own xoauth2 values. + +======================================================================= +Q. How to use XOAUTH to globally authenticate gmail users? + +R0. XOAUTH is considered obsolete and superseded by XOAUTH2 + Anyway the manage part might be the same (I don't know). + +R1. The XOAUTH code and this FAQ item come from Eduardo Bortoluzzi + Thanks Eduardo! + +R2. In case you still have to use XOAUTH, here is the method: + + The goal of OAUTH is to migrate all users from/to Google Apps + Premier Edition without knowing their passwords. + + The global password is available at the Google Apps control panel, + at Advanced Tools -> Manage OAuth domain key. + +./imapsync \ + --host1 imap.gmail.com --ssl1 \ + --user1 foo@lab3.dedal.br \ + --password1 secret1 \ + --authmech1 XOAUTH \ + --host2 imap.gmail.com --ssl2 \ + --user2 bar@lab3.dedal.br \ + --password2 secret2 \ + --authmech2 XOAUTH + +Google Apps is a paid service, but you can try it for 30 days without any cost. + +Some notes about configuring the Google Apps XOAUTH: + + On "Advanced Tools > Manage OAuth domain key > Two-legged OAuth access control" + the "Allow access to all APIs" must be checked + (https://support.google.com/a/bin/answer.py?answer=162105) + + OR + + On "Advanced Tools > Manage third party OAuth client access", + the configured costumer key must have the scope + "https://mail.google.com/" configured + (https://support.google.com/a/bin/answer.py?answer=162106). + + diff --git a/INSTALL b/INSTALL index 1beaf83..9f7e73d 100644 --- a/INSTALL +++ b/INSTALL @@ -1,4 +1,4 @@ -# $Id: INSTALL,v 1.47 2015/03/16 16:36:10 gilles Exp gilles $ +# $Id: INSTALL,v 1.48 2015/07/18 20:25:03 gilles Exp gilles $ # # This is the main INSTALL file for imapsync. # imapsync : IMAP sync and migrate tool. @@ -110,15 +110,18 @@ http://imapsync.lamiral.info/INSTALL.d/INSTALL.Mandriva.txt Purchase imapsync at http://imapsync.lamiral.info/ -You'll have access to a compressed tarball called imapsync-x.xxx.tgz -where x.xxx is the version number. Untar the tarball where +or get it anywhere. + +You have access to a compressed tarball called imapsync-1.xxx.tgz +where 1.xxx is the version number. Untar the tarball where you want: - tar xzvf imapsync-x.xxx.tgz + cd + tar xzvf imapsync-1.xxx.tgz -Go into the directory imapsync-x.xxx +Go into the directory imapsync-1.xxx - cd imapsync-x.xxx + cd imapsync-1.xxx You can easily detect any missing Perl modules via the script prerequisites_imapsync located in the INSTALL.d directory: diff --git a/INSTALL.d/INSTALL.CPanel.txt b/INSTALL.d/INSTALL.CPanel.txt index fb0e4bd..870cf64 100644 --- a/INSTALL.d/INSTALL.CPanel.txt +++ b/INSTALL.d/INSTALL.CPanel.txt @@ -1,3 +1,6 @@ +#!/bin/cat +# $Id: INSTALL.CPanel.txt,v 1.4 2015/09/19 08:55:25 gilles Exp gilles $ + ================================= = Installing imapsync on CPanel = ================================= diff --git a/INSTALL.d/INSTALL.Centos.txt b/INSTALL.d/INSTALL.Centos.txt index 00ef7bf..9445c20 100644 --- a/INSTALL.d/INSTALL.Centos.txt +++ b/INSTALL.d/INSTALL.Centos.txt @@ -1,3 +1,5 @@ +#!/bin/cat +# $Id: INSTALL.Centos.txt,v 1.4 2015/09/19 08:55:25 gilles Exp gilles $ ================================= = Installing imapsync on CentOS = @@ -22,14 +24,19 @@ A good test that shows also the basic example: imapsync +A live test: + + imapsync --testslive + +Unit tests: + + imapsync --tests ============== == Centos 6 == ============== -This section has not been tested with latest imapsync releases (2014 and after) -so it can fail. In case it happens, just write me at gilles.lamiral@laposte.net -and we will fix it together. +This section has been tested with imapsync release 1.644 First, install access to the Epel repository @@ -37,15 +44,24 @@ First, install access to the Epel repository rpm -Uvh epel-release-6-8.noarch.rpm Then install all other packages via yum: - - yum install \ -perl-Mail-IMAPClient \ -"perl(Term::ReadKey)" \ -"perl(Authen::NTLM)" \ -perl-Data-Uniqid \ -perl-File-Copy-Recursive \ -perl-IO-Tee \ -perl-Unicode-String + + yum install \ + perl-Digest-HMAC \ + perl-NTLM \ + perl-Compress-Zlib \ + perl-Data-Uniqid \ + perl-Digest-HMAC \ + perl-File-Copy-Recursive \ + perl-IO-Socket-SSL \ + perl-IO-Socket-INET6 \ + perl-IO-Tee \ + perl-Mail-IMAPClient \ + perl-Parse-RecDescent \ + perl-TermReadKey \ + perl-Test-Simple \ + perl-Test-Pod \ + perl-Unicode-String \ + perl-URI diff --git a/INSTALL.d/INSTALL.Darwin.txt b/INSTALL.d/INSTALL.Darwin.txt index a2b6dca..bae24a0 100644 --- a/INSTALL.d/INSTALL.Darwin.txt +++ b/INSTALL.d/INSTALL.Darwin.txt @@ -1,76 +1,73 @@ +#!/bin/cat +# $Id: INSTALL.Darwin.txt,v 1.10 2015/09/19 08:55:25 gilles Exp gilles $ -# $Id: INSTALL.Darwin.txt,v 1.6 2015/03/16 16:29:27 gilles Exp gilles $ +=================================================== += Installing imapsync binary on Darwin / Mac OS X = +=================================================== -============================================ -= Installing imapsync on Darwin / Mac OS X = -============================================ - -First let's configure the cpan command in order it modify only a -very local installation, local to a user, the user you're logged in. +There is a standalone imapsync binary for Mac OS X called imapsync_bin_Darwin, +available in the compressed tarball called imapsync-1.xxx.tgz +where 1.xxx is the version number. I suppose this tarball is put +under your $HOME directory, let say /Users/gilles/, but you can +put it anywhere. Open a terminal: /Applications/Utilities/Terminal double-click on Terminal. -In order to do a local install, we have to take a fresh start. -In this terminal, type the following (or better copy-paste this line and press RETURN): - rm -f .cpan/CPAN/MyConfig.pm - cpan +Untar the tarball where you want: -cpan should ask for an automatic configuration, say yes. -Example of output: + cd + tar xzvf /Users/gilles/imapsync-1.xxx.tgz ------------------------------------------------------------------------------- -Would you like to configure as much as possible automatically? [yes] -... -What approach do you want? (Choose 'local::lib', 'sudo' or 'manual') - [local::lib] ------------------------------------------------------------------------------- - +Go into the directory imapsync-1.xxx -At the end of the run, cpan might propose to add some lines in your .bashrc file. -Say yes. The output on the screen is something like the following: + cd imapsync-1.xxx ------------------------------------------------------------------------------- -... -local::lib is installed. You must now add the following environment variables -to your shell configuration files (or registry, if you are on Windows) and -then restart your command line shell and CPAN before installing modules: -PERL_MB_OPT="--install_base \"/Users/gilles/perl5\""; export PERL_MB_OPT; -PERL_MM_OPT="INSTALL_BASE=/Users/gilles/perl5"; export PERL_MM_OPT; +First let's have a simple run to see if imapsync_bin_Darwin works. +You should see some help about options and an example at the end +of this run: -Would you like me to append that to /home/Users/.bashrc now? [yes] -commit: wrote '/Users/gilles/.cpan/CPAN/MyConfig.pm' -... ------------------------------------------------------------------------------- + ./imapsync_bin_Darwin -You have to source (the command to source is "." ) your .bashrc and run the "cpan -i" command: +To go further, perform a complete test with two +real IMAP server accounts: + + ./imapsync_bin_Darwin --testslive - . .bashrc +If this sync works fine then imapsync_bin_Darwin is ready for any +imap account synchronization. -The next time you use cpan command, it will install Perl modules locally, -where you have permission to create files and directories, something like -the path /Users/gilles/perl5/ (where gilles is replaced by your login name). -Next, let's get a script that will check your Perl installation. -Open a terminal: /Applications/Utilities/Terminal double-click on Terminal. -In this terminal, type the following (or better copy-paste this line and press RETURN): +=================================================== += Installing imapsync script on Darwin / Mac OS X = +=================================================== - curl -L http://imapsync.lamiral.info/INSTALL.d/prerequisites_imapsync > prerequisites_imapsync -Now you should have a script named "prerequisites_imapsync" in the current directory. -Let's execute it with a shell, type: +wget --no-check-certificate -O- http://cpanmin.us | perl - -l ~/perl5 App::cpanminus local::lib +eval `perl -I ~/perl5/lib/perl5 -Mlocal::lib` +perl -I ~/perl5/lib/perl5 -Mlocal::lib - sh prerequisites_imapsync +echo 'eval `perl -I ~/perl5/lib/perl5 -Mlocal::lib`' >> ~/.profile +echo 'export MANPATH=$HOME/perl5/man:$MANPATH' >> ~/.profile +cat ~/.profile +cpanm CPAN -When "sh prerequisites_imapsync" command is ended it will propose you -to execute a "cpan -i ..." command to install the missing Perl modules. -The "..." in "cpan -i ..." have to be replaced by the list proposed -in the last output line of a "sh prerequisites_imapsync" run. -For example it can be: +curl -L http://imapsync.lamiral.info/INSTALL.d/prerequisites_imapsync > prerequisites_imapsync +sh prerequisites_imapsync - cpan -i Authen::NTLM Data::Uniqid File::Copy::Recursive IO::Tee Mail::IMAPClient Unicode::String +cpanm Authen::NTLM +cpanm File::Copy::Recursive IO::Tee +cpanm Mail::IMAPClient +cpanm Unicode::String -Once you've run the "cpan -i" command, you can rerun "sh prerequisites_imapsync" +wget -c http://imapsync.lamiral.info/imapsync +./imapsync +perl ./imapsync +perl ./imapsync --modules +cpanm Data::Uniqid +cpanm JSON::WebToken + +You can rerun "sh prerequisites_imapsync" to verify everything is ok: sh prerequisites_imapsync @@ -80,6 +77,20 @@ When everything is ok the script execution ends with this sentence Now imapsync should work on your system. +================================================= += Building imapsync binary on Darwin / Mac OS X = +================================================= + +cpanm Module::ScanDeps +cpanm Module::ScanDeps +cpanm PAR::Packer + +pp -o imapsync.bin imapsync + +./imapsync.bin +./imapsync.bin --testslive +./imapsync.bin --tests +./imapsync.bin --module diff --git a/INSTALL.d/INSTALL.Debian.txt b/INSTALL.d/INSTALL.Debian.txt index 1137002..4d1967c 100644 --- a/INSTALL.d/INSTALL.Debian.txt +++ b/INSTALL.d/INSTALL.Debian.txt @@ -1,3 +1,5 @@ +#!/bin/cat +# $Id: INSTALL.Debian.txt,v 1.5 2015/09/19 08:55:25 gilles Exp gilles $ ======================================== = Installing imapsync on Debian 6 or 7 = @@ -71,6 +73,10 @@ liburi-perl perl -MCPAN -e "install Data::Uniqid" perl -MCPAN -e "install Authen::NTLM" + perl -MCPAN -e "install Mail::IMAPClient" + +Latest command is because the Perl module Mail::IMAPClient +is too old on Debian 6 (it's release "buggy" 3.25). Now a good dependencies test that shows also the basic example: diff --git a/INSTALL.d/INSTALL.FreeBSD.txt b/INSTALL.d/INSTALL.FreeBSD.txt index 990b8db..2920100 100644 --- a/INSTALL.d/INSTALL.FreeBSD.txt +++ b/INSTALL.d/INSTALL.FreeBSD.txt @@ -1,7 +1,9 @@ +#!/bin/cat +# $Id: INSTALL.FreeBSD.txt,v 1.6 2015/09/19 08:55:25 gilles Exp gilles $ + ================================== = Installing imapsync on FreeBSD = ================================== -$Id: INSTALL.FreeBSD.txt,v 1.3 2015/03/16 16:32:06 gilles Exp gilles $ Thanks to Kurt Jaeger pi@FreeBSD.org a imapsync package is available in FreeBSD http://portsmon.freebsd.org/portoverview.py?category=mail&portname=imapsync @@ -14,4 +16,4 @@ or if you're already root on the console: pkg install imapsync Tested 7 March 2015 on FreeBSD 10.1-RELEASE - \ No newline at end of file + diff --git a/INSTALL.d/INSTALL.Mandriva.txt b/INSTALL.d/INSTALL.Mandriva.txt index ab34e7d..315c5d8 100644 --- a/INSTALL.d/INSTALL.Mandriva.txt +++ b/INSTALL.d/INSTALL.Mandriva.txt @@ -1,3 +1,5 @@ +#!/bin/cat +# $Id: INSTALL.Mandriva.txt,v 1.4 2015/09/19 08:55:25 gilles Exp gilles $ ===================================== == Installing imapsync on Mandriva == diff --git a/INSTALL.d/INSTALL.Ubuntu.txt b/INSTALL.d/INSTALL.Ubuntu.txt index 9a7d3ef..6e2bd1e 100644 --- a/INSTALL.d/INSTALL.Ubuntu.txt +++ b/INSTALL.d/INSTALL.Ubuntu.txt @@ -1,3 +1,5 @@ +#!/bin/cat +# $Id: INSTALL.Ubuntu.txt,v 1.4 2015/09/19 08:55:25 gilles Exp gilles $ ================================= = Installing imapsync on Ubuntu = diff --git a/LICENSE b/LICENSE index 4dde4a0..846c367 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ NO LIMIT PUBLIC LICENSE - Version 0, June 2012 + Version 0/0, June 2012 Gilles LAMIRAL La Billais @@ -10,6 +10,6 @@ France Terms and conditions for copying, distribution, modification or anything else. - 0 No limit to do anything with this work and this license. + 0 No limits to do anything with this work and this license. 1 GOTO 0 diff --git a/Makefile b/Makefile index 76925bc..75ad822 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ -# $Id: Makefile,v 1.189 2015/07/17 17:36:56 gilles Exp gilles $ +# $Id: Makefile,v 1.209 2015/12/03 03:25:22 gilles Exp gilles $ .PHONY: help usage all @@ -21,10 +21,14 @@ usage: @echo "make W/test3.bat # run W/test3.bat on win32" @echo "make W/test_reg.bat # run W/test_reg.bat on win32" @echo "make W/test_exe_2.bat # run W/test_exe_2.bat on win32" - @echo "make prereq_win32 # run W/install_modules.bat on win32" + @echo "make examples/sync_loop_windows.bat # run examples/sync_loop_windows.bat on win32" + + @echo "make win32_prereq # run W/install_modules.bat on win32" + @echo "make win32_update_ssl # run W/install_module_ssl.bat on win32" @echo "make all " @echo "make upload_tests # upload tests.sh" @echo "make upload_index" + @echo "make upload_FAQ # upload FAQs and documentation" @echo "make valid_index # check index.shtml for good syntax" @echo "make upload_ks" @echo "make imapsync.exe" @@ -45,7 +49,7 @@ VERSION=$(shell perl -I$(IMAPClient) ./imapsync --version 2>/dev/null || cat VER VERSION_EXE=$(shell cat ./VERSION_EXE) HELLO=$(shell date;uname -a) -IMAPClient_3xx=./W/Mail-IMAPClient-3.35/lib +IMAPClient_3xx=./W/Mail-IMAPClient-3.37/lib IMAPClient=$(IMAPClient_3xx) HOSTNAME = $(shell hostname -s) @@ -62,7 +66,7 @@ hello: @echo "$(BIN_NAME)" -all: ChangeLog README VERSION OPTIONS W/imapsync.1 prereq perlcritic bin mac imapsync.exe VERSION_EXE +all: ChangeLog README VERSION OPTIONS W/imapsync.1 biz prereq allcritic bin mac imapsync.exe VERSION_EXE testp : sh INSTALL.d/prerequisites_imapsync @@ -135,16 +139,18 @@ install: testp W/imapsync.1 ci: cidone cidone: - rcsdiff RCS/* - cd W && rcsdiff RCS/* - cd S && rcsdiff RCS/* - cd examples && rcsdiff RCS/* + rcsdiff RCS/* + rcsdiff W/*.bat W/*.out W/*.txt W/*.htaccess W/*.shtml W/*.t2t + rcsdiff S/*.txt S/*.shtml + rcsdiff INSTALL.d/*.txt INSTALL.d/prerequisites_imapsync + rcsdiff FAQ.d/*txt + rcsdiff examples/*.sh examples/*.bat examples/*.txt ############### # Local goals ############### -.PHONY: prereq test tests testp testf test3xx testv3 perlcritic +.PHONY: prereq test tests testp testf test3xx testv3 perlcritic allcritic prereq: W/prereq.scandeps @@ -154,16 +160,26 @@ W/prereq.scandeps: INSTALL.d/prerequisites_imapsync imapsync -perlcritic: W/perlcritic_3.out W/perlcritic_2.out +perlcritic: W/perlcritic_3.out W/perlcritic_2.out + +allcritic: W/perlcritic_4.out W/perlcritic_3.out W/perlcritic_2.out W/perlcritic_1.out W/perlcritic_1.out: imapsync perlcritic -1 imapsync > W/perlcritic_1.out || : + echo | ci -l W/perlcritic_1.out W/perlcritic_2.out: imapsync perlcritic -2 imapsync > W/perlcritic_2.out || : + echo | ci -l W/perlcritic_2.out W/perlcritic_3.out: imapsync perlcritic -3 imapsync > W/perlcritic_3.out || : + echo | ci -l W/perlcritic_3.out + +W/perlcritic_4.out: imapsync + perlcritic -4 imapsync > W/perlcritic_4.out || : + echo | ci -l W/perlcritic_4.out + test_quick : test_quick_3xx @@ -208,13 +224,18 @@ W/test_tests.bat: scp imapsync W/test_tests.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/' ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/test_tests.bat' -.PHONY: W/*.bat +.PHONY: W/*.bat examples/* +examples/sync_loop_windows.bat: + unix2dos examples/sync_loop_windows.bat + scp imapsync examples/file.txt examples/sync_loop_windows.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/' + ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/sync_loop_windows.bat --nodry --dry --nodry' +# ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/sync_loop_windows.bat ' W/test2.bat: unix2dos W/test2.bat - scp imapsync examples/file.txt W/test2.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/' + scp imapsync W/test2.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/' ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/test2.bat' W/test3.bat: @@ -240,23 +261,32 @@ W/test3_gmail.bat: test_imapsync_exe: unix2dos W/test_exe.bat scp W/test_exe.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/' - time ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/test_exe.bat' + ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/test_exe.bat' -prereq_win32: +win32_prereq: unix2dos W/install_modules.bat scp W/install_modules.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/' + ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/install_modules.bat' +win32_update_ssl: + scp W/install_module_ssl.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/' + ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/install_module_ssl.bat' + +W/install_module_one.bat: + unix2dos W/install_module_one.bat + scp W/install_module_one.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/' + ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/install_module_one.bat' imapsync.exe: imapsync rcsdiff imapsync ssh Admin@c 'perl -V' (date "+%s"| tr "\n" " "; echo -n "BEGIN " $(VERSION) ": "; date) >> W/.BUILD_EXE_TIME - unix2dos W/*.bat examples/*.bat + unix2dos W/build_exe.bat W/test_exe.bat W/install_modules.bat scp W/install_modules.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/' - # ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/install_modules.bat' scp imapsync W/build_exe.bat W/test_exe.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/' ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/build_exe.bat' ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/test_exe.bat' + rm -f imapsync.exe scp Admin@c:'C:/msys/1.0/home/Admin/imapsync/imapsync.exe' . (date "+%s"| tr "\n" " "; echo -n "END " $(VERSION) ": "; date) >> W/.BUILD_EXE_TIME @@ -265,6 +295,7 @@ exe: imapsync W/build_exe.bat dosify_bat scp imapsync W/build_exe.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/' ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/build_exe.bat' ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/imapsync.exe --modules_version' + rm -f imapsync.exe scp Admin@c:'C:/msys/1.0/home/Admin/imapsync/imapsync.exe' . (date "+%s"| tr "\n" " "; echo -n "END " $(VERSION) ": "; date) >> W/.BUILD_EXE_TIME @@ -370,7 +401,13 @@ README_dist.txt: dist_dir sh W/tools/gen_README_dist > $(DIST_PATH)/README_dist.txt unix2dos $(DIST_PATH)/README_dist.txt -.PHONY: publish upload_ks ks valid_index +.PHONY: publish upload_ks ks valid_index biz + +biz: S/imapsync_sold_by_country.txt + +S/imapsync_sold_by_country.txt: imapsync + cd S/ && /g/bin/imapsync_by_country && echo | ci -l imapsync_sold_by_country.txt + ks: rsync -avHz --delete --exclude imapsync.exe \ @@ -387,19 +424,9 @@ upload_tests: tests.sh gilles@ks.lamiral.info:public_html/imapsync/ -#upload_ks: ci tarball -upload_ks: ci tarball - rsync -aHv $(PUBLIC) ../imapsync_website/ - rsync -aHv $(PUBLIC_W) ../imapsync_website/W/ - rsync -aHv --delete ./W/images/ ../imapsync_website/W/images/ - rsync -aHv --delete ./W/ks.htaccess ../imapsync_website/.htaccess - rsync -aHv --delete ./dist/ ../imapsync_website/dist/ - rsync -aHv --delete ./examples/ ../imapsync_website/examples/ - rsync -aHv --delete ./INSTALL.d/ ../imapsync_website/INSTALL.d/ - rsync -aHvz --delete ../imapsync_website/ root@ks.lamiral.info:/var/www/imapsync/ -publish: dist upload_ks ksa +publish: dist upload_ks ksa echo Now ou can do make ml PUBLIC = ./ChangeLog ./NOLIMIT ./LICENSE ./CREDITS ./FAQ \ @@ -408,7 +435,7 @@ PUBLIC = ./ChangeLog ./NOLIMIT ./LICENSE ./CREDITS ./FAQ \ ./README ./OPTIONS ./TODO ./TUTORIAL.html ./GOOD_PRACTICES.html PUBLIC_W = ./W/style.css ./W/tw-hash.html \ -./W/TIME \ +./W/TIME.txt \ ./W/paypal.shtml ./W/paypal_return.shtml @@ -445,11 +472,11 @@ checklinkext: S/news.shtml S/external.shtml S/imapservers.shtml S/template.shtm validate --verbose index.shtml S/*.shtml touch .valid.index.shtml -.PHONY: upload_index +.PHONY: upload_index upload_FAQ upload_index: .valid.index.shtml - rcsdiff index.shtml S/*.shtml FAQ FAQ.d/*.txt INSTALL LICENSE CREDITS TODO W/*.bat examples/*.bat index.shtml INSTALL.d/prerequisites_imapsync imapsync - rsync -avH index.shtml FAQ INSTALL OPTIONS NOLIMIT LICENSE CREDITS TODO TUTORIAL.html GOOD_PRACTICES.html imapsync imapsync.exe $(BIN_NAME) imapsync_Darwin_$(VERSION) ../imapsync_website/ + rcsdiff index.shtml S/*.shtml FAQ FAQ.d/*.txt INSTALL LICENSE CREDITS TODO W/*.bat examples/*.bat index.shtml INSTALL.d/*.txt imapsync + rsync -avH index.shtml FAQ INSTALL OPTIONS NOLIMIT LICENSE CREDITS TODO TUTORIAL.html GOOD_PRACTICES.html imapsync imapsync.exe $(BIN_NAME) imapsync_bin_Darwin ../imapsync_website/ rsync -avH $(PUBLIC_W) ../imapsync_website/W/ rsync -avH S/ ../imapsync_website/S/ rsync -avH W/images/ ../imapsync_website/W/images/ @@ -458,3 +485,23 @@ upload_index: .valid.index.shtml rsync -aHv --delete ./FAQ.d/ ../imapsync_website/FAQ.d/ rsync -aHvz --delete ../imapsync_website/ root@ks.lamiral.info:/var/www/imapsync/ + +upload_FAQ: + rcsdiff FAQ FAQ.d/*.txt INSTALL LICENSE CREDITS TODO INSTALL.d/*.txt + rsync -avH FAQ INSTALL OPTIONS CREDITS TODO TUTORIAL.html GOOD_PRACTICES.html ../imapsync_website/ + rsync -aHv --delete ./INSTALL.d/ ../imapsync_website/INSTALL.d/ + rsync -aHv --delete ./FAQ.d/ ../imapsync_website/FAQ.d/ + rsync -aHvz --delete ../imapsync_website/ root@ks.lamiral.info:/var/www/imapsync/ + + +upload_ks: ci tarball + rsync -aHv $(PUBLIC) ../imapsync_website/ + rsync -aHv $(PUBLIC_W) ../imapsync_website/W/ + rsync -aHv --delete ./W/images/ ../imapsync_website/W/images/ + rsync -aHv --delete ./W/ks.htaccess ../imapsync_website/.htaccess + rsync -avH ./S/ ../imapsync_website/S/ + rsync -aHv --delete ./dist/ ../imapsync_website/dist/ + rsync -aHv --delete ./examples/ ../imapsync_website/examples/ + rsync -aHv --delete ./INSTALL.d/ ../imapsync_website/INSTALL.d/ + rsync -aHv --delete ./FAQ.d/ ../imapsync_website/FAQ.d/ + rsync -aHvz --delete ../imapsync_website/ root@ks.lamiral.info:/var/www/imapsync/ diff --git a/NOLIMIT b/NOLIMIT index 4dde4a0..846c367 100644 --- a/NOLIMIT +++ b/NOLIMIT @@ -1,5 +1,5 @@ NO LIMIT PUBLIC LICENSE - Version 0, June 2012 + Version 0/0, June 2012 Gilles LAMIRAL La Billais @@ -10,6 +10,6 @@ France Terms and conditions for copying, distribution, modification or anything else. - 0 No limit to do anything with this work and this license. + 0 No limits to do anything with this work and this license. 1 GOTO 0 diff --git a/OPTIONS b/OPTIONS index 00138ad..b352bf9 100644 --- a/OPTIONS +++ b/OPTIONS @@ -2,242 +2,252 @@ usage: ./imapsync [options] Several options are mandatory. +str means string +int means integer +reg means regular expression +cmd means command ---dry : Makes imapsync doing nothing, just print what would - be done without --dry. +--dry : Makes imapsync doing nothing, just print what would + be done without --dry. ---host1 : Source or "from" imap server. Mandatory. ---port1 : Port to connect on host1. Default is 143, 993 if --ssl1 ---user1 : User to login on host1. Mandatory. ---showpasswords : Shows passwords on output instead of "MASKED". - Useful to restart a complete run by just reading the log. ---password1 : Password for the user1. ---host2 : "destination" imap server. Mandatory. ---port2 : Port to connect on host2. Default is 143, 993 if --ssl2 ---user2 : User to login on host2. Mandatory. ---password2 : Password for the user2. +--host1 str : Source or "from" imap server. Mandatory. +--port1 int : Port to connect on host1. Default is 143, 993 if --ssl1 +--user1 str : User to login on host1. Mandatory. +--showpasswords : Shows passwords on output instead of "MASKED". + Useful to restart a complete run by just reading the log. +--password1 str : Password for the user1. +--host2 str : "destination" imap server. Mandatory. +--port2 int : Port to connect on host2. Default is 143, 993 if --ssl2 +--user2 str : User to login on host2. Mandatory. +--password2 str : Password for the user2. ---passfile1 : Password file for the user1. It must contain the - password on the first line. This option avoids to show - the password on the command line like --password1 does. ---passfile2 : Password file for the user2. Contains the password. +--passfile1 str : Password file for the user1. It must contain the + password on the first line. This option avoids to show + the password on the command line like --password1 does. +--passfile2 str : Password file for the user2. Contains the password. ---ssl1 : Use a SSL connection on host1. ---ssl2 : Use a SSL connection on host2. ---tls1 : Use a TLS connection on host1. ---tls2 : Use a TLS connection on host2. ---timeout : Connections timeout in seconds. Default is 120. - 0 means no timeout. +--ssl1 : Use a SSL connection on host1. +--ssl2 : Use a SSL connection on host2. +--tls1 : Use a TLS connection on host1. +--tls2 : Use a TLS connection on host2. +--timeout int : Connections timeout in seconds. Default is 120. + 0 means no timeout. ---authmech1 : Auth mechanism to use with host1: - PLAIN, LOGIN, CRAM-MD5 etc. Use UPPERCASE. ---authmech2 : Auth mechanism to use with host2. See --authmech1 +--authmech1 str : Auth mechanism to use with host1: + PLAIN, LOGIN, CRAM-MD5 etc. Use UPPERCASE. +--authmech2 str : Auth mechanism to use with host2. See --authmech1 ---authuser1 : User to auth with on host1 (admin user). - Avoid using --authmech1 SOMETHING with --authuser1. ---authuser2 : User to auth with on host2 (admin user). ---proxyauth1 : Use proxyauth on host1. Requires --authuser1. - Required by Sun/iPlanet/Netscape IMAP servers to - be able to use an administrative user. ---proxyauth2 : Use proxyauth on host2. Requires --authuser2. +--authuser1 str : User to auth with on host1 (admin user). + Avoid using --authmech1 SOMETHING with --authuser1. +--authuser2 str : User to auth with on host2 (admin user). +--proxyauth1 : Use proxyauth on host1. Requires --authuser1. + Required by Sun/iPlanet/Netscape IMAP servers to + be able to use an administrative user. +--proxyauth2 : Use proxyauth on host2. Requires --authuser2. ---authmd51 : Use MD5 authentification for host1. ---authmd52 : Use MD5 authentification for host2. ---domain1 : Domain on host1 (NTLM authentication). ---domain2 : Domain on host2 (NTLM authentication). +--authmd51 : Use MD5 authentification for host1. +--authmd52 : Use MD5 authentification for host2. +--domain1 str : Domain on host1 (NTLM authentication). +--domain2 str : Domain on host2 (NTLM authentication). ---folder : Sync this folder. ---folder : and this one, etc. ---folderrec : Sync this folder recursively. ---folderrec : and this one, etc. +--folder str : Sync this folder. +--folder str : and this one, etc. +--folderrec str : Sync this folder recursively. +--folderrec str : and this one, etc. ---folderfirst : Sync this folder first. --folderfirst "Work" ---folderfirst : then this one, etc. ---folderlast : Sync this folder last. --folderlast "[Gmail]/All Mail" ---folderlast : then this one, etc. +--folderfirst str : Sync this folder first. --folderfirst "Work" +--folderfirst str : then this one, etc. +--folderlast str : Sync this folder last. --folderlast "[Gmail]/All Mail" +--folderlast str : then this one, etc. ---nomixfolders : Do not merge folders when host1 is case sensitive - while host2 is not (like Exchange). Only the first - similar folder is synced (ex: Sent SENT sent -> Sent). +--nomixfolders : Do not merge folders when host1 is case sensitive + while host2 is not (like Exchange). Only the first + similar folder is synced (ex: Sent SENT sent -> Sent). ---skipemptyfolders : Empty host1 folders are not created on host2. +--skipemptyfolders : Empty host1 folders are not created on host2. ---include : Sync folders matching this regular expression ---include : or this one, etc. - in case both --include --exclude options are - use, include is done before. ---exclude : Skips folders matching this regular expression - Several folders to avoid: - --exclude 'fold1|fold2|f3' skips fold1, fold2 and f3. ---exclude : or this one, etc. +--f1f2 str1=str2 : Force folder str1 to be synced to str2. +--include reg : Sync folders matching this regular expression +--include reg : or this one, etc. + in case both --include --exclude options are + use, include is done before. +--exclude reg : Skips folders matching this regular expression + Several folders to avoid: + --exclude 'fold1|fold2|f3' skips fold1, fold2 and f3. +--exclude reg : or this one, etc. ---subfolder2 : Move whole host1 folders hierarchy under this - host2 folder . - It does it by adding two --regextrans2 options before - all others. Add --debug to see what's really going on. +--subfolder2 str : Move whole host1 folders hierarchy under this + host2 folder str . + It does it by adding two --regextrans2 options before + all others. Add --debug to see what's really going on. ---regextrans2 : Apply the whole regex to each destination folders. ---regextrans2 : and this one. etc. - When you play with the --regextrans2 option, first - add also the safe options --dry --justfolders - Then, when happy, remove --dry, remove --justfolders. - Have in mind that --regextrans2 is applied after prefix - and separator inversion. +--regextrans2 reg : Apply the whole regex to each destination folders. +--regextrans2 reg : and this one. etc. + When you play with the --regextrans2 option, first + add also the safe options --dry --justfolders + Then, when happy, remove --dry, remove --justfolders. + Have in mind that --regextrans2 is applied after prefix + and separator inversion. ---tmpdir : Where to store temporary files and subdirectories. - Will be created if it doesn't exist. - Default is system specific, Unix is /tmp but - it's often small and deleted at reboot. - --tmpdir /var/tmp should be better. ---pidfile : The file where imapsync pid is written. ---pidfilelocking : Abort if pidfile already exists. Usefull to avoid - concurrent transfers on the same mailbox. +--tmpdir str : Where to store temporary files and subdirectories. + Will be created if it doesn't exist. + Default is system specific, Unix is /tmp but + it's often small and deleted at reboot. + --tmpdir /var/tmp should be better. +--pidfile str : The file where imapsync pid is written. +--pidfilelocking : Abort if pidfile already exists. Usefull to avoid + concurrent transfers on the same mailbox. ---nolog : Turn off logging on file ---logfile : Change the default logfile pathname and filename. +--nolog : Turn off logging on file +--logfile str : Change the default log filename (can be dirname/filename). +--logdir str : Change the default log directory. Default is LOG_imapsync ---prefix1 : Remove prefix to all destination folders - (usually INBOX. or INBOX/ or an empty string "") - you have to use --prefix1 if host1 imap server - does not have NAMESPACE capability, so imapsync - suggests to use it. All other cases are bad. ---prefix2 : Add prefix to all host2 folders. See --prefix1 ---sep1 : Host1 separator in case NAMESPACE is not supported. ---sep2 : Host2 separator in case NAMESPACE is not supported. +--prefix1 str : Remove prefix to all destination folders + (usually INBOX. or INBOX/ or an empty string "") + you have to use --prefix1 if host1 imap server + does not have NAMESPACE capability, so imapsync + suggests to use it. All other cases are bad. +--prefix2 str : Add prefix to all host2 folders. See --prefix1 +--sep1 str : Host1 separator in case NAMESPACE is not supported. +--sep2 str : Host2 separator in case NAMESPACE is not supported. ---skipmess : Skips messages maching the regex. - Example: 'm/[\x80-ff]/' # to avoid 8bits messages. - --skipmess is applied before --regexmess ---skipmess : or this one, etc. +--skipmess reg : Skips messages maching the regex. + Example: 'm/[\x80-ff]/' # to avoid 8bits messages. + --skipmess is applied before --regexmess +--skipmess reg : or this one, etc. ---pipemess : Apply this command to each message content before - the copy. ---pipemess : and this one, etc. +--pipemess cmd : Apply this cmd command to each message content + before the copy. +--pipemess cmd : and this one, etc. ---disarmreadreceipts : Disarms read receipts (host2 Exchange issue) +--disarmreadreceipts : Disarms read receipts (host2 Exchange issue) ---regexmess : Apply the whole regex to each message before transfer. - Example: 's/\000/ /g' # to replace null by space. ---regexmess : and this one, etc. +--regexmess reg : Apply the whole regex to each message before transfer. + Example: 's/\000/ /g' # to replace null by space. +--regexmess reg : and this one, etc. ---regexflag : Apply the whole regex to each flags list. - Example: 's/"Junk"//g' # to remove "Junk" flag. ---regexflag : and this one, etc. +--regexflag reg : Apply the whole regex to each flags list. + Example: 's/"Junk"//g' # to remove "Junk" flag. +--regexflag reg : and this one, etc. ---delete : Deletes messages on host1 server after a successful - transfer. Option --delete has the following behavior: - it marks messages as deleted with the IMAP flag - \Deleted, then messages are really deleted with an - EXPUNGE IMAP command. +--delete : Deletes messages on host1 server after a successful + transfer. Option --delete has the following behavior: + it marks messages as deleted with the IMAP flag + \Deleted, then messages are really deleted with an + EXPUNGE IMAP command. ---delete2 : Delete messages in host2 that are not in - host1 server. Useful for backup or pre-sync. ---delete2duplicates : Delete messages in host2 that are duplicates. - Works only without --useuid since duplicates are - detected with an header part of each message. +--delete2 : Delete messages in host2 that are not in + host1 server. Useful for backup or pre-sync. +--delete2duplicates : Delete messages in host2 that are duplicates. + Works only without --useuid since duplicates are + detected with an header part of each message. ---delete2folders : Delete folders in host2 that are not in host1 server. - For safety, first try it like this (it is safe): - --delete2folders --dry --justfolders --nofoldersizes ---delete2foldersonly : Deleted only folders matching regex. - Example: --delete2foldersonly "/^Junk$|^INBOX.Junk$/" ---delete2foldersbutnot : Do not delete folders matching regex. - Example: --delete2foldersbutnot "/Tasks$|Contacts$|Foo$/" ---noexpunge : Do not expunge messages on host1. - Expunge really deletes messages marked deleted. - Expunge is made at the beginning, on host1 only. - Newly transferred messages are also expunged if - option --delete is given. - No expunge is done on host2 account (unless --expunge2) ---expunge1 : Expunge messages on host1 after messages transfer. ---expunge2 : Expunge messages on host2 after messages transfer. ---uidexpunge2 : uidexpunge messages on the host2 account - that are not on the host1 account, requires --delete2 ---nomixfolders : Avoid merging folders that are considered different on - host1 but the same on destination host2 because of - case sensitivities and insensitivities. +--delete2folders : Delete folders in host2 that are not in host1 server. + For safety, first try it like this (it is safe): + --delete2folders --dry --justfolders --nofoldersizes +--delete2foldersonly reg : Deleted only folders matching regex. + Example: --delete2foldersonly "/^Junk$|^INBOX.Junk$/" +--delete2foldersbutnot reg : Do not delete folders matching regex. + Example: --delete2foldersbutnot "/Tasks$|Contacts$|Foo$/" +--noexpunge : Do not expunge messages on host1. + Expunge really deletes messages marked deleted. + Expunge is made at the beginning, on host1 only. + Newly transferred messages are also expunged if + option --delete is given. + No expunge is done on host2 account (unless --expunge2) +--expunge1 : Expunge messages on host1 after messages transfer. +--expunge2 : Expunge messages on host2 after messages transfer. +--uidexpunge2 : uidexpunge messages on the host2 account + that are not on the host1 account, requires --delete2 +--nomixfolders : Avoid merging folders that are considered different on + host1 but the same on destination host2 because of + case sensitivities and insensitivities. ---syncinternaldates : Sets the internal dates on host2 same as host1. - Turned on by default. Internal date is the date - a message arrived on a host (mtime). ---idatefromheader : Sets the internal dates on host2 same as the - "Date:" headers. +--syncinternaldates : Sets the internal dates on host2 same as host1. + Turned on by default. Internal date is the date + a message arrived on a host (mtime). +--idatefromheader : Sets the internal dates on host2 same as the + "Date:" headers. ---maxsize : Skip messages larger (or equal) than bytes ---minsize : Skip messages smaller (or equal) than bytes ---maxage : Skip messages older than days. - final stats (skipped) don't count older messages - see also --minage ---minage : Skip messages newer than days. - final stats (skipped) don't count newer messages - You can do (+ are the messages selected): - past|----maxage+++++++++++++++>now - past|+++++++++++++++minage---->now - past|----maxage+++++minage---->now (intersection) - past|++++minage-----maxage++++>now (union) +--maxsize int : Skip messages larger (or equal) than int bytes +--minsize int : Skip messages smaller (or equal) than int bytes +--maxage int : Skip messages older than int days. + final stats (skipped) don't count older messages + see also --minage +--minage int : Skip messages newer than int days. + final stats (skipped) don't count newer messages + You can do (+ are the messages selected): + past|----maxage+++++++++++++++>now + past|+++++++++++++++minage---->now + past|----maxage+++++minage---->now (intersection) + past|++++minage-----maxage++++>now (union) ---search : Selects only messages returned by this IMAP SEARCH - command. Applied on both sides. ---search1 : Same as --search for selecting host1 messages only. ---search2 : Same as --search for selecting host2 messages only. - --search CRIT equals --search1 CRIT --search2 CRIT +--search str : Selects only messages returned by this IMAP SEARCH + command. Applied on both sides. +--search1 str : Same as --search for selecting host1 messages only. +--search2 str : Same as --search for selecting host2 messages only. + --search CRIT equals --search1 CRIT --search2 CRIT ---exitwhenover : Stop syncing when total bytes transferred reached. - Gmail per day allows 2500000000 down 500000000 upload. +--exitwhenover int : Stop syncing when total bytes transferred reached. + Gmail per day allows + 2500000000 = 2.5 GB downloaded from Gmail as host2 + 500000000 = 500 MB uploaded to Gmail as host1. ---maxlinelength : skip messages with a line length longer than bytes. - RFC 2822 says it must be no more than 1000 bytes. +--maxlinelength int : skip messages with a line length longer than int bytes. + RFC 2822 says it must be no more than 1000 bytes. ---useheader : Use this header to compare messages on both sides. - Ex: Message-ID or Subject or Date. ---useheader and this one, etc. +--useheader str : Use this header to compare messages on both sides. + Ex: Message-ID or Subject or Date. +--useheader str and this one, etc. ---subscribed : Transfers subscribed folders. ---subscribe : Subscribe to the folders transferred on the - host2 that are subscribed on host1. On by default. ---subscribeall : Subscribe to the folders transferred on the - host2 even if they are not subscribed on host1. +--subscribed : Transfers subscribed folders. +--subscribe : Subscribe to the folders transferred on the + host2 that are subscribed on host1. On by default. +--subscribeall : Subscribe to the folders transferred on the + host2 even if they are not subscribed on host1. ---nofoldersizes : Do not calculate the size of each folder in bytes - and message counts. Default is to calculate them. ---nofoldersizesatend : Do not calculate the size of each folder in bytes - and message counts at the end. Default is on. ---justfoldersizes : Exit after having printed the folder sizes. +--nofoldersizes : Do not calculate the size of each folder in bytes + and message counts. Default is to calculate them. +--nofoldersizesatend: Do not calculate the size of each folder in bytes + and message counts at the end. Default is on. +--justfoldersizes : Exit after having printed the folder sizes. ---syncacls : Synchronises acls (Access Control Lists). ---nosyncacls : Does not synchronize acls. This is the default. - Acls in IMAP are not standardized, be careful. +--syncacls : Synchronises acls (Access Control Lists). +--nosyncacls : Does not synchronize acls. This is the default. + Acls in IMAP are not standardized, be careful. ---usecache : Use cache to speedup. ---nousecache : Do not use cache. Caveat: --useuid --nousecache creates - duplicates on multiple runs. ---useuid : Use uid instead of header as a criterium to recognize - messages. Option --usecache is then implied unless - --nousecache is used. +--usecache : Use cache to speedup. +--nousecache : Do not use cache. Caveat: --useuid --nousecache creates + duplicates on multiple runs. +--useuid : Use uid instead of header as a criterium to recognize + messages. Option --usecache is then implied unless + --nousecache is used. ---debug : Debug mode. ---debugcontent : Debug content of the messages transfered. ---debugflags : Debug flags. ---debugimap1 : IMAP debug mode for host1. imap debug is very verbose. ---debugimap2 : IMAP debug mode for host2. ---debugimap : IMAP debug mode for host1 and host2. ---debugmemory : Debug mode showing memory consumption after each copy. +--debug : Debug mode. +--debugfolders : Debug mode for the folders part only. +--debugcontent : Debug content of the messages transfered. Huge ouput. +--debugflags : Debug mode for flags. +--debugimap1 : IMAP debug mode for host1. Very verbose. +--debugimap2 : IMAP debug mode for host2. Very verbose. +--debugimap : IMAP debug mode for host1 and host2. +--debugmemory : Debug mode showing memory consumption after each copy. ---tests : Run non-regression tests. ---testslive : Run a live test with test1.lamiral.info imap server. - Useful to check the basics. Needs internet connexion. +--tests : Run non-regression tests. +--testslive : Run a live test with test1.lamiral.info imap server. + Useful to check the basics. Needs internet connexion. ---version : Print software version. ---noreleasecheck : Do not check for new imapsync release (a http request). ---releasecheck : Check for new imapsync release (a http request). ---justconnect : Just connect to both servers and print useful - information. Need only --host1 and --host2 options. ---justlogin : Just login to both host1 and host2 with users - credentials, then exit. ---justfolders : Do only things about folders (ignore messages). +--version : Print only software version. +--noreleasecheck : Do not check for new imapsync release (a http request). +--releasecheck : Check for new imapsync release (a http request). +--noid : Do not send/receive ID command to imap servers. +--justconnect : Just connect to both servers and print useful + information. Need only --host1 and --host2 options. +--justlogin : Just login to both host1 and host2 with users + credentials, then exit. +--justfolders : Do only things about folders (ignore messages). ---help : print this help. +--help : print this help. Example: to synchronize imap account "test1" on "test1.lamiral.info" to imap account "test2" on "test2.lamiral.info" @@ -248,9 +258,9 @@ Example: to synchronize imap account "test1" on "test1.lamiral.info" --host1 test1.lamiral.info --user1 test1 --password1 secret1 \ --host2 test2.lamiral.info --user2 test2 --password2 secret2 -Here is a [linux] system (Linux petite 3.2.0-84-generic #121-Ubuntu SMP Tue May 5 18:55:46 UTC 2015 i686) -With perl 5.14.2 Mail::IMAPClient 3.35 -$Id: imapsync,v 1.644 2015/07/17 01:22:52 gilles Exp gilles $ +Here is a [linux] system (Linux petite 3.2.0-91-generic #129-Ubuntu SMP Wed Sep 9 10:56:56 UTC 2015 i686) +With perl 5.14.2 Mail::IMAPClient 3.37 +$Id: imapsync,v 1.670 2015/12/03 02:36:41 gilles Exp gilles $ This current imapsync is up to date Homepage: http://imapsync.lamiral.info/ diff --git a/README b/README index f5ed952..3f010f2 100644 --- a/README +++ b/README @@ -1,10 +1,10 @@ NAME imapsync - IMAP synchronisation, sync, copy or migration tool. Synchronises mailboxes between two imap servers. Good at IMAP migration. - More than 52 different IMAP server softwares supported with success, few + More than 66 different IMAP server softwares supported with success, few failures. - $Revision: 1.644 $ + $Revision: 1.670 $ SYNOPSIS To synchronize imap account "foo" on "imap.truc.org" to imap account @@ -60,36 +60,36 @@ USAGE The option list: imapsync [--host1 server1] [--port1 ] - [--user1 ] [--passfile1 ] + [--user1 str ] [--passfile1 str ] [--host2 server2] [--port2 ] - [--user2 ] [--passfile2 ] + [--user2 str ] [--passfile2 str ] [--ssl1] [--ssl2] [--tls1] [--tls2] - [--authmech1 ] [--authmech2 ] + [--authmech1 str ] [--authmech2 str ] [--proxyauth1] [--proxyauth2] [--domain1] [--domain2] [--authmd51] [--authmd52] - [--folder --folder ...] - [--folderrec --folderrec ...] - [--include ] [--exclude ] - [--prefix2 ] [--prefix1 ] - [--regextrans2 --regextrans2 ...] + [--folder str --folder str ...] + [--folderrec str --folderrec str ...] + [--include reg ] [--exclude reg ] + [--prefix2 str ] [--prefix1 str ] + [--regextrans2 reg --regextrans2 reg ...] [--sep1 ] [--sep2 ] [--justfolders] [--justfoldersizes] [--justconnect] [--justbanner] [--syncinternaldates] [--idatefromheader] [--syncacls] - [--regexmess ] [--regexmess ] - [--skipmess ] [--skipmess ] - [--maxsize ] - [--minsize ] - [--maxage ] - [--minage ] - [--search ] - [--search1 ] - [--search2 ] - [--useheader ] [--useheader ] + [--regexmess reg ] [--regexmess reg ] + [--skipmess reg ] [--skipmess reg ] + [--maxsize int ] + [--minsize int ] + [--maxage int ] + [--minage int ] + [--search str ] + [--search1 str ] + [--search2 str ] + [--useheader str ] [--useheader str ] [--nouid1] [--nouid2] [--usecache] [--noskipsize] @@ -101,7 +101,7 @@ USAGE [--nofoldersizes] [--nofoldersizesatend] [--dry] [--debug] [--debugimap][--debugimap1][--debugimap2] [--debugcontent] - [--timeout ] + [--timeout int ] [--noreleasecheck] [--releasecheck] [--pidfile ] [--pidfilelocking] @@ -387,5 +387,5 @@ SIMILAR SOFTWARES Feedback (good or bad) will often be welcome. - $Id: imapsync,v 1.644 2015/07/17 01:22:52 gilles Exp gilles $ + $Id: imapsync,v 1.670 2015/12/03 02:36:41 gilles Exp gilles $ diff --git a/S/external.shtml b/S/external.shtml index 3475910..0097578 100755 --- a/S/external.shtml +++ b/S/external.shtml @@ -5,9 +5,9 @@ Imapsync similar softwares and external services - - - + + + @@ -63,7 +63,7 @@ Prices are given par mailbox and may be outdated (December 2011).

  • French Ovh imapcopy 0 EUR: https://ssl0.ovh.net/fr/imapcopy/
  • Turkish imapcopy.net 0 TRY: http://imapcopy.net/
  • Movemymail free for the first and 5 USD thereafter: https://movemymail.net .
  • -
  • Migrationwiz 10 USD: https://www.bittitan.com/products/#migrationwiz
  • +
  • Migrationwiz 10 USD: https://www.bittitan.com/products/migrationwiz/
  • Rackspace migration 5 USD: http://www.rackspace.com/email-hosting/migrations
  • Audriga Gmbh 9.99 EUR: https://www.email-umzug.de/
  • Yippiemove 15 USD: http://www.yippiemove.com/
  • @@ -98,7 +98,7 @@ alt="Viewable With Any Browser" /> This document last modified on -($Id: external.shtml,v 1.4 2015/04/01 00:00:50 gilles Exp gilles $)
    +($Id: external.shtml,v 1.5 2015/10/08 01:05:25 gilles Exp gilles $)
    Top of the page

    diff --git a/S/imapservers.shtml b/S/imapservers.shtml index 8b5306b..21841d4 100755 --- a/S/imapservers.shtml +++ b/S/imapservers.shtml @@ -29,7 +29,7 @@

    Let's start with the long reported success stories list: -63 different imap server softwares supported!
    +66 different imap server softwares supported!
    [host1] means "source server" and [host2] means "destination server":

    @@ -54,7 +54,7 @@ Examples:

    And now the success imap server software list:

    - +

    Let's finish with reported failure stories over the past.
    Maybe new imapsync releases can run successfully with them.
    @@ -202,7 +202,7 @@ alt="Viewable With Any Browser" /> This document last modified on -($Id: imapservers.shtml,v 1.6 2015/06/23 10:45:34 gilles Exp gilles $)
    +($Id: imapservers.shtml,v 1.8 2015/11/04 18:21:08 gilles Exp gilles $)
    Top of the page

    diff --git a/S/imapsync_sold_by_country.txt b/S/imapsync_sold_by_country.txt new file mode 100644 index 0000000..b86f8a4 --- /dev/null +++ b/S/imapsync_sold_by_country.txt @@ -0,0 +1,82 @@ +1124 Etats-Unis_d'Amerique___ 26.05 % 26.05 % 1 +784 Allemagne_______________ 18.17 % 44.23 % 2 +409 Royaume-Uni_____________ 9.48 % 53.71 % 3 +204 Italie__________________ 4.73 % 58.44 % 4 +204 France__________________ 4.73 % 63.17 % 5 +190 Canada__________________ 4.40 % 67.57 % 6 +175 Suisse__________________ 4.06 % 71.63 % 7 +149 Pays-Bas________________ 3.45 % 75.08 % 8 +146 Australie_______________ 3.38 % 78.47 % 9 +89 Autriche________________ 2.06 % 80.53 % 10 +78 Belgique________________ 1.81 % 82.34 % 11 +75 Espagne_________________ 1.74 % 84.08 % 12 +64 Suede___________________ 1.48 % 85.56 % 13 +50 Danemark________________ 1.16 % 86.72 % 14 +48 Bresil__________________ 1.11 % 87.83 % 15 +40 Norvege_________________ 0.93 % 88.76 % 16 +31 Finlande________________ 0.72 % 89.48 % 17 +25 Republique_tcheque______ 0.58 % 90.06 % 18 +25 Pologne_________________ 0.58 % 90.64 % 19 +25 Japon___________________ 0.58 % 91.21 % 20 +25 ________________________ 0.58 % 91.79 % 21 +22 Russie__________________ 0.51 % 92.30 % 22 +21 Irlande_________________ 0.49 % 92.79 % 23 +20 Nouvelle-Zelande________ 0.46 % 93.25 % 24 +18 Hongrie_________________ 0.42 % 93.67 % 25 +15 Afrique_du_Sud__________ 0.35 % 94.02 % 26 +14 Portugal________________ 0.32 % 94.34 % 27 +14 Hong-Kong_______________ 0.32 % 94.67 % 28 +13 Malaisie________________ 0.30 % 94.97 % 29 +12 Slovaquie_______________ 0.28 % 95.25 % 30 +12 Luxembourg______________ 0.28 % 95.53 % 31 +12 Inde____________________ 0.28 % 95.80 % 32 +12 Grece___________________ 0.28 % 96.08 % 33 +12 Argentine_______________ 0.28 % 96.36 % 34 +11 Singapour_______________ 0.25 % 96.62 % 35 +11 Chine___________________ 0.25 % 96.87 % 36 +11 Chili___________________ 0.25 % 97.13 % 37 +10 Mexique_________________ 0.23 % 97.36 % 38 +10 Israel__________________ 0.23 % 97.59 % 39 +8 Slovenie________________ 0.19 % 97.77 % 40 +8 Roumanie________________ 0.19 % 97.96 % 41 +8 Emirats_Arabes_Unis_____ 0.19 % 98.15 % 42 +7 Lettonie________________ 0.16 % 98.31 % 43 +5 Thailande_______________ 0.12 % 98.42 % 44 +5 Malte___________________ 0.12 % 98.54 % 45 +5 Islande_________________ 0.12 % 98.66 % 46 +4 Indonesie_______________ 0.09 % 98.75 % 47 +4 Egypte__________________ 0.09 % 98.84 % 48 +3 Venezuela_______________ 0.07 % 98.91 % 49 +3 Turquie_________________ 0.07 % 98.98 % 50 +3 Philippines_____________ 0.07 % 99.05 % 51 +3 Estonie_________________ 0.07 % 99.12 % 52 +3 Croatie_________________ 0.07 % 99.19 % 53 +3 Bulgarie________________ 0.07 % 99.26 % 54 +2 Vietnam_________________ 0.05 % 99.30 % 55 +2 Uruguay_________________ 0.05 % 99.35 % 56 +2 Lituanie________________ 0.05 % 99.40 % 57 +2 Costa_Rica______________ 0.05 % 99.44 % 58 +2 Chypre__________________ 0.05 % 99.49 % 59 +1 Ukraine_________________ 0.02 % 99.51 % 60 +1 Trinite-et-Tobago_______ 0.02 % 99.54 % 61 +1 Tanzanie________________ 0.02 % 99.56 % 62 +1 Taiwan__________________ 0.02 % 99.58 % 63 +1 Serbie__________________ 0.02 % 99.61 % 64 +1 Senegal_________________ 0.02 % 99.63 % 65 +1 Saint_Christophe-Nevis-Anguilla__ 0.02 % 99.65 % 66 +1 Qatar___________________ 0.02 % 99.68 % 67 +1 Perou___________________ 0.02 % 99.70 % 68 +1 Panama__________________ 0.02 % 99.72 % 69 +1 Nouvelle-Caledonie______ 0.02 % 99.75 % 70 +1 Nigeria_________________ 0.02 % 99.77 % 71 +1 Namibie_________________ 0.02 % 99.79 % 72 +1 Mongolie________________ 0.02 % 99.81 % 73 +1 Moldavie________________ 0.02 % 99.84 % 74 +1 Maldives________________ 0.02 % 99.86 % 75 +1 Îles_Vierges_britanniques__ 0.02 % 99.88 % 76 +1 Koweit__________________ 0.02 % 99.91 % 77 +1 Jordanie________________ 0.02 % 99.93 % 78 +1 Colombie________________ 0.02 % 99.95 % 79 +1 Bahrein_________________ 0.02 % 99.98 % 80 +1 Antilles_neerlandaises__ 0.02 % 100.00 % 81 +TOTAL = 4314 sales over 81 countries on Thu Dec 3 03:56:13 CET 2015 diff --git a/S/news.shtml b/S/news.shtml index 339ba57..6d9fb36 100755 --- a/S/news.shtml +++ b/S/news.shtml @@ -7,18 +7,17 @@ Imapsync News - + - + - + - @@ -41,7 +40,7 @@ + + +
      +
    • 1.670 Folders mapping made easy with --automap
    • +
    • Enhancement: Added option --automap that guesses folders mapping, + for folders like "Sent", "Junk", "Drafts", "All", "Archive", "Flagged". +
        +
      • IMAP Special-Use folders described in rfc6154 + are supported and also well known names for Exchange and common clients.
      • +
      • Automap is turned off by default, + to try it a safe method is to use --automap --justautomap, it will exit early
      • +
      +
    • +
    • Enhancement: Added --f1f2 str1=str2 : Force folder str1 to be synced to str2. +
        +
      • Option --f1f2 overrides any automap mapping and any regextrans2.
      • +
      • Example --f1f2 Spam=Junk to map Spam folder to Junk.
      • +
      +
    • +
    • Enhancement: Added --justautomap to exit after seeing what will happen with --automap and --f1f2 options.
    • +
    • Enhancement: Added IMAP4 QUOTA values when they're available and a warning when it's time to find space. + See RFC 2087 IMAP4 QUOTA extension +
    • + +
    • Enhancement: Added IMAP4 ID extension. +
        +
      • ID feature is on by default if supported by the IMAP servers, + use --noid to turn it off.
      • +
      • ID Infos returned by the imap servers are shown.
      • +
      • Infos sent to the servers are name=imapsync, version=`imapsync --version`, os=$OSNAME`, + vendor='Gilles LAMIRAL' and date=`rcs date of release`.
      • +
      • For github or other distributors you can hack this part + by searching $imapsync_id_github
      • +
      +
    • + +
    • Enhancement: Added --logdir path to change the default log directory. + Default is LOG_imapsync/ +
    • + + + +
    • Usability: Added folders counting in outputs.
    • +
    • Usability: Better output in the login part
    • +
    • Usability: Guess prefixes and separators instead of forcing the user to find them.
    • +
    • Usability: Output, added Host1: or Host2 at the beginning of lines.
    • +
    • Bug fix: SSL_VERIFY_NONE in --ssl and --tls modes
    • +
    • Bug fix: Fixed xoauth2 calls. Now XOAUTH2 Works on Windows --authmech1 XOAUTH2 + with openssl installed. + See FAQ.d/FAQ.XOAUTH2.txt.
    • +
    • Bug fix: Fixed IO::Socket::SSL constants issue with latest releases
    • +
    • Bug fix: Changed "Host1: checking all wanted folders exist" not efficient algorithm in order + to allow efficiently a 2.4 million folders account. Yes, some accounts have this.
    • + +
    • Refactoring: Started to use global $sync-> in order to reduce number of parameters in routines.
    • +
    • Refactoring: Some perlcritic fixes.
    • +
    + +
      +
    • 1.644 Mac OS X standalone binary provided!
    • +
    • Enhancement: Mac OS X standalone binary called imapsync_bin_Darwin
    • + +
    • Enhancement: Added option --subfolder2 SUB Move whole host1 folders hierarchy under folder SUB.
    • +
    • Enhancement: Added --fetch_hash_set "1:*" to permit Mail2World success. +Need a patched Mail::IMAPClient 3.35 in sub fetch_hash()
    • + +
    • Usability: No folders sizes if --justfolders, unless really wanted.
    • +
    • Usability: No warning about messages when --dry --justfolders are used together.
    • + +
    • Bug fix: Added NOOP in --dry mode during fake APPEND in order to avoid timeouts
    • + + +
    @@ -113,7 +114,7 @@ Imapsync is still under the NOLIMIT license, claiming no limit to do anything with this work and this license, so one of the most open license of the universe. -It is the best decisions I've made about imapsync to continue to maintain it. +It is the best decision I've made about imapsync in order to continue to maintain it. See detailed explanation and motivation here when I looked for a business model. @@ -161,6 +162,8 @@ For 50 EUR you will get:
    • Standalone imapsync.exe for win32, easy installation done by a zip extraction anywhere. See README_Windows.txt for details.
    • +
    • Standalone imapsync_bin_Darwin for Mac OS X. +
    • Imapsync Perl source code for any operating system, Unix, Windows, Macintosh.
    • Lifetime of imapsync updates without extra payment.
    • 30-day money back guarantee! No question asked nor condition to get a refund, really.
    • @@ -170,8 +173,9 @@ For 50 EUR you will get:

      For 100 EUR you can get imapsync full professional support, -provided by the imapsync designer and developper (Gilles LAMIRAL) who has -been supporting imap migrations since 2001. +provided by the imapsync designer and developer (Gilles LAMIRAL) who has +been supporting imap migrations since 2001. +See support description below.

      @@ -206,9 +210,13 @@ You will also receive an email from gilles.lamiral@laposte.net a few minu (can fall in Spam folder sometimes).
      In order to get an accurate invoice, please make sure the delivery postal address you enter in Paypal suits your accounting department's, since revised editing is not easy and prohibited by law.
      -The gpg signed invoice will be sent within a few days by email. +The gpg signed invoice will be sent within a few days by email, +My company is identified by VAT number FR74429303332 or french SIRET number 42930333200051, +french APE/NAF number 7112B (Ingénierie Études techniques).

      +

      IBAN (back to menu) +

      If you can't pay with a credit card via Paypal then it is possible to pay via a bank transfer. It will surely add extra work editing the invoice, back and forth getting good coordinates, so I will mandatory charge both software+support for payment via bank transfer, that is 100 EUR. @@ -219,6 +227,8 @@ IBAN: FR76 1360 6000 9900 0332 2748 564
      Code BIC/Swift: AGRIFRPP836

      +

      Support (back to menu) +

      For those of you who buy support, contact me (Gilles LAMIRAL) by email or phone:

        @@ -446,7 +456,7 @@ alt="Viewable With Any Browser" /> This document last modified on -($Id: index.shtml,v 1.252 2015/05/09 18:11:18 gilles Exp gilles $)
        +($Id: index.shtml,v 1.262 2015/12/03 02:36:02 gilles Exp gilles $)
        Top of the page

        diff --git a/tests.sh b/tests.sh index 57e9bc9..303549d 100644 --- a/tests.sh +++ b/tests.sh @@ -1,14 +1,14 @@ #!/bin/sh -# $Id: tests.sh,v 1.258 2015/06/27 20:00:36 gilles Exp gilles $ +# $Id: tests.sh,v 1.269 2015/12/03 02:02:23 gilles Exp gilles $ # Example 1: -# CMD_PERL='perl -I./W/Mail-IMAPClient-3.35/lib' sh -x tests.sh +# CMD_PERL='perl -I./W/Mail-IMAPClient-3.37/lib' sh -x tests.sh # Example 2: # To select which Mail-IMAPClient within arguments: -# sh -x tests.sh 2 locallocal 3 locallocal -# This runs locallocal() with Mail-IMAPClient-2.2.9 then +# sh -x tests.sh 2 ll 3 ll +# This runs ll() with Mail-IMAPClient-2.2.9 then # again with Mail-IMAPClient-3.xx # 2 means "use Mail-IMAPClient-2.2.9" # 3 means "use Mail-IMAPClient-3.xx" @@ -22,8 +22,7 @@ echo HOST2=$HOST2 # most tests use: # few debugging tests use: -CMD_PERL_2xx='perl -I./W/Mail-IMAPClient-2.2.9' -CMD_PERL_3xx='perl -I./W/Mail-IMAPClient-3.35/lib' +CMD_PERL_3xx='perl -I./W/Mail-IMAPClient-3.37/lib' CMD_PERL=${CMD_PERL:-$CMD_PERL_3xx} @@ -84,7 +83,7 @@ no_args() { # mailboxes toto -> titi used on first_sync() -# mailboxes tata -> titi used on locallocal() +# mailboxes tata -> titi used on ll() # mailboxes tata -> titi on most ll_*() tests # mailbox tete@est.belle used on big size tests: @@ -143,6 +142,15 @@ passwords_not_masked() { $CMD_PERL ./imapsync --host1 boumboum --password1 secret --justbanner --showpasswords| grep secret } +passwords_dollar() { + $CMD_PERL ./imapsync --host1 boumboum --user1 ee --password1 '$secret' --host2 boumboum --user2 ee --password2 '$secret' --showpasswords +} + +passwords_parenthese() { + $CMD_PERL ./imapsync --host1 $HOST1 --user1 ee --password1 'secret)' --host2 $HOST2 --user2 ee --password2 '(secret' --showpasswords +} + + first_sync_dry() { $CMD_PERL ./imapsync \ --host1 $HOST1 --user1 toto \ @@ -161,7 +169,7 @@ first_sync() { } -locallocal() { +ll() { #can_send && sendtestmessage $CMD_PERL ./imapsync \ --host1 $HOST1 --user1 tata \ @@ -182,6 +190,7 @@ ll_eta() { } + ll_errors() { $CMD_PERL ./imapsync \ --host1 $HOST1 --user1 tata \ @@ -201,6 +210,17 @@ ll_debug() { --debug --nofoldersizes } +ll_debugcontent() { + $CMD_PERL ./imapsync \ + --host1 $HOST1 --user1 tata \ + --passfile1 ../../var/pass/secret.tata \ + --host2 $HOST2 --user2 titi \ + --passfile2 ../../var/pass/secret.titi \ + --debugcontent --maxage 1 --folder INBOX --dry +} + + + ll_debugmemory() { can_send && sendtestmessage $CMD_PERL ./imapsync \ @@ -346,7 +366,7 @@ ll_folder() { --folder INBOX.yop --folder INBOX.Trash } -ll_star() { +ll_backstar() { $CMD_PERL ./imapsync \ --host1 $HOST1 --user1 tata \ --passfile1 ../../var/pass/secret.tata \ @@ -355,6 +375,15 @@ ll_star() { --folder 'INBOX.backstar\*' --dry --justfolders --debugimap1 --regextrans2 's#\\|\*#_#g' } +ll_star() { + $CMD_PERL ./imapsync \ + --host1 $HOST1 --user1 tata \ + --passfile1 ../../var/pass/secret.tata \ + --host2 $HOST2 --user2 titi \ + --passfile2 ../../var/pass/secret.titi \ + --folder 'INBOX.backstar\*' --dry --justfolders --regextrans2 's,\*,_,g' +} + lks_trailing_space() { $CMD_PERL ./imapsync \ --host1 $HOST1 --user1 tata \ @@ -437,7 +466,30 @@ ll_folder_create_backslash_backslash() { --folder INBOX.yop.yap.yip --regextrans2 's/yop/newyop/' \ --sep2 '\\' \ --justfolders --nofoldersizes --dry -#--create_folder_old +} + +ll_folder_domino() { + $CMD_PERL ./imapsync \ + --host1 $HOST1 --user1 tata \ + --passfile1 ../../var/pass/secret.tata \ + --host2 $HOST2 --user2 titi \ + --passfile2 ../../var/pass/secret.titi \ + --folder INBOX.yop.yap.yip --regextrans2 's/yop/newyop/' \ + --sep2 '\' --prefix2 '' --prefix1 '' \ + --regextrans2 's,^Inbox\\(.*),$1,i' \ + --justfolders --dry --debug +} + +ll_folder_domino_sub() { + $CMD_PERL ./imapsync \ + --host1 $HOST1 --user1 tata \ + --passfile1 ../../var/pass/secret.tata \ + --host2 $HOST2 --user2 titi \ + --passfile2 ../../var/pass/secret.titi \ + --folder INBOX.yop.yap.yip --regextrans2 's/yop/newyop/' \ + --sep2 '\' --prefix2 '' \ + --subfolder2 'OLDBOX' \ + --justfolders --dry --debug } @@ -621,6 +673,49 @@ ll_buffersize() { --buffersize 8 } +ll_automap() { + $CMD_PERL ./imapsync \ + --host1 $HOST1 --user1 tata \ + --passfile1 ../../var/pass/secret.tata \ + --host2 $HOST2 --user2 titi \ + --passfile2 ../../var/pass/secret.titi \ + --justautomap --automap +} + +l_ks_automap() { + $CMD_PERL ./imapsync \ + --host1 $HOST1 --user1 tata \ + --passfile1 ../../var/pass/secret.tata \ + --host2 test2.lamiral.info --user2 test2 \ + --password2 secret2 \ + --justautomap --automap +} + +l_gmail_automap() { + + $CMD_PERL ./imapsync \ + --host1 $HOST1 --user1 tata \ + --passfile1 ../../var/pass/secret.tata \ + --host2 imap.gmail.com \ + --ssl2 \ + --user2 imapsync.gl@gmail.com \ + --passfile2 ../../var/pass/secret.imapsync.gl_gmail \ + --justautomap --automap --dry +} + +gmail_l_automap() { + + $CMD_PERL ./imapsync \ + --host1 imap.gmail.com \ + --ssl1 \ + --user1 gilles.lamiral@gmail.com \ + --passfile1 ../../var/pass/secret.gilles_gmail \ + --host2 $HOST2 --user2 titi \ + --passfile2 ../../var/pass/secret.titi \ + --justautomap --automap --dry +} + + ll_justfolders() { $CMD_PERL ./imapsync \ @@ -628,17 +723,19 @@ ll_justfolders() { --passfile1 ../../var/pass/secret.tata \ --host2 $HOST2 --user2 titi \ --passfile2 ../../var/pass/secret.titi \ - --justfolders --nofoldersizes + --justfolders echo "sudo rm -rf /home/vmail/titi/.new_folder/" } + + ll_justfolders_skipemptyfolders() { $CMD_PERL ./imapsync \ --host1 $HOST1 --user1 tata \ --passfile1 ../../var/pass/secret.tata \ --host2 $HOST2 --user2 titi \ --passfile2 ../../var/pass/secret.titi \ - --justfolders --nofoldersizes --skipemptyfolders + --justfolders --skipemptyfolders echo "sudo rm -rf /home/vmail/titi/.new_folder/" } @@ -1146,7 +1243,6 @@ ll_maxage_0_debugimap2() ll_search_ALL() { - can_send && sendtestmessage $CMD_PERL ./imapsync \ --host1 $HOST1 --user1 tata \ --passfile1 ../../var/pass/secret.tata \ @@ -1155,6 +1251,18 @@ ll_search_ALL() --search 'ALL' --folder INBOX } +ll_search_UID() +{ + $CMD_PERL ./imapsync \ + --host1 $HOST1 --user1 tata \ + --passfile1 ../../var/pass/secret.tata \ + --host2 $HOST2 --user2 titi \ + --passfile2 ../../var/pass/secret.titi \ + --search1 'NOT OR OR UID 20000 UID 20002 UID 20004' --usecache --folder INBOX + + #--search1 'OR OR UID 20000 UID 20002 UID 20004' --usecache --folder INBOX +} + ll_search_FLAGGED() { can_send && sendtestmessage @@ -1272,6 +1380,31 @@ ll_newmessage() --debugLIST } +ll_debugLIST() +{ + $CMD_PERL ./imapsync \ + --host1 $HOST1 --user1 tata \ + --passfile1 ../../var/pass/secret.tata \ + --host2 $HOST2 --user2 titi \ + --passfile2 ../../var/pass/secret.titi \ + --folder INBOX --nofoldersizes \ + --debugLIST +} + +ll_search_UID() +{ + $CMD_PERL ./imapsync \ + --host1 $HOST1 --user1 tata \ + --passfile1 ../../var/pass/secret.tata \ + --host2 $HOST2 --user2 titi \ + --passfile2 ../../var/pass/secret.titi \ + --folder INBOX --nofoldersizes \ + --debugLIST --search1 "UID 10000:20000" +} + + + + ll_exitwhenover() { can_send && sendtestmessage @@ -1549,6 +1682,17 @@ ll_exclude_blanc_middle() --exclude '^INBOX.blanc\smiddle' --justfolders --nofoldersizes --dry } +ll_f1f2_01() +{ + $CMD_PERL ./imapsync \ + --host1 $HOST1 --user1 tata \ + --passfile1 ../../var/pass/secret.tata \ + --host2 $HOST2 --user2 titi \ + --passfile2 ../../var/pass/secret.titi \ + --justfolders \ + --folder 'INBOX.yop.yap' --f1f2 'INBOX.yop.yap=INBOX/rha/lovely' --debugfolders + +} ll_regextrans2() { @@ -1558,7 +1702,6 @@ ll_regextrans2() --host2 $HOST2 --user2 titi \ --passfile2 ../../var/pass/secret.titi \ --justfolders \ - --nofoldersizes \ --regextrans2 's/yop/yoX/' \ --folder 'INBOX.yop.yap' --debug } @@ -2327,6 +2470,16 @@ ll_authmech_XOAUTH_gmail() { --authmech1 XOAUTH --authmech2 XOAUTH } +ll_authmech_XOAUTH2_gmail() { + ! ping -c1 imap.gmail.com || $CMD_PERL ./imapsync \ + --host1 imap.gmail.com --ssl1 --user1 gilles.lamiral@gmail.com \ + --passfile1 ../../var/pass/secret.xoauth2 \ + --host2 imap.gmail.com --ssl2 --user2 gilles.lamiral@gmail.com \ + --passfile2 ../../var/pass/secret.xoauth2 \ + --justfoldersizes --nofoldersizes \ + --authmech1 XOAUTH2 --authmech2 XOAUTH2 --debug +} + ll_authmech_NTLM() { @@ -2743,7 +2896,7 @@ xxxxx_gmail_useuid() { --folder 'INBOX.Sent' --useuid --dry } -xxxxx_gmail_2() { +xxxxx_gmail_02() { ! ping -c1 imap.gmail.com || $CMD_PERL ./imapsync \ --host1 $HOST2 \ @@ -2757,7 +2910,7 @@ xxxxx_gmail_2() { --regextrans2 's,(.*),SMS,' } -xxxxx_gmail_3() { +xxxxx_gmail_03() { ! ping -c1 imap.gmail.com || $CMD_PERL ./imapsync \ --host1 $HOST2 \ @@ -2771,7 +2924,7 @@ xxxxx_gmail_3() { --folder INBOX.few_emails --debug --useheader Message-ID --delete2 --dry } -xxxxx_gmail_3_Received() { +xxxxx_gmail_03_Received() { ! ping -c1 imap.gmail.com || $CMD_PERL ./imapsync \ --host1 $HOST2 \ @@ -2786,7 +2939,7 @@ xxxxx_gmail_3_Received() { } -xxxxx_gmail_4_Sent() { +xxxxx_gmail_04_Sent() { ! ping -c1 imap.gmail.com || $CMD_PERL ./imapsync \ --host1 $HOST2 \ @@ -2801,7 +2954,7 @@ xxxxx_gmail_4_Sent() { --debugflags } -xxxxx_gmail_5_justfolders() { +xxxxx_gmail_05_justfolders() { ! ping -c1 imap.gmail.com || $CMD_PERL ./imapsync \ --host1 $HOST2 \ @@ -2817,7 +2970,7 @@ xxxxx_gmail_5_justfolders() { } -xxxxx_gmail_5_justlogin() { +xxxxx_gmail_05_justlogin() { ! ping -c1 imap.gmail.com || $CMD_PERL ./imapsync \ --host1 $HOST2 \ @@ -2830,7 +2983,7 @@ xxxxx_gmail_5_justlogin() { --justlogin } -xxxxx_gmail_5_justlogin_exe() { +xxxxx_gmail_05_justlogin_exe() { ! ping -c1 imap.gmail.com || ./imapsync_elf_x86.bin \ --host1 $HOST2 \ @@ -2843,7 +2996,7 @@ xxxxx_gmail_5_justlogin_exe() { --justlogin } -xxxxx_gmail_5_justlogin_SSLv3() { +xxxxx_gmail_05_justlogin_SSLv3() { ! ping -c1 imap.gmail.com || $CMD_PERL ./imapsync \ --host1 $HOST2 \ @@ -2856,7 +3009,7 @@ xxxxx_gmail_5_justlogin_SSLv3() { --justlogin --ssl2_SSL_version SSLv3 --justconnect } -xxxxx_gmail_5_justlogin_SSLv2() { +xxxxx_gmail_05_justlogin_SSLv2() { ! ping -c1 imap.gmail.com || ! $CMD_PERL ./imapsync \ --host1 $HOST2 \ @@ -2869,7 +3022,7 @@ xxxxx_gmail_5_justlogin_SSLv2() { --justlogin --ssl2_SSL_version SSLv2 } -xxxxx_gmail_5_justlogin_SSLv23() { +xxxxx_gmail_05_justlogin_SSLv23() { ! ping -c1 imap.gmail.com || $CMD_PERL ./imapsync \ --host1 $HOST2 \ @@ -2885,7 +3038,7 @@ xxxxx_gmail_5_justlogin_SSLv23() { -xxxxx_gmail_6() { +xxxxx_gmail_06() { ! ping -c1 imap.gmail.com || $CMD_PERL ./imapsync \ --host1 $HOST2 \ @@ -2903,7 +3056,7 @@ xxxxx_gmail_6() { #--dry --prefix2 '[Gmail]/' } -xxxxx_gmail_7() { +xxxxx_gmail_07_hierarchy() { ! ping -c1 imap.gmail.com || $CMD_PERL ./imapsync \ --host1 $HOST2 \ @@ -2914,11 +3067,28 @@ xxxxx_gmail_7() { --user2 gilles.lamiral@gmail.com \ --passfile2 ../../var/pass/secret.gilles_gmail \ --nofoldersizes \ - --folder INBOX.yop.yap + --folder INBOX.yop.yup.yip.yap.yep --justfolders } -xxxxx_gmail_8_xlist() { +xxxxx_gmail_07_subfolder() { + + ! ping -c1 imap.gmail.com || $CMD_PERL ./imapsync \ + --host1 $HOST2 \ + --user1 tata \ + --passfile1 ../../var/pass/secret.tata \ + --host2 imap.gmail.com \ + --ssl2 \ + --user2 gilles.lamiral@gmail.com \ + --passfile2 ../../var/pass/secret.gilles_gmail \ + --nofoldersizes \ + --justfolders --subfolder2 BBB +} + + + + +xxxxx_gmail_08_xlist() { ! ping -c1 imap.gmail.com || $CMD_PERL ./imapsync \ --host1 $HOST2 \ @@ -2933,7 +3103,7 @@ xxxxx_gmail_8_xlist() { } -xxxxx_gmail_9_via_stunnel() { +xxxxx_gmail_09_via_stunnel() { ! ping -c1 imap.gmail.com || $CMD_PERL ./imapsync \ --host1 $HOST2 \ @@ -2949,7 +3119,6 @@ xxxxx_gmail_9_via_stunnel() { - gmail_xxxxx() { ! ping -c1 imap.gmail.com || $CMD_PERL ./imapsync \ @@ -2961,7 +3130,7 @@ gmail_xxxxx() { --user2 tata \ --passfile2 ../../var/pass/secret.tata \ --nofoldersizes \ - --dry --justfolders --exclude Gmail --exclude "blanc\ $" + --dry --justfolders --exclude "\[Gmail\]/All Mail" } @@ -3005,6 +3174,21 @@ gmail_justfolders() { --justfolders --exclude Gmail --exclude "blanc\ $" } +gmail_justfolders_remove_Gmail() { + + ! ping -c1 imap.gmail.com || $CMD_PERL ./imapsync \ + --host1 imap.gmail.com \ + --ssl1 \ + --user1 gilles.lamiral@gmail.com \ + --passfile1 ../../var/pass/secret.gilles_gmail \ + --host2 $HOST2 \ + --user2 tata \ + --passfile2 ../../var/pass/secret.tata \ + --regextrans2 "s,\[Gmail\].,," --dry --justfolders +} + + + gmail_via_stunnel_ks() { @@ -3033,9 +3217,50 @@ gmail_gmail() { --user2 imapsync.gl@gmail.com \ --passfile2 ../../var/pass/secret.imapsync.gl_gmail \ --justfolders --exclude Gmail --exclude "blanc\ $" - } +gmail_gmail_ipv6() { + + ! ping6 -c1 imap.gmail.com || $CMD_PERL ./imapsync \ + --host1 2a00:1450:400c:c0a::6c \ + --ssl1 \ + --user1 gilles.lamiral@gmail.com \ + --passfile1 ../../var/pass/secret.gilles_gmail \ + --host2 wl-in-x6c.1e100.net. \ + --ssl2 \ + --user2 imapsync.gl@gmail.com \ + --passfile2 ../../var/pass/secret.imapsync.gl_gmail \ + --justlogin +} + +gmail_gmail_automap() { + $CMD_PERL ./imapsync \ + --host1 imap.gmail.com \ + --ssl1 \ + --user1 gilles.lamiral@gmail.com \ + --passfile1 ../../var/pass/secret.gilles_gmail \ + --host2 imap.gmail.com \ + --ssl2 \ + --user2 imapsync.gl@gmail.com \ + --passfile2 ../../var/pass/secret.imapsync.gl_gmail \ + --justfolders --dry --automap --justautomap --f1f2 Junk=Junk --f1f2 Trash=Cake +} + +gmail_gmail_noautomap() { + + $CMD_PERL ./imapsync \ + --host1 imap.gmail.com \ + --ssl1 \ + --user1 gilles.lamiral@gmail.com \ + --passfile1 ../../var/pass/secret.gilles_gmail \ + --host2 imap.gmail.com \ + --ssl2 \ + --user2 imapsync.gl@gmail.com \ + --passfile2 ../../var/pass/secret.imapsync.gl_gmail \ + --justfolders --dry --noautomap +} + + gmail_gmail_justconnect() { ! ping -c1 imap.gmail.com || $CMD_PERL ./imapsync \ @@ -3047,10 +3272,26 @@ gmail_gmail_justconnect() { --ssl2 \ --user2 imapsync.gl@gmail.com \ --passfile2 ../../var/pass/secret.imapsync.gl_gmail \ - --justconnect - + --justconnect } +gmail_gmail_justlogin() { + + ! ping -c1 imap.gmail.com || $CMD_PERL ./imapsync \ + --host1 imap.gmail.com \ + --ssl1 \ + --user1 gilles.lamiral@gmail.com \ + --passfile1 ../../var/pass/secret.gilles_gmail \ + --host2 imap.gmail.com \ + --ssl2 \ + --user2 imapsync.gl@gmail.com \ + --passfile2 ../../var/pass/secret.imapsync.gl_gmail \ + --justlogin --id +} + + + + gmail_gl_gl2() { ! ping -c1 imap.gmail.com || $CMD_PERL ./imapsync \ @@ -3189,6 +3430,20 @@ yahoo_xxxx_login() { --justlogin } +yahoo_xxxx_login_tls() { + ! ping -c1 imap.mail.yahoo.com || $CMD_PERL ./imapsync \ + --host1 imap.mail.yahoo.com \ + --tls1 \ + --user1 glamiral \ + --passfile1 ../../var/pass/secret.gilles_yahoo \ + --host2 $HOST2 \ + --user2 titi \ + --passfile2 ../../var/pass/secret.titi \ + --justlogin +} + + + yahoo_xxxx() { # Yahoo works only with ssl (november 2011) # Could do plain port 143 before @@ -3504,7 +3759,7 @@ l_office365() l_office365_justlogin() { $CMD_PERL ./imapsync \ - --host1 imap-mail.outlook.com --ssl1 --user1 gilles.lamiral@outlook.com \ + --host1 imap-mail.outlook.com --ssl1 --user1 gilles.lamiral@outlook.com \ --passfile1 ../../var/pass/secret.outlook.com \ --host2 imap.outlook.com --ssl2 --user2 gilles.lamiral@outlook.com \ --passfile2 ../../var/pass/secret.outlook.com \ @@ -3514,13 +3769,23 @@ l_office365_justlogin() l_office365_justlogin_2() { $CMD_PERL ./imapsync \ - --host1 imap-mail.outlook.com --port1 993 --ssl1 --user1 gilles.lamiral@outlook.com \ + --host1 imap-mail.outlook.com --ssl1 --user1 gilles.lamiral@outlook.com \ --passfile1 ../../var/pass/secret.outlook.com \ --host2 outlook.office365.com --tls2 --user2 gilles.lamiral@outlook.com \ --passfile2 ../../var/pass/secret.outlook.com \ --justlogin } +l_office365_justlogin_tls() +{ + $CMD_PERL ./imapsync \ + --host1 imap-mail.outlook.com --ssl1 --user1 gilles.lamiral@outlook.com \ + --passfile1 ../../var/pass/secret.outlook.com \ + --host2 imap.outlook.com --tls2 --user2 gilles.lamiral@outlook.com \ + --passfile2 ../../var/pass/secret.outlook.com \ + --justlogin +} + l_office365_bigfolders() @@ -4251,7 +4516,7 @@ passwords_masked passwords_not_masked first_sync_dry first_sync -locallocal +ll pidfile ll_pidfilelocking justbanner