From f26b2573c37fe877ad121018aa62798f9d073bbc Mon Sep 17 00:00:00 2001
From: Nick Bebout
Date: Wed, 4 Aug 2021 14:14:36 -0500
Subject: [PATCH] 2.140
---
ChangeLog | 323 +-
FAQ.d/FAQ.APPEND_errors.txt | 52 +-
FAQ.d/FAQ.Archiving.txt | 6 +-
FAQ.d/FAQ.Bandwidth.txt | 40 +-
FAQ.d/FAQ.Docker.txt | 22 +-
FAQ.d/FAQ.Duplicates.txt | 17 +-
FAQ.d/FAQ.Exchange.txt | 39 +-
FAQ.d/FAQ.Folders_Sizes.txt | 7 +-
FAQ.d/FAQ.Gmail.txt | 11 +-
FAQ.d/FAQ.GoDaddy.txt | 23 +
FAQ.d/FAQ.Messages_Selection.txt | 5 +-
FAQ.d/FAQ.Messages_Too_Big.txt | 70 +-
FAQ.d/FAQ.Office365.txt | 64 +-
FAQ.d/FAQ.OnlineUI.txt | 85 +-
FAQ.d/FAQ.Oracle-UCS.txt | 23 -
FAQ.d/FAQ.Release_Checklist.txt | 8 +-
FAQ.d/FAQ.SSL_errors.txt | 6 +-
FAQ.d/FAQ.Security.txt | 22 +-
FAQ.d/FAQ.Two_Ways_Sync.txt | 25 +-
FAQ.d/FAQ.UCS.txt | 37 +
FAQ.d/FAQ.Yahoo.txt | 57 +-
FAQ.d/htaccess.txt | 18 +-
INSTALL.d/Dockerfile | 107 +-
INSTALL.d/INSTALL.ANY.txt | 23 +-
INSTALL.d/INSTALL.AWS_EC2.txt | 49 +-
INSTALL.d/INSTALL.Centos.txt | 58 +-
INSTALL.d/INSTALL.Darwin.txt | 150 +-
INSTALL.d/INSTALL.Debian.txt | 54 +-
INSTALL.d/INSTALL.OnlineUI.txt | 404 +-
INSTALL.d/memo_docker | 67 +-
INSTALL.d/secret.txt | 2 +
Makefile | 234 +-
README | 237 +-
README.md | 789 -
README_Windows.txt | 161 +-
S/conversion_data.js | 13 +
S/donate.shtml | 21 +-
S/external.shtml | 82 +-
S/fonts/LM-bold-italic.ttf | Bin 0 -> 191324 bytes
S/fonts/LM-bold-italic.woff | Bin 0 -> 66172 bytes
S/fonts/LM-bold-italic.woff2 | Bin 0 -> 39392 bytes
S/fonts/LM-bold.ttf | Bin 0 -> 144572 bytes
S/fonts/LM-bold.woff | Bin 0 -> 52888 bytes
S/fonts/LM-bold.woff2 | Bin 0 -> 33548 bytes
S/fonts/LM-italic.ttf | Bin 0 -> 191540 bytes
S/fonts/LM-italic.woff | Bin 0 -> 66180 bytes
S/fonts/LM-italic.woff2 | Bin 0 -> 39148 bytes
S/fonts/LM-regular.ttf | Bin 0 -> 150124 bytes
S/fonts/LM-regular.woff | Bin 0 -> 53760 bytes
S/fonts/LM-regular.woff2 | Bin 0 -> 33664 bytes
S/images/logo_imapsync.svg | 53 +
S/images/logo_imapsync_layers_ind.svg | 48 +
S/images/logo_imapsync_layers_merged.svg | 53 +
S/images/logo_imapsync_layers_single.svg | 60 +
S/imapservers.shtml | 22 +-
S/imapsync_sold_by_country.txt | 199 +-
S/news.shtml | 181 +-
S/paypal_return.shtml | 77 +-
S/style.css | 80 +-
S/terms_and_conditions.shtml | 6 +-
TODO | 217 +-
VERSION | 2 +-
W/.BUILD_EXE_TIME | 759 -
W/.checklinkext | 0
W/.compok | 137 -
W/.tests.errors.txt | 4935 -----
W/.valid.index.shtml | 0
W/CONCEPTION.txt | 26 -
W/LOG_bat/learn_func.bat.txt | 1 -
W/LOG_bat/test_exe_tests.bat.txt | 1 -
W/Mail-IMAPClient-3.42/Changes | 2356 ---
W/Mail-IMAPClient-3.42/MANIFEST | 42 -
W/Mail-IMAPClient-3.42/META.json | 57 -
W/Mail-IMAPClient-3.42/META.yml | 37 -
W/Mail-IMAPClient-3.42/Makefile.PL | 138 -
W/Mail-IMAPClient-3.42/README | 96 -
W/Mail-IMAPClient-3.42/examples/build_dist.pl | 172 -
W/Mail-IMAPClient-3.42/examples/build_ldif.pl | 235 -
W/Mail-IMAPClient-3.42/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.42/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 | 246 -
.../examples/sharedFolder.pl | 88 -
W/Mail-IMAPClient-3.42/lib/Mail/IMAPClient.pm | 3580 ----
.../lib/Mail/IMAPClient.pod | 4033 ----
.../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.42/prepare_dist | 43 -
W/Mail-IMAPClient-3.42/t/basic.t | 508 -
W/Mail-IMAPClient-3.42/t/body_string.t | 76 -
W/Mail-IMAPClient-3.42/t/bodystructure.t | 172 -
W/Mail-IMAPClient-3.42/t/fetch_hash.t | 342 -
W/Mail-IMAPClient-3.42/t/lib/MyTest.pm | 35 -
W/Mail-IMAPClient-3.42/t/messageset.t | 37 -
W/Mail-IMAPClient-3.42/t/pod.t | 10 -
W/Mail-IMAPClient-3.42/t/quota.t | 45 -
W/Mail-IMAPClient-3.42/t/simple.t | 36 -
W/Mail-IMAPClient-3.42/t/thread.t | 30 -
W/Mail-IMAPClient-3.42/test_template.txt | 5 -
W/OSI_request.txt | 29 -
W/TESTING.txt | 23 -
W/TIME.txt | 108 -
W/bugs/BUG_IMAPClient_3.xx | 23 -
W/bugs/Makefile | 20 -
W/bugs/bug_ssl_win32_1 | 30 -
W/bugs/bug_ssl_win32_2 | 44 -
W/bugs/bug_ssl_win32_3_http | 33 -
W/bugs/build_test_ssl.bat | 12 -
W/bugs/test_ssl.bat | 13 -
W/build_exe.bat | 206 -
W/build_mac.sh | 42 -
W/check_win64err | 17 -
W/check_winerr | 17 -
W/checklink.txt | 0
W/checklinkext.txt | 52 -
W/docker_pull_count | 10 -
W/docker_pull_count.txt | 33 -
W/freshmeat/freshmeat | 10 -
W/freshmeat/freshmeat_submition.inp | 15 -
W/freshmeat/freshmeat_submition.json | 9 -
W/freshmeat/freshmeat_submition.out | 12 -
W/gts/gts_graphs | 72 -
W/gts/imapsync_github_stats | 20 -
W/gts/merge-csv | 37 -
W/imapsync.1 | 949 -
W/imapsync_functions_tree.txt | 6871 -------
W/imapsync_functions_tree_ppi.txt | 5956 ------
W/install_module_one.bat | 33 -
W/install_module_ssl.bat | 29 -
W/install_modules.bat | 116 -
W/ks.htaccess | 11 -
W/learn/+ZyhnUA- | 0
W/learn/10990.txt | 1 -
W/learn/10_99.txt | 450 -
W/learn/Calltree.pm | 111 -
W/learn/adjust_time.pl | 48 -
W/learn/append | 53 -
W/learn/automap_languages | 11 -
W/learn/bibmail_1GB | 7 -
W/learn/bug_Mail-IMAPClient-3.40_connect | 10 -
W/learn/bug_io_prompt_local_ARGV | 38 -
W/learn/bug_io_prompter_local_ARGV | 44 -
W/learn/copy | 41 -
W/learn/create_folder | 29 -
W/learn/crunch_memory | 34 -
W/learn/data_utf7 | 30 -
W/learn/date_manip | 28 -
W/learn/dbfile | 36 -
W/learn/dbmdeep | 39 -
W/learn/delete | 30 -
W/learn/delete_all_folders | 36 -
W/learn/delete_folder | 36 -
W/learn/digest | 14 -
W/learn/dns_srv_imap | 205 -
W/learn/dns_srv_imap.tdy | 249 -
W/learn/fetch_with_size | 54 -
W/learn/file_append | 67 -
W/learn/file_spec | 14 -
W/learn/file_string | 27 -
W/learn/function_calls | 36 -
W/learn/function_calls_ppi | 43 -
W/learn/getoptlong | 14 -
W/learn/hashes_set | 37 -
W/learn/here_comment | 24 -
W/learn/hugemigr | 6 -
W/learn/imap_Encode_IMAPUTF7_decode | 27 -
W/learn/imap_Encode_IMAPUTF7_encode | 30 -
W/learn/imap_gbk_Q_decode | 5 -
W/learn/imap_rename_regex | 46 -
W/learn/imap_rename_regex_examples.txt | 7 -
W/learn/imap_tcpdump | 3 -
W/learn/imap_utf7 | 14 -
W/learn/imap_utf7_decode | 27 -
W/learn/imap_utf7_encode | 23 -
W/learn/imap_utf7_tests | 9 -
W/learn/imap_utf7_tests_Encode_IMAPUTF7 | 24 -
W/learn/imapbyhand | 31 -
W/learn/imapclient3xx_isUnconnected | 7 -
W/learn/imapclient3xx_ssl | 30 -
W/learn/imapclient_quota_qq | 31 -
W/learn/imapclient_quota_qq_memo | 4 -
W/learn/imapclient_skeleton | 27 -
W/learn/imapclient_tls | 81 -
W/learn/imapsync.sublist | 3807 ----
W/learn/increaseline | 9 -
W/learn/io_socket_get | 115 -
W/learn/ipc_open2 | 21 -
W/learn/log.txt | 8 -
W/learn/longline | 10 -
W/learn/longline_10000_11000 | 18 -
W/learn/longline_10230_10240 | 18 -
W/learn/mail2world | 43 -
W/learn/memo | 22 -
W/learn/memory_consumption | 57 -
W/learn/message_string_raw | 110 -
W/learn/message_string_raw_pb | 209 -
W/learn/oauth2 | 81 -
...perlcritic_ProhibitInterpolationOfLiterals | 16 -
...rlcritic_ProhibitInterpolationOfLiterals_2 | 16 -
W/learn/pipemess | 17 -
W/learn/print | 27 -
W/learn/proximapsync | 1356 --
W/learn/quotes | 24 -
W/learn/re_backslashb | 15 -
W/learn/ref | 12 -
W/learn/resolvme | 53 -
W/learn/rpm/imapsync.spec | 133 -
W/learn/separator | 27 -
W/learn/splice_fetch | 12 -
W/learn/subscribe | 24 -
W/learn/tee_log | 25 -
W/learn/tee_log.bat | 15 -
W/learn/tmp/+ZyhnUA- | 0
W/learn/tmp/收件箱 | 0
W/learn/uppercase_header | 19 -
W/learn/utf7_to_utf7imap | 21 -
W/learn/xoauth2_gmail | 32 -
W/learn_func.bat | 39 -
W/lfo.htaccess | 3 -
W/livredor.txt | 6 -
W/lsm.imapsync | 17 -
W/memo | 724 -
W/ml_announce.in.txt | 49 -
W/patches/FAQ_ralph.patch | 529 -
W/patches/create_folder_erik.torgesta.com | 38 -
W/patches/imapsync--justcopy.patch | 535 -
...mapsync-1.139-ssl-authmech-authusing.patch | 224 -
W/patches/imapsync-1.156-ssl-authusing.patch | 593 -
W/patches/imapsync-1.217_tls_support.patch | 191 -
...nc-1.278.log_info_on_lost_connection.patch | 349 -
W/patches/imapsync-1.337_tobit_V6.patch | 45 -
W/patches/imapsync-1.94-foldersizes.diff | 77 -
W/patches/imapsync-acls-users | 57 -
W/patches/imapsync-base64.patch | 12 -
W/patches/imapsync-buffersize.diff | 35 -
W/patches/imapsync-pb-acl.diff | 58 -
W/patches/imapsync-readkey | 1175 --
W/patches/imapsync-ssl.diff | 131 -
W/patches/imapsync-ssl2.diff | 108 -
W/patches/imapsync-undef_arrayref.diff | 62 -
W/patches/imapsync-xgwtrustedapp | 6033 ------
W/patches/imapsync-yahoo | 2430 ---
W/patches/imapsync.1.282.patch | 462 -
W/patches/imapsync.1.282.patch2 | 108 -
W/patches/imapsync.1.284.patch | 98 -
.../imapsync.WilliamHernandez.INBOX.INBOX | 882 -
W/patches/imapsync.dave | 5543 -----
W/patches/imapsync.diff | 146 -
W/patches/imapsync.patch_rick_romero | 633 -
W/patches/imapsync.syncuid.diff | 97 -
W/patches/imapsync_1.267_jari | 2790 ---
W/patches/imapsync_1.592.groupwise_auth.diff | 145 -
W/patches/imapsync_1.592.kerio.diff | 68 -
W/patches/imapsync_Cvitkovich_pidfile_tmpfile | 2071 --
W/patches/imapsync_bhaveshah@gmail.com | 5926 ------
W/patches/imapsync_minsize | 4079 ----
W/patches/proxyauth-v2_1.366.patch | 168 -
W/patches/proxyauth_1.366.patch | 111 -
W/pdq/pdq_i005 | 72 -
W/perlcritic_1.txt | 1074 -
W/perlcritic_2.txt | 639 -
W/perlcritic_3.txt | 123 -
W/perlcritic_4.txt | 28 -
W/prereq.Ubuntu_16.04_xenial.txt | 66 -
W/prereq.scandeps.Ubuntu_16.04_xenial.txt | 776 -
W/rsync_exclude_dist.txt | 16 -
W/t/01_connect | 15 -
W/t/01_connect.229.dump | 16 -
W/t/02_append_string | 35 -
W/t/03_message_to_file | 53 -
W/t/04_parse_headers | 21 -
W/t/05_parse_headers_ssl | 26 -
W/t/06_parse_headers_ssl_titi | 26 -
W/t/07_ll_regexmess_add_header.txt | 38 -
W/t/08_ll_regexmess_add_header_path.txt | 38 -
W/t/loadavg.out | 1 -
W/test.bat | 47 -
W/test2.bat | 23 -
W/test3.bat | 15 -
W/test3_boxon.bat | 96 -
W/test3_gmail.bat | 22 -
W/test3_longdir.bat | 20 -
W/test4.bat | 31 -
W/test5.bat | 6 -
W/test6.bat | 9 -
W/test_abort.bat | 18 -
W/test_cook_exe.bat | 16 -
W/test_cook_src.bat | 15 -
W/test_exe.bat | 87 -
W/test_exe_2.bat | 41 -
W/test_exe_tests.bat | 38 -
W/test_exe_testsdebug.bat | 38 -
W/test_ipv6.bat | 12 -
W/test_reg.bat | 22 -
W/test_tail.bat | 18 -
W/test_tests.bat | 39 -
W/test_testsdebug.bat | 37 -
W/test_xoauth2.bat | 22 -
W/tools/IMAPSyncInputs.bat | 183 -
W/tools/addFromIfMissing | 29 -
W/tools/addFromIfMissing2 | 9 -
W/tools/analyse-ssl.txt | 874 -
W/tools/backup_old_dist | 36 -
W/tools/cgi_memo | 1 -
W/tools/fix_email_for_exchange.py | 275 -
W/tools/gen_README_dist | 27 -
W/tools/html5check.py | 187 -
W/tools/minage_maxage | 113 -
W/tools/postman_imapsync.py | 66 -
W/tools/validate | 746 -
W/tools/validate_files_in_dir.pl | 43 -
W/tools/validate_html4 | 47 -
W/tools/validate_xml_html5 | 46 -
W/tools/watchdog.pl | 74 -
W/tools/wonko_ruby_imapsync | 116 -
W/uninstall_module_one.bat | 27 -
X/cgi_memo | 423 +-
X/crypto-js/core.js | 777 +
X/crypto-js/sha256.js | 179 +
X/domains_servers_map | 15 +
X/imapsync_csv_wrapper | 699 +
X/imapsync_current.txt | 1 +
X/imapsync_form.css | 7 +-
X/imapsync_form.js | 154 +-
X/imapsync_form_1.3.js | 159 -
X/imapsync_form_1.4.js | 228 -
X/imapsync_form_extra.html | 199 +-
X/imapsync_form_extra_free.html | 547 +
...m_1.69.html => imapsync_form_wrapper.html} | 56 +-
X/imapsync_form_wrapper.js | 704 +
X/imapsync_shell_wrapper | 55 +
X/index.html | 2 +-
X/jquery-3.3.1.js | 10364 ----------
X/jquery-3.3.1.min.js | 2 -
X/sandbox_csv.html | 166 +
X/server_survey_patterns.txt | 2 +-
X/stat_patterns.txt | 12 +-
X/u.html | 1 +
dist | 1 -
doc/conferences/imapsync_2010_gulliver_AG.lyx | 749 +
.../imapsync_2015_Saint-Brieuc.lyx | 363 +
.../imapsync_2020_gulliver_fdln.lyx | 611 +
.../imapsync_2020_gulliver_fdln.pdf | Bin 0 -> 220110 bytes
examples/file.txt | 23 +-
examples/imapsync_example.bat | 53 +-
examples/sync_loop_unix.sh | 15 +-
examples/sync_parallel_curl.sh | 118 +
examples/sync_parallel_unix.sh | 89 +-
i3 | 4 +-
imapsync | 4816 +++--
imapsync-1.945 | 15978 ---------------
index.shtml | 465 +-
oauth2/README_OAUTH2.txt | 79 +
oauth2/generate_gmail_token | 189 +
oauth2/oauth2_google.py | 347 +
oauth2/oauth2_imap_from_token | 35 +
tests.sh | 1735 +-
370 files changed, 14441 insertions(+), 136699 deletions(-)
create mode 100644 FAQ.d/FAQ.GoDaddy.txt
delete mode 100644 FAQ.d/FAQ.Oracle-UCS.txt
create mode 100644 FAQ.d/FAQ.UCS.txt
mode change 100644 => 100755 INSTALL.d/Dockerfile
create mode 100644 INSTALL.d/secret.txt
delete mode 100644 README.md
create mode 100755 S/conversion_data.js
create mode 100644 S/fonts/LM-bold-italic.ttf
create mode 100644 S/fonts/LM-bold-italic.woff
create mode 100644 S/fonts/LM-bold-italic.woff2
create mode 100644 S/fonts/LM-bold.ttf
create mode 100644 S/fonts/LM-bold.woff
create mode 100644 S/fonts/LM-bold.woff2
create mode 100644 S/fonts/LM-italic.ttf
create mode 100644 S/fonts/LM-italic.woff
create mode 100644 S/fonts/LM-italic.woff2
create mode 100644 S/fonts/LM-regular.ttf
create mode 100644 S/fonts/LM-regular.woff
create mode 100644 S/fonts/LM-regular.woff2
create mode 100755 S/images/logo_imapsync.svg
create mode 100755 S/images/logo_imapsync_layers_ind.svg
create mode 100755 S/images/logo_imapsync_layers_merged.svg
create mode 100755 S/images/logo_imapsync_layers_single.svg
delete mode 100644 W/.BUILD_EXE_TIME
delete mode 100644 W/.checklinkext
delete mode 100644 W/.compok
delete mode 100644 W/.tests.errors.txt
delete mode 100644 W/.valid.index.shtml
delete mode 100644 W/CONCEPTION.txt
delete mode 100644 W/LOG_bat/learn_func.bat.txt
delete mode 100644 W/LOG_bat/test_exe_tests.bat.txt
delete mode 100644 W/Mail-IMAPClient-3.42/Changes
delete mode 100644 W/Mail-IMAPClient-3.42/MANIFEST
delete mode 100644 W/Mail-IMAPClient-3.42/META.json
delete mode 100644 W/Mail-IMAPClient-3.42/META.yml
delete mode 100644 W/Mail-IMAPClient-3.42/Makefile.PL
delete mode 100644 W/Mail-IMAPClient-3.42/README
delete mode 100755 W/Mail-IMAPClient-3.42/examples/build_dist.pl
delete mode 100755 W/Mail-IMAPClient-3.42/examples/build_ldif.pl
delete mode 100755 W/Mail-IMAPClient-3.42/examples/cleanTest.pl
delete mode 100755 W/Mail-IMAPClient-3.42/examples/copy_folder.pl
delete mode 100755 W/Mail-IMAPClient-3.42/examples/cyrus_expire.pl
delete mode 100755 W/Mail-IMAPClient-3.42/examples/cyrus_expunge.pl
delete mode 100755 W/Mail-IMAPClient-3.42/examples/find_dup_msgs.pl
delete mode 100755 W/Mail-IMAPClient-3.42/examples/idle.pl
delete mode 100755 W/Mail-IMAPClient-3.42/examples/imap_to_mbox.pl
delete mode 100755 W/Mail-IMAPClient-3.42/examples/imtestExample.pl
delete mode 100755 W/Mail-IMAPClient-3.42/examples/migrate_mail2.pl
delete mode 100755 W/Mail-IMAPClient-3.42/examples/migrate_mbox.pl
delete mode 100755 W/Mail-IMAPClient-3.42/examples/populate_mailbox.pl
delete mode 100755 W/Mail-IMAPClient-3.42/examples/sharedFolder.pl
delete mode 100644 W/Mail-IMAPClient-3.42/lib/Mail/IMAPClient.pm
delete mode 100644 W/Mail-IMAPClient-3.42/lib/Mail/IMAPClient.pod
delete mode 100644 W/Mail-IMAPClient-3.42/lib/Mail/IMAPClient/BodyStructure.pm
delete mode 100644 W/Mail-IMAPClient-3.42/lib/Mail/IMAPClient/BodyStructure/Parse.grammar
delete mode 100644 W/Mail-IMAPClient-3.42/lib/Mail/IMAPClient/BodyStructure/Parse.pm
delete mode 100644 W/Mail-IMAPClient-3.42/lib/Mail/IMAPClient/BodyStructure/Parse.pod
delete mode 100644 W/Mail-IMAPClient-3.42/lib/Mail/IMAPClient/MessageSet.pm
delete mode 100644 W/Mail-IMAPClient-3.42/lib/Mail/IMAPClient/Thread.grammar
delete mode 100644 W/Mail-IMAPClient-3.42/lib/Mail/IMAPClient/Thread.pm
delete mode 100644 W/Mail-IMAPClient-3.42/lib/Mail/IMAPClient/Thread.pod
delete mode 100755 W/Mail-IMAPClient-3.42/prepare_dist
delete mode 100644 W/Mail-IMAPClient-3.42/t/basic.t
delete mode 100644 W/Mail-IMAPClient-3.42/t/body_string.t
delete mode 100644 W/Mail-IMAPClient-3.42/t/bodystructure.t
delete mode 100644 W/Mail-IMAPClient-3.42/t/fetch_hash.t
delete mode 100644 W/Mail-IMAPClient-3.42/t/lib/MyTest.pm
delete mode 100644 W/Mail-IMAPClient-3.42/t/messageset.t
delete mode 100644 W/Mail-IMAPClient-3.42/t/pod.t
delete mode 100644 W/Mail-IMAPClient-3.42/t/quota.t
delete mode 100644 W/Mail-IMAPClient-3.42/t/simple.t
delete mode 100644 W/Mail-IMAPClient-3.42/t/thread.t
delete mode 100644 W/Mail-IMAPClient-3.42/test_template.txt
delete mode 100644 W/OSI_request.txt
delete mode 100644 W/TESTING.txt
delete mode 100644 W/TIME.txt
delete mode 100644 W/bugs/BUG_IMAPClient_3.xx
delete mode 100644 W/bugs/Makefile
delete mode 100755 W/bugs/bug_ssl_win32_1
delete mode 100755 W/bugs/bug_ssl_win32_2
delete mode 100755 W/bugs/bug_ssl_win32_3_http
delete mode 100644 W/bugs/build_test_ssl.bat
delete mode 100644 W/bugs/test_ssl.bat
delete mode 100755 W/build_exe.bat
delete mode 100755 W/build_mac.sh
delete mode 100755 W/check_win64err
delete mode 100755 W/check_winerr
delete mode 100644 W/checklink.txt
delete mode 100644 W/checklinkext.txt
delete mode 100755 W/docker_pull_count
delete mode 100644 W/docker_pull_count.txt
delete mode 100644 W/freshmeat/freshmeat
delete mode 100644 W/freshmeat/freshmeat_submition.inp
delete mode 100644 W/freshmeat/freshmeat_submition.json
delete mode 100644 W/freshmeat/freshmeat_submition.out
delete mode 100755 W/gts/gts_graphs
delete mode 100755 W/gts/imapsync_github_stats
delete mode 100755 W/gts/merge-csv
delete mode 100644 W/imapsync.1
delete mode 100644 W/imapsync_functions_tree.txt
delete mode 100644 W/imapsync_functions_tree_ppi.txt
delete mode 100755 W/install_module_one.bat
delete mode 100755 W/install_module_ssl.bat
delete mode 100755 W/install_modules.bat
delete mode 100644 W/ks.htaccess
delete mode 100644 W/learn/+ZyhnUA-
delete mode 100644 W/learn/10990.txt
delete mode 100644 W/learn/10_99.txt
delete mode 100755 W/learn/Calltree.pm
delete mode 100644 W/learn/adjust_time.pl
delete mode 100755 W/learn/append
delete mode 100644 W/learn/automap_languages
delete mode 100644 W/learn/bibmail_1GB
delete mode 100755 W/learn/bug_Mail-IMAPClient-3.40_connect
delete mode 100755 W/learn/bug_io_prompt_local_ARGV
delete mode 100755 W/learn/bug_io_prompter_local_ARGV
delete mode 100755 W/learn/copy
delete mode 100755 W/learn/create_folder
delete mode 100755 W/learn/crunch_memory
delete mode 100644 W/learn/data_utf7
delete mode 100755 W/learn/date_manip
delete mode 100755 W/learn/dbfile
delete mode 100755 W/learn/dbmdeep
delete mode 100755 W/learn/delete
delete mode 100755 W/learn/delete_all_folders
delete mode 100755 W/learn/delete_folder
delete mode 100755 W/learn/digest
delete mode 100755 W/learn/dns_srv_imap
delete mode 100755 W/learn/dns_srv_imap.tdy
delete mode 100755 W/learn/fetch_with_size
delete mode 100755 W/learn/file_append
delete mode 100755 W/learn/file_spec
delete mode 100644 W/learn/file_string
delete mode 100755 W/learn/function_calls
delete mode 100755 W/learn/function_calls_ppi
delete mode 100755 W/learn/getoptlong
delete mode 100755 W/learn/hashes_set
delete mode 100755 W/learn/here_comment
delete mode 100755 W/learn/hugemigr
delete mode 100755 W/learn/imap_Encode_IMAPUTF7_decode
delete mode 100755 W/learn/imap_Encode_IMAPUTF7_encode
delete mode 100644 W/learn/imap_gbk_Q_decode
delete mode 100755 W/learn/imap_rename_regex
delete mode 100644 W/learn/imap_rename_regex_examples.txt
delete mode 100644 W/learn/imap_tcpdump
delete mode 100755 W/learn/imap_utf7
delete mode 100755 W/learn/imap_utf7_decode
delete mode 100755 W/learn/imap_utf7_encode
delete mode 100755 W/learn/imap_utf7_tests
delete mode 100755 W/learn/imap_utf7_tests_Encode_IMAPUTF7
delete mode 100644 W/learn/imapbyhand
delete mode 100644 W/learn/imapclient3xx_isUnconnected
delete mode 100755 W/learn/imapclient3xx_ssl
delete mode 100755 W/learn/imapclient_quota_qq
delete mode 100755 W/learn/imapclient_quota_qq_memo
delete mode 100644 W/learn/imapclient_skeleton
delete mode 100755 W/learn/imapclient_tls
delete mode 100644 W/learn/imapsync.sublist
delete mode 100755 W/learn/increaseline
delete mode 100755 W/learn/io_socket_get
delete mode 100755 W/learn/ipc_open2
delete mode 100644 W/learn/log.txt
delete mode 100755 W/learn/longline
delete mode 100755 W/learn/longline_10000_11000
delete mode 100755 W/learn/longline_10230_10240
delete mode 100755 W/learn/mail2world
delete mode 100644 W/learn/memo
delete mode 100755 W/learn/memory_consumption
delete mode 100755 W/learn/message_string_raw
delete mode 100755 W/learn/message_string_raw_pb
delete mode 100755 W/learn/oauth2
delete mode 100755 W/learn/perlcritic_ProhibitInterpolationOfLiterals
delete mode 100755 W/learn/perlcritic_ProhibitInterpolationOfLiterals_2
delete mode 100755 W/learn/pipemess
delete mode 100755 W/learn/print
delete mode 100755 W/learn/proximapsync
delete mode 100755 W/learn/quotes
delete mode 100755 W/learn/re_backslashb
delete mode 100755 W/learn/ref
delete mode 100755 W/learn/resolvme
delete mode 100644 W/learn/rpm/imapsync.spec
delete mode 100755 W/learn/separator
delete mode 100644 W/learn/splice_fetch
delete mode 100755 W/learn/subscribe
delete mode 100755 W/learn/tee_log
delete mode 100644 W/learn/tee_log.bat
delete mode 100644 W/learn/tmp/+ZyhnUA-
delete mode 100644 W/learn/tmp/收件箱
delete mode 100755 W/learn/uppercase_header
delete mode 100755 W/learn/utf7_to_utf7imap
delete mode 100755 W/learn/xoauth2_gmail
delete mode 100755 W/learn_func.bat
delete mode 100644 W/lfo.htaccess
delete mode 100644 W/livredor.txt
delete mode 100644 W/lsm.imapsync
delete mode 100644 W/memo
delete mode 100644 W/ml_announce.in.txt
delete mode 100644 W/patches/FAQ_ralph.patch
delete mode 100644 W/patches/create_folder_erik.torgesta.com
delete mode 100644 W/patches/imapsync--justcopy.patch
delete mode 100644 W/patches/imapsync-1.139-ssl-authmech-authusing.patch
delete mode 100644 W/patches/imapsync-1.156-ssl-authusing.patch
delete mode 100644 W/patches/imapsync-1.217_tls_support.patch
delete mode 100644 W/patches/imapsync-1.278.log_info_on_lost_connection.patch
delete mode 100644 W/patches/imapsync-1.337_tobit_V6.patch
delete mode 100644 W/patches/imapsync-1.94-foldersizes.diff
delete mode 100644 W/patches/imapsync-acls-users
delete mode 100644 W/patches/imapsync-base64.patch
delete mode 100644 W/patches/imapsync-buffersize.diff
delete mode 100644 W/patches/imapsync-pb-acl.diff
delete mode 100644 W/patches/imapsync-readkey
delete mode 100644 W/patches/imapsync-ssl.diff
delete mode 100644 W/patches/imapsync-ssl2.diff
delete mode 100644 W/patches/imapsync-undef_arrayref.diff
delete mode 100644 W/patches/imapsync-xgwtrustedapp
delete mode 100644 W/patches/imapsync-yahoo
delete mode 100644 W/patches/imapsync.1.282.patch
delete mode 100644 W/patches/imapsync.1.282.patch2
delete mode 100644 W/patches/imapsync.1.284.patch
delete mode 100644 W/patches/imapsync.WilliamHernandez.INBOX.INBOX
delete mode 100644 W/patches/imapsync.dave
delete mode 100644 W/patches/imapsync.diff
delete mode 100644 W/patches/imapsync.patch_rick_romero
delete mode 100644 W/patches/imapsync.syncuid.diff
delete mode 100644 W/patches/imapsync_1.267_jari
delete mode 100644 W/patches/imapsync_1.592.groupwise_auth.diff
delete mode 100644 W/patches/imapsync_1.592.kerio.diff
delete mode 100644 W/patches/imapsync_Cvitkovich_pidfile_tmpfile
delete mode 100644 W/patches/imapsync_bhaveshah@gmail.com
delete mode 100644 W/patches/imapsync_minsize
delete mode 100644 W/patches/proxyauth-v2_1.366.patch
delete mode 100644 W/patches/proxyauth_1.366.patch
delete mode 100755 W/pdq/pdq_i005
delete mode 100644 W/perlcritic_1.txt
delete mode 100644 W/perlcritic_2.txt
delete mode 100644 W/perlcritic_3.txt
delete mode 100644 W/perlcritic_4.txt
delete mode 100644 W/prereq.Ubuntu_16.04_xenial.txt
delete mode 100644 W/prereq.scandeps.Ubuntu_16.04_xenial.txt
delete mode 100755 W/rsync_exclude_dist.txt
delete mode 100755 W/t/01_connect
delete mode 100644 W/t/01_connect.229.dump
delete mode 100755 W/t/02_append_string
delete mode 100755 W/t/03_message_to_file
delete mode 100755 W/t/04_parse_headers
delete mode 100755 W/t/05_parse_headers_ssl
delete mode 100755 W/t/06_parse_headers_ssl_titi
delete mode 100644 W/t/07_ll_regexmess_add_header.txt
delete mode 100644 W/t/08_ll_regexmess_add_header_path.txt
delete mode 100644 W/t/loadavg.out
delete mode 100755 W/test.bat
delete mode 100755 W/test2.bat
delete mode 100755 W/test3.bat
delete mode 100755 W/test3_boxon.bat
delete mode 100755 W/test3_gmail.bat
delete mode 100755 W/test3_longdir.bat
delete mode 100755 W/test4.bat
delete mode 100755 W/test5.bat
delete mode 100755 W/test6.bat
delete mode 100755 W/test_abort.bat
delete mode 100755 W/test_cook_exe.bat
delete mode 100755 W/test_cook_src.bat
delete mode 100755 W/test_exe.bat
delete mode 100755 W/test_exe_2.bat
delete mode 100755 W/test_exe_tests.bat
delete mode 100755 W/test_exe_testsdebug.bat
delete mode 100755 W/test_ipv6.bat
delete mode 100755 W/test_reg.bat
delete mode 100755 W/test_tail.bat
delete mode 100755 W/test_tests.bat
delete mode 100755 W/test_testsdebug.bat
delete mode 100755 W/test_xoauth2.bat
delete mode 100755 W/tools/IMAPSyncInputs.bat
delete mode 100755 W/tools/addFromIfMissing
delete mode 100755 W/tools/addFromIfMissing2
delete mode 100755 W/tools/analyse-ssl.txt
delete mode 100755 W/tools/backup_old_dist
delete mode 120000 W/tools/cgi_memo
delete mode 100755 W/tools/fix_email_for_exchange.py
delete mode 100755 W/tools/gen_README_dist
delete mode 100755 W/tools/html5check.py
delete mode 100755 W/tools/minage_maxage
delete mode 100755 W/tools/postman_imapsync.py
delete mode 100755 W/tools/validate
delete mode 100755 W/tools/validate_files_in_dir.pl
delete mode 100755 W/tools/validate_html4
delete mode 100755 W/tools/validate_xml_html5
delete mode 100755 W/tools/watchdog.pl
delete mode 100644 W/tools/wonko_ruby_imapsync
delete mode 100755 W/uninstall_module_one.bat
create mode 100644 X/crypto-js/core.js
create mode 100644 X/crypto-js/sha256.js
create mode 100755 X/domains_servers_map
create mode 100755 X/imapsync_csv_wrapper
create mode 120000 X/imapsync_current.txt
delete mode 100644 X/imapsync_form_1.3.js
delete mode 100644 X/imapsync_form_1.4.js
mode change 100755 => 100644 X/imapsync_form_extra.html
create mode 100644 X/imapsync_form_extra_free.html
rename X/{imapsync_form_1.69.html => imapsync_form_wrapper.html} (87%)
create mode 100644 X/imapsync_form_wrapper.js
create mode 100755 X/imapsync_shell_wrapper
delete mode 100644 X/jquery-3.3.1.js
delete mode 100644 X/jquery-3.3.1.min.js
create mode 100755 X/sandbox_csv.html
create mode 120000 X/u.html
delete mode 120000 dist
create mode 100644 doc/conferences/imapsync_2010_gulliver_AG.lyx
create mode 100644 doc/conferences/imapsync_2015_Saint-Brieuc.lyx
create mode 100644 doc/conferences/imapsync_2020_gulliver_fdln.lyx
create mode 100644 doc/conferences/imapsync_2020_gulliver_fdln.pdf
create mode 100755 examples/sync_parallel_curl.sh
delete mode 100755 imapsync-1.945
create mode 100755 oauth2/README_OAUTH2.txt
create mode 100755 oauth2/generate_gmail_token
create mode 100755 oauth2/oauth2_google.py
create mode 100755 oauth2/oauth2_imap_from_token
diff --git a/ChangeLog b/ChangeLog
index 5bb195d..ab36fb6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,17 +1,332 @@
RCS file: RCS/imapsync,v
Working file: imapsync
-head: 1.977
+head: 2.140
branch:
locks: strict
- gilles: 1.977
+ gilles: 2.140
access list:
symbolic names:
keyword substitution: kv
-total revisions: 977; selected revisions: 977
+total revisions: 1040; selected revisions: 1040
description:
----------------------------
-revision 1.977 locked by: gilles;
+revision 2.140 locked by: gilles;
+date: 2021/07/05 20:14:18; author: gilles; state: Exp; lines: +14 -10
+Fixed perlcrit 4 severity 4 violations.
+----------------------------
+revision 2.139
+date: 2021/07/04 21:03:28; author: gilles; state: Exp; lines: +14 -14
+Adapted to oauth2/generate_gmail_token
+----------------------------
+revision 2.138
+date: 2021/07/01 08:40:50; author: gilles; state: Exp; lines: +13 -10
+Moved oauthgenerateaccess() call.
+----------------------------
+revision 2.137
+date: 2021/07/01 08:13:52; author: gilles; state: Exp; lines: +32 -10
+Bugfix. imapsync did nothing with the previous change.
+----------------------------
+revision 2.136
+date: 2021/06/30 23:16:13; author: gilles; state: Exp; lines: +295 -176
+Review the README part.
+Added option --filterbuggyflags to filter the well known buggy flags that generate errors "BAD Invalid system flag" or "NO APPEND Invalid flag list".
+1734 unit tests.
+Some refactoring.
+----------------------------
+revision 2.135
+date: 2021/06/29 20:38:40; author: gilles; state: Exp; lines: +58 -46
+Reviewed README section until flags options.
+----------------------------
+revision 2.134
+date: 2021/06/29 12:14:49; author: gilles; state: Exp; lines: +40 -14
+Avoid unit tests on polarhome macosx where "ssl3_get_server_certificate:certificate verify failed". No clue to fix that.
+----------------------------
+revision 2.133
+date: 2021/06/28 08:07:25; author: gilles; state: Exp; lines: +13 -12
+Fixed some unit tests for polarhome macosx
+----------------------------
+revision 2.132
+date: 2021/06/26 23:19:40; author: gilles; state: Exp; lines: +40 -17
+Added tests to test cpu_number() on Windows MacOS
+----------------------------
+revision 2.131
+date: 2021/06/25 16:20:38; author: gilles; state: Exp; lines: +57 -13
+Bugfix. cpu_number was accurate only on Linux. Added Freebsd
+----------------------------
+revision 2.130
+date: 2021/06/25 11:11:03; author: gilles; state: Exp; lines: +108 -36
+Added percentage of all cpu in stats
+----------------------------
+revision 2.129
+date: 2021/06/24 16:59:49; author: gilles; state: Exp; lines: +8 -8
+Removed a debug print
+----------------------------
+revision 2.128
+date: 2021/06/24 16:54:00; author: gilles; state: Exp; lines: +8 -8
+1702 tests
+----------------------------
+revision 2.127
+date: 2021/06/24 15:42:11; author: gilles; state: Exp; lines: +46 -16
+Added statistic line "CPU time and %cpu"
+----------------------------
+revision 2.126
+date: 2021/06/24 09:37:47; author: gilles; state: Exp; lines: +87 -33
+Added --loglogfile option. Append ../list_all_logs_auto.txt with the logfile name. On by default in CGI context.
+Some refactoring, file_to_array file_to_string functions.
+----------------------------
+revision 2.125
+date: 2021/06/20 16:50:46; author: gilles; state: Exp; lines: +66 -25
+Do not check selectable folders for huge accounts with more than 152 folders. 98percentile of /X
+----------------------------
+revision 2.124
+date: 2021/06/17 12:29:22; author: gilles; state: Exp; lines: +8 -8
+Testfix. Sometimes GMT is output UTC.
+----------------------------
+revision 2.123
+date: 2021/06/17 11:56:20; author: gilles; state: Exp; lines: +30 -27
+CGI context. Sync duplicates by default in cgi context.
+----------------------------
+revision 2.122
+date: 2021/06/16 19:36:21; author: gilles; state: Exp; lines: +15 -17
+Stats. Final line "Biggest message" was in fact "Biggest message" to be transferred. Now it is "Biggest message transferred".
+----------------------------
+revision 2.121
+date: 2021/06/15 22:43:18; author: gilles; state: Exp; lines: +150 -89
+Refactor. Splited sub myGetOptions() into sub setvalfromcgikey sub setvalfromlist sub setvalfromhash sub setvalfromcheckbox. Not very clean but better than the huge old one.
+----------------------------
+revision 2.120
+date: 2021/06/15 22:32:28; author: gilles; state: Exp; lines: +54 -38
+Change time presentation on ETA and in final stats. Example: Wednesday 16 June 2021-06-16 00:32:05 +0200 CEST
+Added the timezone and full day
+----------------------------
+revision 2.119
+date: 2021/06/06 10:21:34; author: gilles; state: Exp; lines: +162 -109
+Added localtimez function to replace localtime, date and time with the timezone added. Not replaced yet.
+Remove a useless warning "File xxx.pid does not exist" in tail function.
+Made oauth2 tests dependent on oauth2_string_for_oauthdirect.txt oauth2_access_token.txt presence.
+Added info "Exiting because of --justbanner" with --justbanner
+----------------------------
+revision 2.118
+date: 2021/05/31 22:18:16; author: gilles; state: Exp; lines: +16 -11
+In CGI context, the log directory is no longer ./LOG_imapsync/ but simply ./ It should fasten the searches and grep
+----------------------------
+revision 2.117
+date: 2021/05/27 18:04:12; author: gilles; state: Exp; lines: +20 -16
+Load limit 3x => 6x
+----------------------------
+revision 2.116
+date: 2021/05/21 16:41:12; author: gilles; state: Exp; lines: +39 -53
+load limit upped to 3
+----------------------------
+revision 2.115
+date: 2021/05/05 23:41:12; author: gilles; state: Exp; lines: +11 -8
+Advantage of a file when using --oauthaccesstoken1 str
+----------------------------
+revision 2.114
+date: 2021/05/05 19:03:24; author: gilles; state: Exp; lines: +48 -21
+Documented --oauthaccesstoken1 and --oauthdirect1 and the 2 sisters.
+----------------------------
+revision 2.113
+date: 2021/05/03 20:47:18; author: gilles; state: Exp; lines: +118 -35
+Implemented --oauthaccesstoken1 and --oauthaccesstoken2
+1691 unit tests
+----------------------------
+revision 2.112
+date: 2021/04/30 17:55:05; author: gilles; state: Exp; lines: +257 -248
+Added --noabletosearch README
+Removed trailing blanks, perlcrit "Found "\N{SPACE}" at the end of the line"
+----------------------------
+revision 2.111
+date: 2021/04/30 07:40:41; author: gilles; state: Exp; lines: +615 -408
+Added options --oauthdirect1 and --oauthdirect2
+ to support OAUTH2 authentication.
+ The parameter value is the direct string given to the XOAUTH2 imap command.
+Added option --syncduplicates to sync duplicates.
+
+Added option --trylogin on by default.
+ After a login failure of any king, imapsync tries to login
+ with the LOGIN command. Use --notrylogin to avoid that.
+
+Reduced sub login_imap() number of parameters from 19 to 10.
+
+Added options --oauthaccesstoken1 and --oauthaccesstoken2, not implemented yet.
+
+Removed old OAUTH1 support. I hope no one will be touched by this removal, if
+ yes, I'll bring it back.
+----------------------------
+revision 2.110
+date: 2021/03/28 17:34:29; author: gilles; state: Exp; lines: +25 -16
+--timeout can now be a float (was only integer). Same for --timeout1 --timeout2
+Warning about a timeout by the webserver in CGI mode.
+$timeout no longer a variable (global).
+----------------------------
+revision 2.109
+date: 2021/03/13 19:39:37; author: gilles; state: Exp; lines: +59 -25
+Added message ""No log file because of option --nolog".
+Added possibility of no logging in cgi context, with log=0 or log= in the parameters
+Added possibility of float number for --simulong instead of integer.
+1672 unit tests.
+----------------------------
+revision 2.108
+date: 2021/02/25 10:35:33; author: gilles; state: Exp; lines: +27 -23
+Bugfix. In sub delete_messages_on_any, the uidexpunge_or_expunge call was
+ always done with an empty array so no expunge was done there.
+ Fortunately, expunge was done elsewhere so this bug was not disastrous.
+ There is functionnal tests to check expunge behaviour anyway.
+----------------------------
+revision 2.107
+date: 2021/02/09 20:02:55; author: gilles; state: Exp; lines: +9 -9
+Back from Message-Id to Message-Id Received in cgisetcontext
+----------------------------
+revision 2.106
+date: 2021/02/09 19:59:13; author: gilles; state: Exp; lines: +222 -16
+Added some tests in sub tests_regexmess to remove a buggy header on multi-lines not all starting with a blank. 's{X-Spam-Report:.*?\n(^[^\n]+:|^\r?\n)}{$1}xms'
+----------------------------
+revision 2.105
+date: 2021/02/02 11:17:15; author: gilles; state: Exp; lines: +30 -14
+Added tests "Add a final \r\n if missing" in sub tests_regexmess
+----------------------------
+revision 2.104
+date: 2021/01/27 15:14:09; author: gilles; state: Exp; lines: +76 -70
+Added test to "Change 8bit characters in whole email to X characters" in sub tests_regexmess
+----------------------------
+revision 2.103
+date: 2021/01/20 16:28:06; author: gilles; state: Exp; lines: +46 -20
+Removed the exit_clean call when "Can not go to tls encryption on" in sub login_imap()
+1652 tests
+----------------------------
+revision 2.102
+date: 2020/12/13 23:48:30; author: gilles; state: Exp; lines: +43 -20
+Bugfix. EXIT_ERR_APPEND_VIRUS had no message upon exit.
+Bugfix. In --dry mode the final "Messages transferred : 0 (could be 1264 without dry mode)" is ok when the folders does not exist yet.
+----------------------------
+revision 2.101
+date: 2020/12/08 23:47:13; author: gilles; state: Exp; lines: +171 -40
+Added EXIT_CONNECTION_FAILURE_HOST1 101 return code
+Added EXIT_CONNECTION_FAILURE_HOST2 102 return code
+Added EXIT_AUTHENTICATION_FAILURE_USER1 161 return code
+Added EXIT_AUTHENTICATION_FAILURE_USER2 162 return code
+Do both side login and authentication before exiting on falure.
+----------------------------
+revision 2.100
+date: 2020/12/07 00:45:50; author: gilles; state: Exp; lines: +24 -9
+New numbering from 1.999 directly to 2.100 I want to avoid 1.1000 and sorting issues in directory listing.
+Added option --dry1 it avoids to fetch the message on host1. --dry1 is on when --dry is on. It speeds up --dry very much.
+----------------------------
+revision 1.999
+date: 2020/12/02 20:41:50; author: gilles; state: Exp; lines: +69 -34
+Added a section "How do you know a sync is finished and well done?"
+When creating a directory, now the current directory is also printed.
+ It helps when the directory created is relative.
+Bugfix. resolv: imapsync.lamiral.info => 2001:41d0:2:84e0::1 (was 91.121.221.224)
+----------------------------
+revision 1.998
+date: 2020/08/17 10:18:25; author: gilles; state: Exp; lines: +302 -108
+1638 regression tests.
+Added option --abortbyfile to be able to be aborted by a file presence (context: webserver on windows)
+Reviewed and fixed sub acls_sync(). Did not work and made bad things.
+Added exit value EXIT_BY_FILE => 7
+Added exit value EXIT_TRANSFER_EXCEEDED => 118
+----------------------------
+revision 1.997
+date: 2020/07/16 10:58:14; author: gilles; state: Exp; lines: +20 -17
+Gmail update
+gmail12: maxbytespersecond 20_000 maxbytesafter 1_000_000_000
+gmail1 : maxbytespersecond 40_000 maxbytesafter 3_000_000_000 (was 2_500_000_000)
+gmail2 : maxbytespersecond 20_000 maxbytesafter 1_000_000_000
+----------------------------
+revision 1.996
+date: 2020/06/19 09:53:38; author: gilles; state: Exp; lines: +69 -20
+Added exit 118 EXIT_TRANSFER_EXCEEDED when "Maximum bytes transferred reached" with option --exitwhenover
+Added error type ERR_TRANSFER_EXCEEDED.
+----------------------------
+revision 1.995
+date: 2020/06/17 18:55:01; author: gilles; state: Exp; lines: +9 -8
+Added exitwhenover as an option in cgi context.
+----------------------------
+revision 1.994
+date: 2020/06/14 12:10:30; author: gilles; state: Exp; lines: +76 -22
+Bugfix. Fixed some "Exiting with return value ()". Added ERR_NOTHING_REPORTED error and exit EXIT_CATCH_ALL ie 1 in case.
+----------------------------
+revision 1.993
+date: 2020/06/12 09:10:20; author: gilles; state: Exp; lines: +10 -8
+Docfix. Fixed issue https://github.com/imapsync/imapsync/issues/213
+Precision about --delete2duplicates
+----------------------------
+revision 1.992
+date: 2020/05/29 12:14:53; author: gilles; state: Exp; lines: +156 -34
+Bugfix. fatal string causing "Wide character in subroutine entry"
+----------------------------
+revision 1.991
+date: 2020/05/12 20:37:48; author: gilles; state: Exp; lines: +86 -25
+Bugfix. --checknoabletosearch was not adaptive.
+Fix. tests sslheck now use test1.lamiral.info instead of imapsync.lamiral.info
+Fix. tests_resolv now use ks6ipv6.lamiral.info instead of ks2ipv6.lamiral.info
+Bugfix. Better closing of logfile at the end in order to avoid in Apache error log "AH01215: print() on closed filehandle $logfile_handle"
+----------------------------
+revision 1.990
+date: 2020/05/03 17:07:36; author: gilles; state: Exp; lines: +7 -7
+Bugfix. Forgot to map ERR_Host1_FETCH to EXIT_ERR_FETCH,
+----------------------------
+revision 1.989
+date: 2020/05/03 17:07:17; author: gilles; state: Exp; lines: +8 -7
+*** empty log message ***
+----------------------------
+revision 1.988
+date: 2020/04/29 21:52:20; author: gilles; state: Exp; lines: +37 -8
+Sanitize host1 and host2 values. Remove blanks and / characters.
+----------------------------
+revision 1.987
+date: 2020/04/29 02:34:00; author: gilles; state: Exp; lines: +253 -18
+Added an analyse and classification of the errors encountered.
+Most common error encountered is printed at the end.
+Exit value 112 is now replaced by the most common error encountered exit value
+113 is EXIT_OVERQUOTA
+114 is EXIT_ERR_APPEND
+115 is EXIT_ERR_FETCH
+116 is EXIT_ERR_CREATE
+117 is EXIT_ERR_SELECT
+111 is EXIT_WITH_ERRORS ERR_UNCLASSIFIED
+----------------------------
+revision 1.986
+date: 2020/04/26 11:05:55; author: gilles; state: Exp; lines: +37 -36
+Changed filter_forbidden_characters() to replace non-ascii and control characters and spaces by character _
+----------------------------
+revision 1.985
+date: 2020/04/25 14:50:30; author: gilles; state: Exp; lines: +48 -23
+Added unit tests to prepare "Wide character in subroutine entry".
+----------------------------
+revision 1.984
+date: 2020/04/22 10:35:44; author: gilles; state: Exp; lines: +30 -15
+Bugfix. Empty subject https://github.com/imapsync/imapsync/pull/216 added unit test regression.
+----------------------------
+revision 1.983
+date: 2020/03/19 02:08:12; author: gilles; state: Exp; lines: +96 -13
+Filter flags \PRIORITY \READRCPT in cgi context.
+Now check if SEARCH ALL works on both accounts and then add --noabletosearch if one can not. Use --nochecknoabletosearch to avoid that behavior.
+----------------------------
+revision 1.982
+date: 2020/03/16 15:17:02; author: gilles; state: Exp; lines: +60 -29
+Rewrote tests in tests_msgs_from_maxmin() (same ones anyway)
+----------------------------
+revision 1.981
+date: 2020/02/14 12:10:13; author: gilles; state: Exp; lines: +18 -8
+Bugfix. CGI not fatal with imapsync --tests
+----------------------------
+revision 1.980
+date: 2020/01/18 20:37:27; author: gilles; state: Exp; lines: +9 -9
+Updated @regexflag in cgi context.
+----------------------------
+revision 1.979
+date: 2020/01/14 22:26:11; author: gilles; state: Exp; lines: +47 -30
+Added regex --regexflag from /X analyse in cgi context.
+----------------------------
+revision 1.978
+date: 2020/01/08 21:56:12; author: gilles; state: Exp; lines: +11 -11
+Added single quote ' filtering in filter_forbidden_characters()
+----------------------------
+revision 1.977
date: 2019/12/23 20:18:02; author: gilles; state: Exp; lines: +10 -10
No tests_resolv( ) since resolv is not really used and tests_resolv( ) fails on mac (I do not have write to /etc/hosts)
----------------------------
diff --git a/FAQ.d/FAQ.APPEND_errors.txt b/FAQ.d/FAQ.APPEND_errors.txt
index c8d473e..2f5a8b6 100644
--- a/FAQ.d/FAQ.APPEND_errors.txt
+++ b/FAQ.d/FAQ.APPEND_errors.txt
@@ -1,19 +1,19 @@
#!/bin/cat
-$Id: FAQ.APPEND_errors.txt,v 1.12 2021/02/10 19:42:42 gilles Exp gilles $
+$Id: FAQ.APPEND_errors.txt,v 1.13 2021/05/29 07:58:44 gilles Exp gilles $
This document is also available online at
https://imapsync.lamiral.info/FAQ.d/
https://imapsync.lamiral.info/FAQ.d/FAQ.APPEND_errors.txt
-=======================================================================
+======================================================================
Dealing with Imapsync APPEND errors.
-=======================================================================
+======================================================================
Questions answered in this FAQ are:
-Q. I have an "could not append" error with "Message contains invalid header" at
- the end, like:
+Q. I have an "could not append" error with
+ "Message contains invalid header" at the end, like:
Err 1/20: - msg INBOX/6 {40666} could not append ... NO Message contains invalid header
What can I do to transfer these emails?
@@ -23,15 +23,20 @@ Q. For some messages, the imapsync log says
useful message "socket closed while reading data from server"
What can I do?
+Q. The append error message is "NO Message contains NUL characters"
+ What can I do?
+
Now the questions again with their answers.
-=======================================================================
-Q. I have an "could not append" error with "Message contains invalid header"
- at the end, like:
+
+======================================================================
+Q. I have an "could not append" error with
+ "Message contains invalid header" at the end, like:
Err 1/20: - msg INBOX/6 {40666} could not append ... NO Message contains invalid header
What can I do to transfer these emails?
+
R0. Append in the IMAP protocol is the command to add a message in the folder.
The error string "NO. Message contains invalid header" comes from the
destination IMAP server at host2, it doesn't like the message and rejects it.
@@ -40,12 +45,16 @@ R1. Header lines must be in 7bit encoding.
If they aren't in 7bit the IMAP server can refuse them as they break
the IMAP RFC specification.
- A solution is to transform all 8bit characters to the X character with:
+ A solution is to transform all 8bit characters to the Z character with:
- imapsync ... --regexmess 'tr [\x80-\xff] [X]'
+ imapsync ... --regexmess "tr [\x80-\xff] [Z]"
Caveat: this transformation transforms both the email header and its body.
It's not perfect but I guess it's better than no message transferred.
+ So consider using it in a second pass, not the first, as 8-bit
+ characters in the body message are allowed and changing them when
+ not needed is not a good thing.
+
R2. Some crappy email systems, like virus checkers or any other crappy
software tool dealing with your messages, can add headers to tell
@@ -61,7 +70,7 @@ R2. Some crappy email systems, like virus checkers or any other crappy
Thanks to Damien SAUTEREAU for reporting and solving this issue.
-=======================================================================
+======================================================================
Q. For some messages, the imapsync log says
"could not append", sometimes followed by an explicit message
describing what went wrong, or sometimes followed by a not very
@@ -136,5 +145,22 @@ OPTIONS
R3. Look for the quota limit on host2. If it is the current mailbox size, don't
search elsewhere. Increase the quota on the destination account.
-=======================================================================
-=======================================================================
+======================================================================
+Q. The append error message is "NO Message contains NUL characters"
+ What can I do?
+
+R. Use:
+
+ imapsync ... --skipmess "m/(\x00)+\Z/"
+
+The option --skipmess skips messages matching a pattern, the
+messages are not synced, you just avoid the error messages concerning
+those messages.
+
+If you want to sync them, use instead:
+
+ imapsync ... --regexmess "s/(\x00)+\Z//g"
+
+
+======================================================================
+======================================================================
diff --git a/FAQ.d/FAQ.Archiving.txt b/FAQ.d/FAQ.Archiving.txt
index 6ed064e..45c4bb5 100644
--- a/FAQ.d/FAQ.Archiving.txt
+++ b/FAQ.d/FAQ.Archiving.txt
@@ -1,5 +1,5 @@
#!/bin/cat
-$Id: FAQ.Archiving.txt,v 1.24 2021/04/18 09:11:32 gilles Exp gilles $
+$Id: FAQ.Archiving.txt,v 1.25 2021/05/04 16:56:59 gilles Exp gilles $
This documentation is also available online at
https://imapsync.lamiral.info/FAQ.d/
@@ -138,8 +138,8 @@ R5. There is a free online service (French language) allowing you to do
a Maildir or EML or HTML backup at
https://www.powermail.fr/sauvegarder-une-boite-mail/
Prefer Maildir or EML format if you want to be able to restore the
- archive. HTML format will be ok to only view the messages, not
- restore them to so imap server account.
+ archive. HTML format will be ok to only view the messages, not to
+ restore them to an imap server account.
I have never used any of this tools so asking me for support with them
won't go far away.
diff --git a/FAQ.d/FAQ.Bandwidth.txt b/FAQ.d/FAQ.Bandwidth.txt
index 73e0685..5e089c1 100644
--- a/FAQ.d/FAQ.Bandwidth.txt
+++ b/FAQ.d/FAQ.Bandwidth.txt
@@ -1,5 +1,5 @@
-$Id: FAQ.Bandwidth.txt,v 1.2 2021/04/19 11:46:47 gilles Exp gilles $
+$Id: FAQ.Bandwidth.txt,v 1.3 2021/05/20 11:46:07 gilles Exp gilles $
This documentation is also available online at
https://imapsync.lamiral.info/FAQ.d/
@@ -20,27 +20,29 @@ Now the questions again with their answers.
=======================================================================
Q. What is the bandwidth used by imapsync?
-R. From the host where imapsync runs, it opens two imap connections,
- one with the source account at host1, one with the destination
- account at host2.
+R. From the host where imapsync runs, imapsync opens two imap
+connections, one with the source account at host1, one with the
+destination account at host2.
- So, the global bandwidth used is twice the volume of the source
- account, one volume to download the messages from host1,
- one volume to upload those messages to host2.
+So, the global bandwidth used by an imapsync transfer is twice the
+volume of the source account, one volume to download the messages from
+host1, one volume to upload those messages to host2.
+
+If the host2 is already filled with the messages, imapsync doesn't
+transfer them and then the volume transferred is small, this volume is
+just made up of the IMAP commands needed to identify the messages on
+both sides.
- If the host2 is already filled with the messages, imapsync doesn't
- transfer them and then the volume transferred is small, this volume
- is just the IMAP commands needed to identify the messages on both sides.
+There is no local cache of the email messages, except when a message
+is very big; it is then temporarily saved locally between the download
+and the upload.
- There is no local cache of the email messages, except when the
- message is very big, it is temporarily saved locally.
-
- The biggest message seen so far on online /X is 3.08 GiB
- while the biggest message transferred is 1.51 GiB so
- I suspect a bug here. Drop me a note if you encounter the same
- issue, I'll then dig into it, ie, I'll create a 2 or 3 GiB message
- and play with it :-)
+The biggest message seen so far on the online service I call /X is
+3.08 GiB while the biggest message transferred is 1.51 GiB. So I
+suspect a bug here. Drop me a note if you encounter the same issue,
+I'll then dig into it, ie, I'll create a 2 or 3 GiB big message and
+play with it :-)
=======================================================================
-=======================================================================
\ No newline at end of file
+=======================================================================
diff --git a/FAQ.d/FAQ.Docker.txt b/FAQ.d/FAQ.Docker.txt
index b416894..a159286 100644
--- a/FAQ.d/FAQ.Docker.txt
+++ b/FAQ.d/FAQ.Docker.txt
@@ -1,5 +1,5 @@
#!/bin/cat
-# $Id: FAQ.Docker.txt,v 1.7 2020/01/08 05:02:55 gilles Exp gilles $
+# $Id: FAQ.Docker.txt,v 1.8 2021/05/04 16:57:09 gilles Exp gilles $
This document is also available online at
https://imapsync.lamiral.info/FAQ.d/
@@ -23,6 +23,10 @@ Q. Where is the imapsync Docker hub location?
Q. How can I mask the passwords on the command line without mounting
inside the container?
+===========================================================================
+Q. Why imapsync isn't logging to a file in Docker context.
+ How can I allow it?
+
Q. Any tips for the Docker Mailcow distribution?
@@ -80,6 +84,22 @@ See:
https://docs.docker.com/engine/reference/commandline/run/#set-environment-variables--e---env---env-file
https://stackoverflow.com/a/30494145/491175
+===========================================================================
+Q. Why imapsync isn't logging to a file in Docker context.
+ How can I allow it?
+
+R. In Docker context, writing the log is disabled by default because you
+ don't have an easy access to the logfile after the sync. The logfile is
+ inside the docker and no longer available after the sync, unless
+ a special mount is done before.
+
+Starting with imapsync release 2.113 the logging can be set on
+by using the option --log. You can add access to the logfile with a mount
+or similar. See https://docs.docker.com/storage/volumes/"
+
+See also
+https://github.com/imapsync/imapsync/issues/283
+
===========================================================================
Q. Any tips for the Docker Mailcow distribution?
diff --git a/FAQ.d/FAQ.Duplicates.txt b/FAQ.d/FAQ.Duplicates.txt
index 91002a7..48092f5 100644
--- a/FAQ.d/FAQ.Duplicates.txt
+++ b/FAQ.d/FAQ.Duplicates.txt
@@ -1,5 +1,5 @@
#!/bin/cat
-$Id: FAQ.Duplicates.txt,v 1.23 2021/04/22 13:28:41 gilles Exp gilles $
+$Id: FAQ.Duplicates.txt,v 1.24 2021/07/04 22:59:56 gilles Exp gilles $
This documentation is also available online at
https://imapsync.lamiral.info/FAQ.d/
@@ -17,7 +17,7 @@ Q. How does imapsync identify messages and duplicates?
Q. How can I know if imapsync will generate duplicates on a second run?
Q: I found multiple copies, duplicates, when I run imapsync twice or
- more. What is hell is happening?
+ more. What the hell is happening?
Q. imapsync calculates 479 messages in a folder but only transfers 400
messages. What is happening?
@@ -65,7 +65,7 @@ Messages skipped : 1555
=======================================================================
Q: I found multiple copies, duplicates, when I run imapsync twice or
- more. What is hell is happening?
+ more. What the hell is happening?
R0. First, some explanations to understand the issue.
Normally and by default, imapsync doesn't generate duplicates.
@@ -96,7 +96,7 @@ of all messages already transferred.
If you end with:
Messages skipped : 0
-don't go on, it means imapsync is still suffering to
+then don't go on, it means imapsync is still suffering to
identify messages.
If you end with many messages skipped then it's very
@@ -227,7 +227,9 @@ R2. With option --useuid imapsync doesn't use headers to identify
Q. imapsync doesn't synchronize duplicates by default but I want to.
How can I synchronize duplicates?
-R. Use the option --useuid
+R1. Use the option --syncduplicates
+
+R2. Use the option --useuid
If you have already synchronized two mailboxes without --useuid then
using it right away will generate duplicates on host2. To avoid that
behavior, you have to perform a first run with --usecache to build
@@ -251,10 +253,6 @@ R. Use the option --useuid
If the two mailboxes haven't been already synchronized then the
first run with --usecache is useless.
- I shall add an option --syncduplicates that syncs duplicates
- without any cache needed and make it the default but it's not
- coded yet.
-
=======================================================================
Q. How can I remove duplicates in a lone account?
@@ -263,6 +261,5 @@ R. In order to remove duplicates in a lone account, just run imapsync
option --delete2duplicates, ie, with
host1 == host2, user1 == user2, password1 == password2
-
=======================================================================
=======================================================================
diff --git a/FAQ.d/FAQ.Exchange.txt b/FAQ.d/FAQ.Exchange.txt
index 7778774..88bf0db 100644
--- a/FAQ.d/FAQ.Exchange.txt
+++ b/FAQ.d/FAQ.Exchange.txt
@@ -1,5 +1,5 @@
-$Id: FAQ.Exchange.txt,v 1.74 2021/03/23 14:53:33 gilles Exp gilles $
+$Id: FAQ.Exchange.txt,v 1.75 2021/05/25 10:23:33 gilles Exp gilles $
This documentation is also available online at
https://imapsync.lamiral.info/FAQ.d/
@@ -7,9 +7,9 @@ https://imapsync.lamiral.info/FAQ.d/FAQ.Exchange.txt
-=======================================================================
+======================================================================
Imapsync tips for Exchange 2000 2003 2007 2010 2013 2016 2019
-=======================================================================
+======================================================================
Questions answered in this FAQ are:
@@ -65,7 +65,7 @@ Q. How to sync from Microsoft Exchange 2000 IMAP4rev1 server?
Now the questions again with their answers.
-=======================================================================
+======================================================================
Q. Can I use imapsync to transfer from or to Exchange accounts?
R. Yes. But IMAP access to an Exchange account is not always
@@ -74,7 +74,7 @@ R. Yes. But IMAP access to an Exchange account is not always
Exchange: https://docs.microsoft.com/en-us/exchange/enable-imap4-in-exchange-2013-exchange-2013-help
-=======================================================================
+======================================================================
Q. How to sync from XXX to Exchange 2010/2013/2016/2019
R0. IMAP is not enable by default on Exchange, see how to enable it:
@@ -133,7 +133,7 @@ Use it like this:
It often does some miracles on messages.
-=======================================================================
+======================================================================
Q. For Exchange I have double and triple checked the username and
password spelling but I still get a "LOGIN failed". Any clue?
@@ -185,7 +185,7 @@ R4. Are there special characters in the password?
https://imapsync.lamiral.info/FAQ.d/FAQ.Passwords_on_Mac.txt
-=======================================================================
+======================================================================
Q. Exchange fails with "User is authenticated but not connected".
R1. "The message User is authenticated but not connected is due to a
@@ -201,7 +201,7 @@ R2. Miguel Alameda reported understanding and solving this issue
like this, the context was admin/authuser:
"The admin user had not permission in the target mailbox."
-=======================================================================
+======================================================================
Q. I see "NO Maximum size of appendable message has been exceeded"
What can I do with that?
@@ -249,7 +249,7 @@ in order to remove the imapsync Exchange error message
"NO Maximum size of appendable message has been exceeded"
-=======================================================================
+======================================================================
Q. Exchange throttles the sync and says:
"Request is throttled. Suggested Backoff Time: 299961 milliseconds".
What can I do with that?
@@ -284,7 +284,7 @@ R2. For Exchange, in case throttle appears anyway, fix them with:
Sometimes restarting the Exchange server is needed to take
into account the change in the configuration.
-=======================================================================
+======================================================================
Q. Exchange fails with "BAD Command received in Invalid state".
R1. This message might happen when authenticating without ssl nor tls,
@@ -298,7 +298,7 @@ R2. This message might also happen when authenticating with ssl and tls.
It won't work, you can't do a direct double encryption, few
servers allow that.
-=======================================================================
+======================================================================
Q. From XXX to Exchange 2013, read receipts are all resent again
after a sync. Even for old messages. How can I fix that?
@@ -332,7 +332,7 @@ X-Disposition-Notification-To: blabla
Thanks to David Karnowski for pointing and solving this issue.
-=======================================================================
+======================================================================
Q. DEBUG: IO/Socket/SSL.pm:1043: local error: SSL read error
DEBUG: IO/Socket/SSL.pm:1043: local error: SSL read error
@@ -348,7 +348,7 @@ R2. Another solution is to remove --tls or --ssl options for Exchange
R3. See also the FAQ FAQ.SSL_errors.txt
https://imapsync.lamiral.info/FAQ.d/FAQ.SSL_errors.txt
-=======================================================================
+======================================================================
Q. From XXX to Exchange 2010/2013 I get this error message
sometimes: "BAD Command Argument Error 11". What does it mean?
@@ -372,8 +372,7 @@ R. This error message comes from Exchange IMAP server when it
* Some messages have some lines too long. Use option --maxlinelength
to skip messages whose max line length is over a number of bytes.
--maxlinelength 1000 is a RFC2822 must but most server support
- higher values.
- Exchange supports 9900 characters line length:
+ higher values. Exchange supports 9900 characters line length:
imapsync ... --maxlinelength 9900
@@ -400,7 +399,7 @@ Use it like this:
It often does some miracles on messages.
-=======================================================================
+======================================================================
Q. From XXX to Exchange 2010 or 2013, the flag Flagged does
not seem to be well synced. What can I do?
@@ -549,7 +548,7 @@ In case you are not aware:
omitted in our case
- Use --debugimap when testing initial connectivity, if necessary
-=======================================================================
+======================================================================
Q. Couldn't create folder [trash] "Mailbox already exists".
R. Some servers take care about character case in folder names,
@@ -617,7 +616,7 @@ R2. Other solution
Two users succeeded by using "MS Transporter Suite" (which is closed
expensive non-free software).
-=======================================================================
+======================================================================
Q. Exchange 2007 folders ending with a space cause an imapsync crash.
"Could not select: socket closed while reading data from server"
@@ -632,5 +631,5 @@ Q. How to sync from Microsoft Exchange 2000 IMAP4rev1 server?
R. imapsync ... --prefix1 "INBOX."
-=======================================================================
-=======================================================================
+======================================================================
+======================================================================
diff --git a/FAQ.d/FAQ.Folders_Sizes.txt b/FAQ.d/FAQ.Folders_Sizes.txt
index 674e7a3..14081c9 100644
--- a/FAQ.d/FAQ.Folders_Sizes.txt
+++ b/FAQ.d/FAQ.Folders_Sizes.txt
@@ -1,5 +1,5 @@
#!/bin/cat
-$Id: FAQ.Folders_Sizes.txt,v 1.4 2021/01/26 13:05:21 gilles Exp gilles $
+$Id: FAQ.Folders_Sizes.txt,v 1.5 2021/07/04 23:02:32 gilles Exp gilles $
This documentation is also available online at
https://imapsync.lamiral.info/FAQ.d/
@@ -59,10 +59,7 @@ R. There are several reasons to explain the different counts between
4) There are duplicate messages on host1. Imapsync doesn't sync
duplicates by default. But it counts them and presents the number
found at the end on the line "Messages found duplicate on host1".
- To sync duplicates, use option --useuid
- --useuid has some caveats. See the documant FAQ.Duplicates.txt
- for details about it at
- https://imapsync.lamiral.info/FAQ.d/FAQ.Duplicates.txt
+ To sync duplicates, use the option --syncduplicates
5) There are duplicate messages on host2 so host2 is
bigger than host1. Solution: use --delete2duplicates to delete
diff --git a/FAQ.d/FAQ.Gmail.txt b/FAQ.d/FAQ.Gmail.txt
index e52f7ea..3464304 100644
--- a/FAQ.d/FAQ.Gmail.txt
+++ b/FAQ.d/FAQ.Gmail.txt
@@ -1,5 +1,5 @@
#!/bin/cat
-$Id: FAQ.Gmail.txt,v 1.79 2021/03/31 16:20:28 gilles Exp gilles $
+$Id: FAQ.Gmail.txt,v 1.80 2021/07/06 02:30:11 gilles Exp gilles $
This document is also available online at
https://imapsync.lamiral.info/FAQ.d/
@@ -95,13 +95,13 @@ either:
1) "Access for less secure apps"
2) "2-step verification"
-3) XOauth2 (not ready for individual Gmail authentication, only for groups)
+3) XOauth2 ready for groups on any OS or
+ for individual Gmail authentication on Linux.
For the last one, XOauth2, see the document
https://imapsync.lamiral.info/FAQ.d/FAQ.XOAUTH2.txt
-
1) "Access for less secure apps", the first way to authenticate
to Gmail with Imapsync. This is the easiest way because
you just have to turn one button on.
@@ -335,6 +335,7 @@ imapsync --host1 mail.oldhost.com \
--expunge1 \
--addheader \
--maxsleep 2 \
+ --maxsize 35_651_584
--exclude "\[Gmail\]$" \
--regextrans2 's,\[Gmail\].,,' \
--regextrans2 's,^ +| +$,,g'
@@ -411,7 +412,7 @@ On Windows:
--regextrans2 "s/[\^]/_/g" is mandatory. It converts, since
not accepted by gmail, character ^ to character _ underscore.
---regextrans2 "s/['\"\\\\]/_/g" is optional. It converts
+--regextrans2 's/['"'"'\\^"]/_/g' is optional. It converts
characters ' or " or \ to character _ underscore.
You can select folders exported to imap within the gmail preferences.
@@ -443,7 +444,7 @@ imapsync \
--user2 tata \
--password2 tatasecret \
--maxbytespersecond 40_000 \
- --maxbytesafter 2_500_000_000 \
+ --maxbytesafter 3_000_000_000 \
--automap \
--maxsleep 2 \
--skipcrossduplicates \
diff --git a/FAQ.d/FAQ.GoDaddy.txt b/FAQ.d/FAQ.GoDaddy.txt
new file mode 100644
index 0000000..38ad8cf
--- /dev/null
+++ b/FAQ.d/FAQ.GoDaddy.txt
@@ -0,0 +1,23 @@
+$Id: FAQ.GoDaddy.txt,v 1.1 2021/05/21 18:19:29 gilles Exp gilles $
+
+This documentation is also available online at
+https://imapsync.lamiral.info/FAQ.d/
+https://imapsync.lamiral.info/FAQ.d/FAQ.GoDaddy.txt
+
+
+=======================================================================
+ Imapsync tips for GoDaddy
+=======================================================================
+
+
+Questions answered in this FAQ are:
+
+Q. What are the GoDaddy settings for imapsync?
+
+Now the questions again with their answers.
+
+=======================================================================
+Q. What are the GoDaddy settings for imapsync?
+
+R. The imap server is imap.secureserver.net
+
diff --git a/FAQ.d/FAQ.Messages_Selection.txt b/FAQ.d/FAQ.Messages_Selection.txt
index 705bddc..480cca2 100644
--- a/FAQ.d/FAQ.Messages_Selection.txt
+++ b/FAQ.d/FAQ.Messages_Selection.txt
@@ -1,5 +1,5 @@
#!/bin/cat
-$Id: FAQ.Messages_Selection.txt,v 1.17 2021/01/23 13:01:00 gilles Exp gilles $
+$Id: FAQ.Messages_Selection.txt,v 1.18 2021/07/04 23:05:24 gilles Exp gilles $
This document is also available online at
https://imapsync.lamiral.info/FAQ.d/
@@ -34,8 +34,9 @@ Q. What are the selection criteria available with --search option?
Q. What messages imapsync syncs by default?
R1. By default, Imapsync syncs all messages, except duplicates.
+ If you want to sync duplicates, add the option --syncduplicates
-R2. You can alter the default all messages selection by using one or
+R2. You can alter the default "all messages selected" by using one or
more of the following options:
Extract from the README https://imapsync.lamiral.info/README
diff --git a/FAQ.d/FAQ.Messages_Too_Big.txt b/FAQ.d/FAQ.Messages_Too_Big.txt
index 5b756ec..aba8cfd 100644
--- a/FAQ.d/FAQ.Messages_Too_Big.txt
+++ b/FAQ.d/FAQ.Messages_Too_Big.txt
@@ -1,5 +1,5 @@
#!/bin/cat
-$Id: FAQ.Messages_Too_Big.txt,v 1.4 2020/10/21 09:21:48 gilles Exp gilles $
+$Id: FAQ.Messages_Too_Big.txt,v 1.5 2021/06/22 15:31:39 gilles Exp gilles $
This document is also available online at
https://imapsync.lamiral.info/FAQ.d/
@@ -21,59 +21,67 @@ Now the questions again with their answers.
=======================================================================
Q. What does imapsync with big messages?
-R. By default, imapsync checks if the host2 imap server announces a
- message size limit with "APPENDLIMIT=xxxx" in its CAPABILITY response.
- Then imapsync takes this value to set automatically the --maxsize
- option, unless --maxsize is already set on the command line
- and has a smaller value than the APPENDLIMIT value.
+R. By default, imapsync checks if the host2 imap server announces a
+message size limit with "APPENDLIMIT=xxxx" in its CAPABILITY response.
+Then imapsync takes this value to set automatically the --maxsize
+option, unless --maxsize is already set on the command line and has a
+smaller value than the APPENDLIMIT value.
- If the host2 imap server doesn't announce any message size
- limit then imapsync syncs messages no matter their sizes.
+If the host2 imap server doesn't announce any message size limit then
+imapsync syncs all messages no matter their sizes.
- When a message is copied to the destination server, the destination
- server accepts it or not but it does it as a whole, it takes the
- full message or nothing. Nothing triggers an error in imapsync.
+When a message is copied to the destination server, the destination
+server accepts it or not but it does it as a whole, it takes the full
+message or nothing. Nothing triggers an error in imapsync.
- * Gmail announces APPENDLIMIT=35651584 (October 2020).
+ * Gmail announces APPENDLIMIT=35651584 (June 2021).
* Office365 announces nothing.
- * Dovecot announces nothing.
+ * Dovecot announces nothing.
+ * Usually imap servers announce nothing.
=======================================================================
Q. What can I do to transfer messages bigger than what allows the
imap destination server?
-R1. A solution is to truncate the message to the maximum size allowed
- before copying it to host2. That's a little dirty but it's ok
- if you prefer having a truncated message than no message
- at all. The attachments after the truncation won't be available
- but everything before should be ok. It may also depends
- on the software tool reading the email message.
+R1. A solution is to truncate the message to the maximum size allowed
+before copying it to host2. That's a little dirty but it's ok if you
+prefer having a truncated message than no message at all. The
+attachments after the truncation won't be available but everything
+before should be ok. It may also depend on the software tool reading
+the email message.
-For example,
-Gmail currently limits messages to 35651584 bytes (October 2020),
+For example, Gmail currently limits messages to 35651584 bytes,
+aka 34 MiB (June 2021),
Starting with imapsync release 1.938 option --truncmess xxxx truncates
-messages bigger than the given size xxxx.
+messages bigger than the given size xxxx, size given in bytes.
imapsync --truncmess 35651584 --appendlimit 1000000000000
+The --appendlimit option is only needed imap servers that offer the
+APPENDLIMIT capability, for example, Gmail. Using it doesn't hurt
+anyway.
+
Prior to imapsync release 1.938, instead of --truncmess:
On Linux, use:
imapsync ... --pipemess 'perl -0ne "print substr \$_,0,35651584" '
-On windows, use:
+On windows, use (I'm not sure of, not tested yet):
- I'm not sure of (not tested yet):
-
imapsync ... --pipemess "perl -0ne 'print substr $_,0,35651584' "
-
-R2. A not so dirty solution would be to transform the message and
- include links to the big attachments, instead of the attachments.
- Well, not done yet and too much complicted compared to the simple
- solution which is to allow big messages on the destination account.
+
+R2. A not-so-dirty solution would be to transform the big messages,
+replace the attachments with links to the attachments stored elsewhere.
+Well, it's not done and it's too much complicated compared to a simpler
+solution which is to allow bigger messages on the destination account.
+
+As time goes on, disk space is cheaper and cheaper. Don't make the
+new user account, the destination account, worst than his previous,
+buy disks. Monitor and rule your resources, not the users.
=======================================================================
-=======================================================================
\ No newline at end of file
+=======================================================================
+
diff --git a/FAQ.d/FAQ.Office365.txt b/FAQ.d/FAQ.Office365.txt
index 38d14cd..4e159c4 100644
--- a/FAQ.d/FAQ.Office365.txt
+++ b/FAQ.d/FAQ.Office365.txt
@@ -1,14 +1,14 @@
-$Id: FAQ.Office365.txt,v 1.20 2021/03/17 20:42:35 gilles Exp gilles $
+$Id: FAQ.Office365.txt,v 1.23 2021/07/06 02:30:01 gilles Exp gilles $
This documentation is also available online at
https://imapsync.lamiral.info/FAQ.d/
https://imapsync.lamiral.info/FAQ.d/FAQ.Office365.txt
-=======================================================================
+======================================================================
Imapsync tips for Office365.
-=======================================================================
+======================================================================
Questions answered in this FAQ are:
@@ -65,7 +65,7 @@ Q. Couldn't create folder [trash] "Mailbox already exists".
Now the questions again with their answers.
-=======================================================================
+======================================================================
Q. Can I use imapsync to transfer from or to Office365 accounts?
R. Yes. But IMAP access to Office365 account is not always allowed by default
@@ -74,12 +74,12 @@ R. Yes. But IMAP access to Office365 account is not always allowed by default
https://docs.microsoft.com/en-us/exchange/clients-and-mobile-in-exchange-online/pop3-and-imap4/enable-or-disable-pop3-or-imap4-access
https://docs.microsoft.com/en-us/exchange/troubleshoot/configure-mailboxes/pop3-imap-owa-activesync-office-365
-=======================================================================
+======================================================================
Q. Does imapsync support OAUTH2 authentication for Office365 accounts?
R. No. But I plan to add it during the year 2021.
-=======================================================================
+======================================================================
Q. How to sync from Office365 to XXX?
R. On Windows, use:
@@ -90,13 +90,13 @@ On Unix, use:
imapsync ... --office1
-Option --office1 is like (release 1.970):
+Option --office1 is like (release 1.970 or higher):
imapsync ... --host1 outlook.office365.com \
--ssl1 \
--exclude "^Files$"
-=======================================================================
+======================================================================
Q. How to sync from XXX to Office365
R0. IMAP is not enabled by default on Office365, see how to enable it:
@@ -112,7 +112,7 @@ R. Here is a command-line resume that solves most encountered issues when
imapsync ... --office2
-which is equivalent to (in imapsync release 1.870):
+which is equivalent to (in imapsync release 1.870 or higher):
imapsync ... \
--host2 outlook.office365.com \
@@ -140,7 +140,7 @@ Use it like this:
It often does some miracles on messages.
-=======================================================================
+======================================================================
Q. For Office365 I have double and triple-checked the username and
password spelling but I still get a "LOGIN failed". Any clue?
@@ -172,7 +172,7 @@ R5. Triple check the hostname then. Try all of these:
* imap-mail.outlook.com
* imap.outlook.com
-=======================================================================
+======================================================================
Q. I see "NO Maximum size of appendable message has been exceeded"
What can I do with that?
@@ -198,7 +198,7 @@ values on the migration accounts in the source and target tenants.
Thanks to Sean McDougall, Ian Thomas & Matt Wilks from Toronto
for this FAQ item.
-=======================================================================
+======================================================================
Q. The imap connection to Office365 is not working very efficiently,
is there a solution to fix that?
@@ -206,7 +206,7 @@ R. Yes. Try DavMail
http://davmail.sourceforge.net/
I don't use it myself but a user, Yannick Palanque, reported great results using it.
-=======================================================================
+======================================================================
Q. The sync fails with many "Trying command when NOT connected!".
What can I do?
@@ -215,7 +215,7 @@ R. The --debugimap option can show you more details, especially some
"BAD Request is throttled. Suggested Backoff Time: 178755 milliseconds"
In that case, see the next faq item and its fixes.
-=======================================================================
+======================================================================
Q. Office365 throttles the sync and says:
"Request is throttled. Suggested Backoff Time: 299961 milliseconds".
What can I do with that?
@@ -249,14 +249,14 @@ R2. Play with options --maxbytespersecond or --maxmessagespersecond
I don't know the upper value that avoids the default throttling from 0365
and I guess it changes over time.
-=======================================================================
+======================================================================
Q. Office365 refuses to create the folder named "Files" with the error
"NO Folder name is reserved". What happens?
R. The folder Files is a standard folder in Office365.
It should not be synced in IMAP. See the next question.
-=======================================================================
+======================================================================
Q. Office365 users complain that a folder named "Files" contains
messages with no sender.
@@ -296,7 +296,7 @@ https://answers.microsoft.com/en-us/msoffice/forum/msoffice_o365admin-mso_dep365
(This question/answer is taken quasi verbatim from Perttu Aaltonen)
-=======================================================================
+======================================================================
Q. From XXX to Office365, read receipts are all resent again after sync.
Even for old messages. How can I fix that?
@@ -330,7 +330,7 @@ X-Disposition-Notification-To: blabla
Thanks to David Karnowski for pointing and solving this issue.
-=======================================================================
+======================================================================
Q. DEBUG: IO/Socket/SSL.pm:1043: local error: SSL read error
DEBUG: IO/Socket/SSL.pm:1043: local error: SSL read error
@@ -346,7 +346,7 @@ R2. Another solution is to remove --tls or --ssl options for Exchange
R3. See also the FAQ FAQ.SSL_errors.txt
https://imapsync.lamiral.info/FAQ.d/FAQ.SSL_errors.txt
-=======================================================================
+======================================================================
Q. From XXX Office365 I get this error message sometimes:
"BAD Command Argument Error 11". What does it mean?
@@ -371,26 +371,22 @@ R. This error message comes from the Office365 IMAP server when it
* Some messages have some lines too long. Use option --maxlinelength
to skip messages whose max line length is over some bytes.
--maxlinelength 1000 is an RFC2822 must but most servers support
- higher values. Exchange supports 9900 characters line length:
-
- imapsync ... --maxlinelength 9900
-
- Office365 supports 10500 characters line length:
+ higher values. Office365 supports 10500 characters line length:
imapsync ... --maxlinelength 10500
In case you prefer fixing messages with long lines the hard way,
- instead of skipping them with --maxlinelength 9900, just use:
+ instead of skipping them with --maxlinelength 10500, just use:
On Windows
- imapsync ... --regexmess "s,(.{9900}),$1\r\n,g"
+ imapsync ... --regexmess "s,(.{10500}),$1\r\n,g"
On Unix
- imapsync ... --regexmess 's,(.{9900}),$1\r\n,g'
+ imapsync ... --regexmess 's,(.{10500}),$1\r\n,g'
-Have also in mind that Exchange closes the connection after 10 errors
+Have also in mind that Office365 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 says goodbye,
+Office365, which means Office365 leaves the session and says goodbye,
come back later. Redo some sync then.
On Linux, there is a good Python script in the tarball that can
@@ -404,7 +400,7 @@ It often does some miracles on messages.
It's called fix_email_for_exchange because Office365 is Exchange,
or at least started to be an Exchange server with the same issues.
-=======================================================================
+======================================================================
Q. From XXX to Office365 the flag Flagged does not seem to be well synced.
What can I do?
@@ -419,7 +415,7 @@ does in detail with flags.
The magic of this trick is on ignoring the \Flagged flag on the first
sync and setting it on the second sync, with STORE instead of APPEND.
-This Exchange bug seems that Exchange gets and sets well the Flagged
+This Office365 bug seems that Office365 gets and sets well the Flagged
flag with APPEND in IMAP but then it forgets it with other protocols;
With STORE it sets and gets the "\Flagged" flag everywhere.
@@ -473,7 +469,7 @@ Subject: RE: [imapsync] Office 365 - 'Master User'?
Date: Mon, 1 Jun 2015 17:53:54 +0000
-=======================================================================
+======================================================================
Q. Couldn't create folder [trash] "Mailbox already exists".
R. Some servers take care of character cases in folder names,
@@ -506,5 +502,5 @@ R. Some servers take care of character cases in folder names,
on host1 but are considered the same on destination host2 because of
case sensitivities and insensitivities, use --nomixfolders
-=======================================================================
-=======================================================================
+======================================================================
+======================================================================
diff --git a/FAQ.d/FAQ.OnlineUI.txt b/FAQ.d/FAQ.OnlineUI.txt
index 8741ea2..7d6b74f 100644
--- a/FAQ.d/FAQ.OnlineUI.txt
+++ b/FAQ.d/FAQ.OnlineUI.txt
@@ -1,5 +1,5 @@
#!/bin/cat
-$Id: FAQ.OnlineUI.txt,v 1.27 2021/04/24 16:57:50 gilles Exp gilles $
+$Id: FAQ.OnlineUI.txt,v 1.29 2021/05/05 21:38:32 gilles Exp gilles $
This document is also available online at
https://imapsync.lamiral.info/FAQ.d/
@@ -15,17 +15,17 @@ Questions answered in this FAQ are:
Q. How secure is the online visual user interface /X?
Q. Does the online service store any sensitive information
- like my passwords?
+like my passwords?
-Q. Shall I have issues when the browser times out? What happens
- if the browser connection is closed for whatever reason?
+Q. Shall I have issues when the browser times out?
+What happens if the browser connection is closed for whatever reason?
Q. Shall I have issues when the webserver times out? What happens
- if the webserver closes the connection for whatever reason?
+if the web server closes the connection for whatever reason?
Q. The sync stalls at the beginning, just after a line like:
- "Host1: xxx says it has CAPABILITY for AUTHENTICATE LOGIN"
- What is the problem?
+"Host1: xxx says it has CAPABILITY for AUTHENTICATE LOGIN"
+What is the problem?
Now the questions again with their answers.
@@ -33,8 +33,8 @@ Now the questions again with their answers.
Q. How secure is the online visual user interface /X?
R0. Well, I don't know if asking the provider whether his online
- service is secure or not would be of any interest.
- Let's do it anyway, you'll be the judge.
+service is secure or not would be of any interest.
+Let's do it anyway, you'll be the judge.
R1. Some figures
@@ -43,11 +43,11 @@ Date of this report: 22 April 2021.
The online imapsync service /X started 9 January 2017
(1564 days of service).
-On average, /X has 51 users per day lunching in mean 6
-different migrations, from just one launch to many (hundreds).
+On average, /X has 51 users per day, each user lunches on average
+6 account migrations, from just one launch to many (hundreds).
-The total volume /X transferred is around 210 TiB from nearly
-450 000 imap account migrations and 700 million email messages.
+The total volume /X transferred so far is around 210 TiB coming
+from nearly 450 000 imap account migrations and 700 million email messages.
R2. Pros & Cons
@@ -59,17 +59,17 @@ Because of the HTTPS usage, what the users enter in their browser,
the imap logins and passwords, can't be eavesdropped on the network.
Imapsync itself takes care of encryption for the imap sessions,
-if possible: It tries SSL first on port 993, then TLS on port 143
-if the servers announce TLS, then no encryption at all.
+if possible. First, imapsync tries to use SSL on port 993,
+then TLS on port 143 if the servers announce TLS, then no encryption at all.
Concerning encryption, what is done with the source imap server host1
is independent of what is done with the destination imap server host2.
On the date of 22 April 2021, there is no security problem
detected or reported to me (Gilles LAMIRAL), so far.
Feel free to attack the service and feel free to report any
-hole encountered. Have in mind I can watch what you try
+hole encountered. Have in mind I can watch what you do
from the server-side and take measures if the service suffers from
-your acts.
+your acts. Drop me a note before will be fair play.
As the owner of the service, it could have been 450 000 pairs of
credentials collected and nearly 210 terabytes of email messages.
@@ -77,7 +77,7 @@ I haven't kept them but I can't prove I haven't. It's just trust,
like nearly every online service in the universe.
The imap server certificates are not checked for authenticity
-(by default) because too many imap servers are crappy configured
+(by default) because too many imap servers are crappy configured
regarding certified certificates.
This default behavior is chosen like this because users of /X
@@ -94,7 +94,7 @@ That's not good at all but what "comforts" me is that if an
imap server does only clear text transfers, then it's also true
for all the imap sessions the account owner encounters,
imapsync is just one of them; the imap servers are then always
-unsecure for any imap software client.
+unsecured for any imap software client.
Last point, who could be sure that no cracker cracked the online
@@ -106,24 +106,25 @@ the sync is a safe and recommended practice!
=====================================================================
Q. Does the online service store any sensitive information
- like my passwords?
+like my passwords?
No.
The online passwords are kept by your browser. The goal is
that the next time you run a sync from your browser, all the
-parameters are there without having to re-enter them.
+parameters are already there without having to re-enter them.
The save is done when you click on the "Sync or resync" green
-button. So, if you don't want your browser to keep your good password,
+button. So, if you don't want your browser to keep your password,
enter a wrong one or empty the password field and click
on the "Sync or resync" green button, the wrong password
-will be saved in your browser and the sync won't be done,
+will be saved in your browser and no sync will be done,
since a good login is mandatory to do anything on your mailboxes.
=====================================================================
-Q. Shall I have issues with the browser timing out? What happens
- if the browser connection is closed for whatever reason?
+Q. Shall I have issues with the browser timing out?
+What happens if the browser connection is closed for whatever reason?
-R. It stops the imapsync process, ie, the sync is ended right away.
+R. A browser connection closed closes also the imapsync process,
+ie, the sync is ended right away.
Further comments on this behavior.
@@ -157,29 +158,29 @@ the logfile running the sync like a "tail -f" command (isn't that magic?).
=====================================================================
Q. Shall I have issues when the webserver times out? What happens
- if the webserver closes the connection for whatever reason?
+if the web server closes the connection for whatever reason?
-R. If the webserver closes the connection then usually it kills
- imapsync process and the imap connections as well.
- To fix this issue, see the document INSTALL.OnlineUI.txt
- and search for "Timeout" in it.
+R. If the webserver closes the connection then usually it also
+kills the imapsync process and the imap connections as well.
+
+To fix this issue, see the document INSTALL.OnlineUI.txt
+and search for "Timeout" in it.
- Tip: If the connections close for huge folders and always after
- 300 seconds or 60 seconds then it looks like a webserver timeout.
- Apache 2.2 timeout is 300 seconds.
- Apache 2.4 timeout is 60 seconds.
+Tip: If the connections close for huge folders and always after
+300 seconds or 60 seconds then it looks like a web server timeout.
+Apache 2.2 timeout is 300 seconds.
+Apache 2.4 timeout is 60 seconds.
=====================================================================
Q. The sync stalls at the beginning, just after a line like:
- "Host1: xxx says it has CAPABILITY for AUTHENTICATE LOGIN"
- What is the problem?
+"Host1: xxx says it has CAPABILITY for AUTHENTICATE LOGIN"
+What is the problem?
R. I've seen this issue on /X with the imap server
- CommuniGate Pro IMAP Server 6.0.11
- The issue looks related to special characters in the password.
- Solution for now: change the password, keep only
- standard (ASCII) alphanumeric characters ABC-YZ abc-yz 012-89.
-
+CommuniGate Pro IMAP Server 6.0.11
+The issue looks related to special characters in the password.
+Solution for now: change the password, keep only standard (ASCII)
+alphanumeric characters ABC-YZ abc-yz 012-89.
=====================================================================
=====================================================================
diff --git a/FAQ.d/FAQ.Oracle-UCS.txt b/FAQ.d/FAQ.Oracle-UCS.txt
deleted file mode 100644
index af621d9..0000000
--- a/FAQ.d/FAQ.Oracle-UCS.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/cat
-$Id: FAQ.Oracle-UCS.txt,v 1.5 2018/05/24 11:34:30 gilles Exp gilles $
-
-This document is also available online at
-https://imapsync.lamiral.info/FAQ.d/
-https://imapsync.lamiral.info/FAQ.d/FAQ.Oracle-UCS.txt
-
-
-=======================================================================
- Imapsync tips for Oracle-UCS. Specific issues.
-=======================================================================
-
-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]/'
-
-
-=======================================================================
-=======================================================================
diff --git a/FAQ.d/FAQ.Release_Checklist.txt b/FAQ.d/FAQ.Release_Checklist.txt
index bb382d2..92b705e 100644
--- a/FAQ.d/FAQ.Release_Checklist.txt
+++ b/FAQ.d/FAQ.Release_Checklist.txt
@@ -1,5 +1,5 @@
#!/bin/cat
-$Id: FAQ.Release_Checklist.txt,v 1.18 2020/01/06 10:47:02 gilles Exp gilles $
+$Id: FAQ.Release_Checklist.txt,v 1.20 2021/07/06 02:29:51 gilles Exp gilles $
This documentation is also available online at
https://imapsync.lamiral.info/FAQ.d/
@@ -23,10 +23,14 @@ Checklist before release a new release:
- Review the newsletter by running:
m4 -P W/ml_announce.in.txt
+- Update W/rsync_exclude_dist.txt
+- Update .gitignore
+
- Review the TODO file and mark done what is done.
- Review the general FAQ.d/FAQ.General.txt
- Report values of --gmail1 --gmail2 to FAQ.Gmail.txt
-- Report values of --exchange* --office* to FAQ.Exchange.txt
+- Report values of --exchange* to FAQ.Exchange.txt
+- Report values of --office* to FAQ.Office365.txt
- /X verify direct cgi
- /X verify under noscript with firefox
diff --git a/FAQ.d/FAQ.SSL_errors.txt b/FAQ.d/FAQ.SSL_errors.txt
index 58aaaeb..508a587 100644
--- a/FAQ.d/FAQ.SSL_errors.txt
+++ b/FAQ.d/FAQ.SSL_errors.txt
@@ -1,5 +1,5 @@
#!/bin/cat
-$Id: FAQ.SSL_errors.txt,v 1.14 2021/04/19 11:47:44 gilles Exp gilles $
+$Id: FAQ.SSL_errors.txt,v 1.15 2021/06/22 15:35:10 gilles Exp gilles $
This document is also available online at
https://imapsync.lamiral.info/FAQ.d/
@@ -192,7 +192,9 @@ EnRlc3QxLmxhbWlyYWwuaW5mbzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
ggEBAMUTJVdrTl86nDI2yO6Vz5l1qxMMPqJylQcgi9vDHpwsnUq5HGPv+qZNhM69
...
-After an complete server update ("apt update && apt upgrade"):
+
+
+After an complete server update ("apt update && apt upgrade && /etc/init.d/dovecot restart"):
echo | openssl s_client -crlf -connect test1.lamiral.info:993
CONNECTED(00000003)
diff --git a/FAQ.d/FAQ.Security.txt b/FAQ.d/FAQ.Security.txt
index 2d4e796..afbc72c 100644
--- a/FAQ.d/FAQ.Security.txt
+++ b/FAQ.d/FAQ.Security.txt
@@ -1,5 +1,5 @@
#!/bin/cat
-# $Id: FAQ.Security.txt,v 1.22 2020/06/30 17:32:39 gilles Exp gilles $
+# $Id: FAQ.Security.txt,v 1.23 2021/06/22 15:32:10 gilles Exp gilles $
This document is also available online at
https://imapsync.lamiral.info/FAQ.d/
@@ -16,26 +16,6 @@ SSL: going to encryption before the imap session start.
TLS: going to encryption after the imap session start but before
the credential are sent. It is on port 143.
-Explanation:
-
-To transfer emails over an encrypted connection, the imapsync parameters --ssl1 and ssl2 are preferred over the parameters --tls1 and --tls2.
-
-This might be confusing because the terms "SSL" and "TLS" can have different meanings in the contexts of IT security and email. Imapsync uses both terms in the context of email, not of IT security.
-
-In IT security, SSL refers to the deprecated Secure Sockets Layer protocols. SSL 2.0 has been depreated in 2011 based on RFC 6176 (see https://datatracker.ietf.org/doc/rfc6176/ ) and SSL 3.0 has been deprecated in 2015 based on RFC 7568 (see https://datatracker.ietf.org/doc/rfc7568/ ). TLS refers to the more modern Transport Layer Security protocols. TLS 1.0 and TLS 1.1 have been deprecated in 2020 with RFC 8996 (see https://datatracker.ietf.org/doc/rfc8996/ ). Current versions of TLS are TLS 1.2 (published in 2008) and TLS 1.3 (published in 2018).
-
-SSL should not be used anymore. When using TLS, only the non-deprecated versions should be used. Given this information, it might be confusing why the --ssl1 and --ssl2 parameters are preferred over the --tls1 and --tls2 parameters. The reason is that imapsync uses the terms in the context of email and not of IT security.
-
-In an email context, the parameters --ssl1 and --ssl2 refer to the protocol family of both SSL and (!) TLS. In contrast, the parameters --tls1 and --tls2 refer to the STARTTLS command based on opportunistic encryption. Opportunistic encryption means that the system attempts to encrypt the communications channel but falls back to unencrypted communications if the encryption cannot be established.
-
-The problem is that the parameters --tls1 and --tls2 seem to offer more security by seemingly referring the more modern TLS protocols, when these parameters are in fact less secure (than --ssl1 and --ssl2) because they are actually referring to STARTTLS with opportunistic enryption. Therefore the parameters --ssl1 and ssl2 are preferred over the parameters --tls1 and --tls2.
-
-Summary:
-
-Parameters --ssl1 and --ssl2: Force an encrypted connection based on the SSL/TLS protocol family. Fails if an encryption cannot be established. More secure than --tls1 and --tls2. Can be specified with --sslargs1 and --sslargs2.
-
-Parameters --tls1 and --tls2: Try to establish an encrypted connection based on STARTTLS. Does not fail if an encryption cannot be established meaning an encrypted connection cannot be garanteed [UNSURE]. Less secure than --ssl1 and --ssl2.
-
=======================================================================
Q. Is running this program a secure method of transferring emails?
Are there any security concerns?
diff --git a/FAQ.d/FAQ.Two_Ways_Sync.txt b/FAQ.d/FAQ.Two_Ways_Sync.txt
index e70096b..32c1eee 100644
--- a/FAQ.d/FAQ.Two_Ways_Sync.txt
+++ b/FAQ.d/FAQ.Two_Ways_Sync.txt
@@ -1,4 +1,4 @@
-$Id: FAQ.Two_Ways_Sync.txt,v 1.4 2021/02/01 15:43:33 gilles Exp gilles $
+$Id: FAQ.Two_Ways_Sync.txt,v 1.5 2021/06/10 11:21:09 gilles Exp gilles $
This documentation is also available online at
https://imapsync.lamiral.info/FAQ.d/
@@ -13,14 +13,14 @@ https://imapsync.lamiral.info/FAQ.d/FAQ.Two_Ways_Sync.txt
Questions answered in this FAQ are:
Q. Can Imapsync do a good "two ways" sync?
- No. Why?
+ Short answer: no, not a good one. Why?
Now the questions again with their answers.
=======================================================================
Q. Can Imapsync do a good "two ways" sync?
- No. Why?
+ Short answer: no, not a good one. Why?
R. Imapsync can't do good two ways syncs.
@@ -40,10 +40,10 @@ deletions, or movings, messages movings across folders, folders
movings, and also folders renamings. Deletions and moves are ambiguous
changes when combined with creations on the opposite side.
-For example, when a message is deleted from A by a user, imapsync
+For example, if a message is deleted from A by a user, then imapsync
cannot know whether it is a message deleted from A that has to be
-deleted in B (what the user did) or a missing message from B that has
-to be copied to A.
+deleted in B (what the user actually did) or a missing message on A
+that has to be copied from B.
But if you know the answer yourself, that missing messages on one side
A are deleted messages that have to be deleted on the other side then
@@ -52,13 +52,16 @@ run a sync with the --delete2 option from A to B.
If you know that the missing messages on A are missing messages from B
that has to be copied to A then run a sync from B to A.
-If you know it's a mixed scenario then you are in trouble and so you
-end up with a not very good "two ways" sync. I suggest avoiding
-deletions in that case, which is the default imapsync behavior.
+If you know it's a mixed scenario, some deletions/moves on A,
+and some deletions/moves on B, but not the same, then you are in
+trouble and so you end up with a not very good "two ways" sync.
+I suggest to avoid imapsync to do deletions in that case, which is
+the default imapsync behavior.
-With a two ways sync, the mailbox user is very surprised and
+With a two ways sync, the account user is very surprised and
disapointed when his actions (deletions, renamings, or movings) come
-back.
+back: the deletions are cancelled, the renamings and movings end up
+with duplicates.
=======================================================================
=======================================================================
diff --git a/FAQ.d/FAQ.UCS.txt b/FAQ.d/FAQ.UCS.txt
new file mode 100644
index 0000000..7d6a765
--- /dev/null
+++ b/FAQ.d/FAQ.UCS.txt
@@ -0,0 +1,37 @@
+#!/bin/cat
+$Id: FAQ.UCS.txt,v 1.8 2021/05/29 08:06:51 gilles Exp gilles $
+
+This document is also available online at
+https://imapsync.lamiral.info/FAQ.d/
+https://imapsync.lamiral.info/FAQ.d/FAQ.UCS.txt
+
+
+=======================================================================
+ Imapsync tips for UCS. Specific issues.
+=======================================================================
+
+UCS: Univention Corporate Server
+https://www.univention.com/
+
+UCS was previously Oracle-UCS, Sun JES, IPlanet, etc.
+The underlying code was the free open source imap software server Cyrus.
+Now UCS uses Dovecot since UCS 4.0-2 (July 2015)
+
+Quoting the page
+https://docs.software-univention.de/cyrus-4.2.html
+"Since Univention Corporate Server version 4.0-2 Dovecot is used as
+the default IMAP and POP3 server."
+
+So, when you deal with UCS issues, follow
+https://imapsync.lamiral.info/FAQ.d/FAQ.Cyrus.txt
+https://imapsync.lamiral.info/FAQ.d/FAQ.Dovecot.txt
+Also:
+https://imapsync.lamiral.info/FAQ.d/FAQ.APPEND_errors.txt
+
+
+
+
+
+
+=======================================================================
+=======================================================================
diff --git a/FAQ.d/FAQ.Yahoo.txt b/FAQ.d/FAQ.Yahoo.txt
index 41b1110..198a401 100644
--- a/FAQ.d/FAQ.Yahoo.txt
+++ b/FAQ.d/FAQ.Yahoo.txt
@@ -1,5 +1,5 @@
-$Id: FAQ.Yahoo.txt,v 1.10 2021/04/20 21:47:02 gilles Exp gilles $
+$Id: FAQ.Yahoo.txt,v 1.12 2021/05/04 11:04:51 gilles Exp gilles $
This document is also available online at
https://imapsync.lamiral.info/FAQ.d/
@@ -10,6 +10,31 @@ https://imapsync.lamiral.info/FAQ.d/FAQ.Yahoo.txt
Imapsync tips for Yahoo.
=======================================================================
+Questions answered in this FAQ are:
+
+Q. Synchronizing from Yahoo to XXX
+
+Q. Synchronizing from XXX to Yahoo
+
+Now the questions again with their answers.
+
+Some explanation about the options given later:
+
+https://imapsync.lamiral.info/README
+...
+ --noabletosearch : Makes --minage and --maxage options use the internal
+ dates given by a FETCH imap command instead of the
+ "Date:" header. Internal date is the arrival date
+ in the mailbox.
+ --noabletosearch equals --noabletosearch1 --noabletosearch2
+
+ --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.
+
+I'm not sure anymore about the need of --noabletosearch with Yahoo, maybe
+they fixed the issue about the standard imap searching command SEARCH
+they didn't honor before.
=======================================================================
Q. Synchronizing from Yahoo to XXX
@@ -20,11 +45,11 @@ Example:
./imapsync \
--host1 imap.mail.yahoo.com \
- --user1 billy \
- --password1 secret \
+ --user1 Billy@yahoo.com \
+ --password1 billysecreta \
--host2 XXX \
- --user2 billy \
- --password2 secret \
+ --user2 Billy@other.com \
+ --password2 billysecretb \
--noabletosearch
@@ -53,6 +78,28 @@ Another solution:
since it is not in the predefined apps.
* Use this password with imapsync.
+=======================================================================
+Q. Synchronizing from XXX to Yahoo
+
+R. Example:
+
+ ./imapsync \
+ --host1 XXX \
+ --user1 Billy@other.com \
+ --password1 billysecreta \
+ --host2 imap.mail.yahoo.com \
+ --user2 Billy@yahoo.com \
+ --password2 billysecretb \
+ --noabletosearch --regexmess "s{(?Back to Imapsync main page." ..
AddDescription "Where this Description column comes from." htaccess.txt
+AddDescription "Private." memo
AddDescription "APPEND errors." FAQ.Admin_Authentication.txt
AddDescription "Authenticate via an admin account." FAQ.APPEND_errors.txt
AddDescription "Archiving tips." FAQ.Archiving.txt
AddDescription "Authentication failures." FAQ.Authentication_failure.txt
+
+AddDescription "Bandwidth questions tips." FAQ.Bandwidth.txt
AddDescription "Big mailboxes tips." FAQ.Big_Mailbox.txt
+
AddDescription "Changing folders names." FAQ.Folders_Mapping.txt
AddDescription "Connection issues." FAQ.Connection.txt
AddDescription "Contacts & Calendars & Chat issues." FAQ.Contacts_Calendars.txt
+AddDescription "Cyrus accounts." FAQ.Cyrus.txt
+
+
AddDescription "Dates issues." FAQ.Dates.txt
AddDescription "David Tobit accounts." FAQ.David_Tobit.txt
+AddDescription "DBmail accounts." FAQ.DBmail.txt
AddDescription "Docker usage." FAQ.Docker.txt
AddDescription "Domino accounts." FAQ.Domino.txt
AddDescription "Dovecot accounts." FAQ.Dovecot.txt
@@ -25,15 +33,21 @@ AddDescription "Selecting folders." FAQ.Fold
AddDescription "Folders sizes with Imapsync." FAQ.Folders_Sizes.txt
+
+
+AddDescription "FirstClass accounts." FAQ.FirstClass.txt
AddDescription "Flags tips and issues." FAQ.Flags.txt
AddDescription "General Data Protection Regulation (GDPR)." FAQ.GDPR.txt
AddDescription "General and pot-pourri issues" FAQ.General.txt
AddDescription "Gmail accounts." FAQ.Gmail.txt
+AddDescription "IceWarp accounts." FAQ.IceWarp.txt
AddDescription "ISP tips." FAQ.ISP.txt
AddDescription "Kerio accounts." FAQ.Kerio.txt
+AddDescription "MailEnable accounts." FAQ.MailEnable.txt
AddDescription "Massive/bulk migrations." FAQ.Massive.txt
AddDescription "Memory issues." FAQ.Memory.txt
AddDescription "Migration Plan." FAQ.Migration_Plan.txt
+AddDescription "Office365 accounts." FAQ.Office365.txt
AddDescription "The Online UI service Q&R." FAQ.OnlineUI.txt
AddDescription "Password & special characters on Windows." FAQ.Passwords_on_Windows.txt
AddDescription "Password & special characters on Unix." FAQ.Passwords_on_Unix.txt
@@ -43,7 +57,7 @@ AddDescription "Principles & design decisions." FAQ.Prin
AddDescription "Selecting messages." FAQ.Messages_Selection.txt
AddDescription "How to transfer too big messages." FAQ.Messages_Too_Big.txt
AddDescription "Why the imapsync web site looks so old?" FAQ.Old_Style_Web_Design.txt
-AddDescription "Oracle-UCS accounts." FAQ.Oracle-UCS.txt
+AddDescription "UCS accounts." FAQ.UCS.txt
AddDescription "Checklist before release a new release." FAQ.Release_Checklist.txt
AddDescription "Guidelines to report bugs." FAQ.Reporting_Bugs.txt
diff --git a/INSTALL.d/Dockerfile b/INSTALL.d/Dockerfile
old mode 100644
new mode 100755
index c44f2bc..b3e93a4
--- a/INSTALL.d/Dockerfile
+++ b/INSTALL.d/Dockerfile
@@ -3,65 +3,83 @@
# $Id: Dockerfile,v 1.30 2020/03/26 07:15:04 gilles Exp gilles $
# I use the following command to build the image:
#
-# docker build -t gilleslamiral/imapsync .
+# docker build -t gilleslamiral/imapsync .
#
# where this Dockerfile is in the current directory
-#
+#
# I thank you very much
# I like thanks
# I like stars
# I also like (and need) money
-# Number of imapsync images pulled so far (2020_03_26): 84354
+# Number of imapsync images pulled so far (2021_05_29): 368881
# Command used:
# curl -s https://hub.docker.com/v2/repositories/gilleslamiral/imapsync/ | jq '.pull_count'
-# Ubuntu latest points to current LTS release
+# Debian Buster is Debian 10
-FROM debian:buster
+FROM debian:buster
LABEL maintainer="Gilles LAMIRAL " \
description="Imapsync" \
documentation="https://imapsync.lamiral.info/#doc"
-RUN set -xe && \
- apt-get update && \
- apt-get install -y \
- libauthen-ntlm-perl \
- libcgi-pm-perl \
- libcrypt-openssl-rsa-perl \
- libdata-uniqid-perl \
- libencode-imaputf7-perl \
- libfile-copy-recursive-perl \
- libfile-tail-perl \
- libio-socket-inet6-perl \
- libio-socket-ssl-perl \
- libio-tee-perl \
- libhtml-parser-perl \
- libjson-webtoken-perl \
- libmail-imapclient-perl \
- libparse-recdescent-perl \
- libmodule-scandeps-perl \
- libreadonly-perl \
- libregexp-common-perl \
- libsys-meminfo-perl \
- libterm-readkey-perl \
- libtest-mockobject-perl \
- libtest-pod-perl \
- libunicode-string-perl \
- liburi-perl \
- libwww-perl \
- libtest-nowarnings-perl \
- libtest-deep-perl \
- libtest-warn-perl \
- make \
- cpanminus \
- procps \
- wget
+# Put a copy of the Dockerfile in the image itself
+# It can help future maintenance, isn't it?
+
+COPY Dockerfile /
+
+# Also put my local imapsync on /usr/bin/ for testing purpose
+# renamed imapsync_local since would be erased by the wget
+
+COPY imapsync /usr/bin/imapsync_local
+COPY prerequisites_imapsync /usr/bin/prerequisites_imapsync_local
+
+RUN set -xe && \
+ apt-get update \
+ && apt-get install -y \
+ libauthen-ntlm-perl \
+ libcgi-pm-perl \
+ libcrypt-openssl-rsa-perl \
+ libdata-uniqid-perl \
+ libencode-imaputf7-perl \
+ libfile-copy-recursive-perl \
+ libfile-tail-perl \
+ libio-socket-ssl-perl \
+ libio-socket-inet6-perl \
+ libio-tee-perl \
+ libhtml-parser-perl \
+ libjson-webtoken-perl \
+ libmail-imapclient-perl \
+ libparse-recdescent-perl \
+ libmodule-scandeps-perl \
+ libpar-packer-perl \
+ libreadonly-perl \
+ libregexp-common-perl \
+ libsys-meminfo-perl \
+ libterm-readkey-perl \
+ libtest-mockobject-perl \
+ libtest-pod-perl \
+ libunicode-string-perl \
+ liburi-perl \
+ libwww-perl \
+ procps \
+ wget \
+ make \
+ cpanminus \
+ lsof \
+ ncat \
+ openssl \
+ && rm -rf /var/lib/apt/lists/*
+
+RUN set -xe \
+ && pwd \
+ && wget -N https://imapsync.lamiral.info/imapsync \
+ https://imapsync.lamiral.info/prerequisites_imapsync \
+ https://raw.githubusercontent.com/google/gmail-oauth2-tools/master/python/oauth2.py
+ && mv imapsync oauth2.py /usr/bin/ \
+ && chmod +x /usr/bin/imapsync /usr/bin/imapsync_local /usr/bin/oauth2.py # just_a_comment_to_force_update 2019_11_26_12_58_34
-RUN wget -N https://imapsync.lamiral.info/imapsync && \
- mv imapsync /usr/bin/imapsync && \
- chmod +x /usr/bin/imapsync
USER nobody:nogroup
@@ -73,5 +91,6 @@ STOPSIGNAL SIGINT
CMD ["/usr/bin/imapsync"]
-#
-# End of imapsync Dockerfile
+#
+# End of imapsync Dockerfile
+
diff --git a/INSTALL.d/INSTALL.ANY.txt b/INSTALL.d/INSTALL.ANY.txt
index f12cf02..e063253 100644
--- a/INSTALL.d/INSTALL.ANY.txt
+++ b/INSTALL.d/INSTALL.ANY.txt
@@ -1,4 +1,4 @@
-# $Id: INSTALL.ANY.txt,v 1.60 2019/11/28 14:37:40 gilles Exp gilles $
+# $Id: INSTALL.ANY.txt,v 1.62 2020/06/03 07:11:10 gilles Exp gilles $
#
# This is the main INSTALL file for imapsync.
# imapsync : IMAP sync and migrate tool.
@@ -42,6 +42,10 @@ Those documents are also available at https://imapsync.lamiral.info/INSTALL.d/
- Docker
- Online UI like /X
+If you are not familiar with any of these systems but you have to chose
+one to install imapsync, imapsync online, or the latest imapsync then
+Centos 7 (not 8 for now) is the easiest system to consider (June 2020).
+
If you are not on one of these systems then read the last section
below called "Installing imapsync on other Unixes".
@@ -50,6 +54,7 @@ below called "Installing imapsync on other Unixes".
=======================================================================
Easy.
+
Read the file INSTALL.d/INSTALL.Darwin.txt
This document is also available at
https://imapsync.lamiral.info/INSTALL.d/INSTALL.Darwin.txt
@@ -59,6 +64,7 @@ https://imapsync.lamiral.info/INSTALL.d/INSTALL.Darwin.txt
=======================================================================
Easy.
+
Read the file INSTALL.d/INSTALL.FreeBSD.txt
This document is also available at
https://imapsync.lamiral.info/INSTALL.d/INSTALL.FreeBSD.txt
@@ -69,6 +75,7 @@ https://imapsync.lamiral.info/INSTALL.d/INSTALL.FreeBSD.txt
=======================================================================
Easy.
+
Read the file INSTALL.d/INSTALL.Centos.txt
This document is also available at
https://imapsync.lamiral.info/INSTALL.d/INSTALL.Centos.txt
@@ -79,34 +86,38 @@ https://imapsync.lamiral.info/INSTALL.d/INSTALL.Centos.txt
=======================================================================
Easy.
+
Read the file INSTALL.d/INSTALL.CPanel.txt
This document is also available at
https://imapsync.lamiral.info/INSTALL.d/INSTALL.CPanel.txt
=======================================================================
- Installing imapsync on Debian 6 or 7
+ Installing imapsync on Debian
=======================================================================
Not so easy.
+
See the file INSTALL.d/INSTALL.Debian.txt
This document is also available at
https://imapsync.lamiral.info/INSTALL.d/INSTALL.Debian.txt
=======================================================================
- Installing imapsync on Ubuntu 12 or 14
+ Installing imapsync on Ubuntu
=======================================================================
Not so easy.
+
See the file INSTALL.d/INSTALL.Ubuntu.txt
This document is also available at
https://imapsync.lamiral.info/INSTALL.d/INSTALL.Ubuntu.txt
=======================================================================
- Installing imapsync on AWS EC2
+ Installing imapsync on AWS
=======================================================================
Not so easy.
+
See the file INSTALL.d/INSTALL.AWS_EC2.txt
This document is also available at
https://imapsync.lamiral.info/INSTALL.d/INSTALL.AWS_EC2.txt
@@ -116,6 +127,7 @@ https://imapsync.lamiral.info/INSTALL.d/INSTALL.AWS_EC2.txt
=======================================================================
Not so easy.
+
See the file INSTALL.d/INSTALL.ArchLinux.txt
This document is also available at
https://imapsync.lamiral.info/INSTALL.d/INSTALL.ArchLinux.txt
@@ -124,6 +136,8 @@ https://imapsync.lamiral.info/INSTALL.d/INSTALL.ArchLinux.txt
Installing imapsync online like /X
=======================================================================
+Not easy.
+
Follow the document INSTALL.d/INSTALL.OnlineUI.txt
This document is also available at
https://imapsync.lamiral.info/INSTALL.d/INSTALL.OnlineUI.txt
@@ -133,6 +147,7 @@ https://imapsync.lamiral.info/INSTALL.d/INSTALL.OnlineUI.txt
Installing imapsync on other Unixes
=======================================================================
+Not easy.
Purchase imapsync at
https://imapsync.lamiral.info/
diff --git a/INSTALL.d/INSTALL.AWS_EC2.txt b/INSTALL.d/INSTALL.AWS_EC2.txt
index d0c47fe..8bcf62c 100644
--- a/INSTALL.d/INSTALL.AWS_EC2.txt
+++ b/INSTALL.d/INSTALL.AWS_EC2.txt
@@ -1,5 +1,5 @@
#!/bin/cat
-# $Id: INSTALL.AWS_EC2.txt,v 1.7 2019/11/28 14:37:23 gilles Exp gilles $
+# $Id: INSTALL.AWS_EC2.txt,v 1.8 2020/04/14 20:56:47 gilles Exp gilles $
This documentation is also located online at
https://imapsync.lamiral.info/INSTALL.d/
@@ -9,8 +9,55 @@ https://imapsync.lamiral.info/INSTALL.d/INSTALL.AWS_EC2.txt
Installing imapsync on AWS EC2
=======================================================================
+
AWS: Amazon Web Service
+A) cat /etc/system-release
+Amazon Linux release 2 (Karoo)
+
+ sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
+ sudo yum install imapsync
+
+ imapsync --version
+ 1.727
+
+To install a more recent imapsync
+
+ sudo yum install perl-App-cpanminus \
+ perl-Dist-CheckConflicts \
+ perl-HTML-Parser \
+ perl-libwww-perl \
+ perl-Module-Implementation \
+ perl-Module-ScanDeps \
+ perl-Package-Stash \
+ perl-Package-Stash-XS \
+ perl-PAR-Packer \
+ perl-Regexp-Common \
+ perl-Sys-MemInfo \
+ perl-Test-Fatal \
+ perl-Test-Mock-Guard \
+ perl-Test-Requires \
+ perl-Test-Deep \
+ perl-File-Tail \
+ perl-Unicode-String \
+ perl-Test-NoWarnings \
+ perl-Test-Simple \
+ perl-Test-Warn \
+ perl-Sub-Uplevel
+
+ sudo cpanm Encode::IMAPUTF7
+ wget -N https://imapsync.lamiral.info/imapsync
+ chmod +x imapsync
+ ./imapsync --testslive
+
+ ./imapsync --version # command typed on 14 April 2020
+ 1.983
+
+ sudo cpanm CGI
+
+
+B) Old Amazon Linux AMI release 2017.03
+
cat /etc/system-release
Amazon Linux AMI release 2017.03
diff --git a/INSTALL.d/INSTALL.Centos.txt b/INSTALL.d/INSTALL.Centos.txt
index 165ee2a..087ede7 100644
--- a/INSTALL.d/INSTALL.Centos.txt
+++ b/INSTALL.d/INSTALL.Centos.txt
@@ -1,5 +1,5 @@
#!/bin/cat
-# $Id: INSTALL.Centos.txt,v 1.14 2019/11/28 14:37:02 gilles Exp gilles $
+# $Id: INSTALL.Centos.txt,v 1.25 2021/02/02 17:08:46 gilles Exp gilles $
This documentation is also located online at
https://imapsync.lamiral.info/INSTALL.d/
@@ -9,7 +9,37 @@ https://imapsync.lamiral.info/INSTALL.d/INSTALL.Centos.txt
Installing imapsync on CentOS
=======================================================================
-There is one section for Centos 7 and one for Centos 6.
+There is one section for Centos 8,
+one for Centos 7,
+and one for Centos 6.
+
+=======================================================================
+ Centos 8
+=======================================================================
+
+
+How to install the latest imapsync on Centos 8
+
+ dnf install wget perl-App-cpanminus gcc
+ # then
+ cpanm lazy Test::MockObject
+ wget https://imapsync.lamiral.info/imapsync
+ perl -Mlazy imapsync
+ chmod +x imapsync
+ ./imapsync --testslive
+ ./imapsync --tests
+
+
+If you encounter the following error during the run of "perl -Mlazy imapsync"
+...
+Can't locate object method "new" via package "Archive::Tar" at ...
+FAIL install IO-String-1.08
+
+fix it with:
+ wget http://mirror.centos.org/centos/8/PowerTools/x86_64/os/Packages/perl-IO-String-1.08-31.el8.noarch.rpm
+ yum install perl-IO-String-1.08-31.el8.noarch.rpm -y
+
+See also https://github.com/imapsync/imapsync/issues/211
=======================================================================
Centos 7
@@ -30,8 +60,8 @@ A good test that shows also the basic example:
A live test:
- imapsync --testslive
-
+ imapsync --testslive --tls1 --ssl2
+
Unit tests:
imapsync --tests
@@ -40,8 +70,9 @@ Unit tests:
Centos 7 and latest imapsync
=======================================================================
-At the time of this writing (April 2018), the epel repository contains
-imapsync release 1.727, which is not the latest available release.
+At the time of this writing (March 2020), the epel7 repository still
+contains imapsync release 1.727, which is not the latest available
+imapsync release. (1.727 date is 2016/08/19 while 1.979 is 2020/01/14)
In order to install the latest imapsync I suggest the following process:
@@ -67,15 +98,20 @@ Then:
perl-Test-Requires \
perl-Test-Deep \
perl-File-Tail \
- perl-Unicode-String
+ perl-Unicode-String \
+ perl-Test-NoWarnings \
+ perl-Test-Simple \
+ perl-Test-Warn \
+ perl-Sub-Uplevel
- cpanm Encode::IMAPUTF7 # this module is not available as a rpm package
-
+Also, run the following commands:
+
+ cpanm Encode::IMAPUTF7
wget -N https://imapsync.lamiral.info/imapsync
chmod +x imapsync
./imapsync --testslive
-Now you should shave the latest imapsync locally working on Centos 7.
+Now you should have the latest imapsync locally working on Centos 7.
If you want to install it and replace the old one:
@@ -85,7 +121,7 @@ If you want to install it and replace the old one:
imapsync --version
should give the latest release number instead of 1.727
-(It is 1.964 at the time of this writing)
+(It is 1.979 at the time of this writing)
If you want to install an online imapsync service
like /X then you also need a recent decent CGI.pm,
diff --git a/INSTALL.d/INSTALL.Darwin.txt b/INSTALL.d/INSTALL.Darwin.txt
index 3c3119d..8536ffe 100644
--- a/INSTALL.d/INSTALL.Darwin.txt
+++ b/INSTALL.d/INSTALL.Darwin.txt
@@ -1,46 +1,63 @@
#!/bin/cat
-# $Id: INSTALL.Darwin.txt,v 1.24 2019/11/28 14:42:52 gilles Exp gilles $
+# $Id: INSTALL.Darwin.txt,v 1.34 2021/06/15 10:02:37 gilles Exp gilles $
This documentation is also located online at
https://imapsync.lamiral.info/INSTALL.d/
https://imapsync.lamiral.info/INSTALL.d/INSTALL.Darwin.txt
+
+Usual users should follow the A) section only, with the exeption
+of reading B) before if you use a Catalina system.
+
+A) Installing imapsync binary on Darwin / Mac OS X
+B) Installing imapsync on Catalina
+C) Installing imapsync script on Darwin / Mac OS X with brew
+D) Installing imapsync script on Darwin / Mac OS X the way I do
+E) Building imapsync binary on Darwin / Mac OS X
+
+
=======================================================================
- Installing imapsync binary on Darwin / Mac OS X
+A) Installing imapsync binary on Darwin / Mac OS X
=======================================================================
-Caveat Catalina: The binary imapsync_bin_Darwin is detected as a malware
-or similar on the latest Mac OS X named Catalina.
-It's Catalina new security policy. I'm working on it.
-All other Mac OS X releases are ok.
-So far I found
-https://www.quora.com/What-does-Can-t-be-opened-because-it-s-integrity-cannot-be-verified-mean-on-OSX-Catalina
-https://github.com/fastlane/fastlane/issues/15186#issuecomment-532047545
-https://github.com/neovim/neovim/issues/11011#issuecomment-531369505
-Other way, on the binary: Control + Right Click -> Open
-(I don't know if it adds imapsync in the ok apps)
-See also the last section of https://support.apple.com/en-us/HT202491
-"How to open an app that hasn’t been notarized or is from an unidentified developer"
-
-Now, let's forget Catalina for the rest of this document
There is a standalone imapsync binary for Mac OS X
called "imapsync_bin_Darwin" (without the quotes),
-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.
+available in the compressed tarball called imapsync-1.977.tgz
+where 1.977 is the imapsync version number.
+
+In case you haven't buy it yet or forgot where the download link is,
+check https://imapsync.lamiral.info/dist/
+
+Download the tarball imapsync-1.977.tgz, not the binary imapsync_bin_Darwin
+because the binary is also in the tarball and there are other useful files
+in the tarball. The binary present in /dist/ is just there for a fast upgrade
+when you need one.
+
+I suppose this tarball imapsync-1.977.tgz is downloaded under your $HOME directory,
+let say /Users/gilles/, but you can put it anywhere. In real, your $HOME directory
+is not /Users/gilles/, it maybe /Users/john/ or /Users/zoey/ where John or Zoey
+is you login name.
Open a terminal: /Applications/Utilities/Terminal double-click on Terminal.
-Untar the tarball where you want:
+Untar the tarball:
cd
- tar xzvf /Users/gilles/imapsync-1.xxx.tgz
+ pwd
+ tar xzvf imapsync-1.977.tgz
-Go into the directory imapsync-1.xxx
+In case the previous command fails, it means the tarball file called imapsync-1.977.tgz
+is not in your $HOME directory, you may have downloaded it elsewhere on the file system.
+A way to find it is the command:
- cd imapsync-1.xxx
+ find / | grep imapsync
+
+
+Now that the tarball is extracted, it created a directory called imapsync-1.977/
+Go into the directory imapsync-1.977 with the command:
+
+ cd imapsync-1.977
First let's have a simple run to see if imapsync_bin_Darwin works.
@@ -71,35 +88,66 @@ you have to use:
--host1 test1.lamiral.info --user1 test1 --password1 secret1 \
--host2 test2.lamiral.info --user2 test2 --password2 secret2
-You also may have to edit the examples you use, like
-examples/imapsync_example.sh
-and replace in there the command ./imapsync by ./imapsync_bin_Darwin
-in case it is not already done.
-
-Be careful the way you edit the files, use a text editor.
-Do not use a word processor because word processors add
-or use special formating characters that will break the shell
-scripts. If you use TextEdit, use the text mode.
-
The script examples/imapsync_example_darwin.sh is ready to use,
it is a copy of examples/imapsync_example.sh adapted to Mac users.
-The script examples/sync_loop_darwin.sh is also ready to use.
-Try:
- sh examples/sync_loop_darwin.sh
+Be careful the way you edit the script files, use a text editor.
+Do not use a word processor because word processors add
+or use special formating characters that will break the shell
+scripts. If you use TextEdit, use the text mode.
-or
+In the terminal, try:
- cp examples/sync_loop_darwin.sh mysync.sh
+ sh examples/imapsync_example_darwin.sh
+
+or copy it and run your copy instead:
+
+ cp examples/imapsync_example_darwin.sh mysync.sh
sh mysync.sh
Now read on the tutorial
https://imapsync.lamiral.info/doc/TUTORIAL_Unix.html
+in order to complete your formation on imapsync.
+
+If you need to sync or migrate many accounts,
+the script examples/sync_loop_darwin.sh is also ready to use.
+
=======================================================================
- Installing imapsync script on Darwin / Mac OS X with brew
+B) Installing imapsync on Catalina
+=======================================================================
+
+Caveat Catalina: The binary imapsync_bin_Darwin is detected as a malware
+or similar on the latest Mac OS X named Catalina.
+It's Catalina new security policy. Imapsync is not a malware or similar.
+All other Mac OS X releases are ok.
+
+In order to pass away this detection, follow these steps:
+
+Run imapsync_bin_Darwin
+After this first launch, the security asks to authorize the unknown
+developer program. Setup the root of the imapsync_bin_Darwin file
+and then run it again or any of the .sh files, it should run ok
+without any notice any more.
+
+Sources of this tip:
+https://www.quora.com/What-does-Can-t-be-opened-because-it-s-integrity-cannot-be-verified-mean-on-OSX-Catalina
+https://github.com/fastlane/fastlane/issues/15186#issuecomment-532047545
+https://github.com/neovim/neovim/issues/11011#issuecomment-531369505
+
+Other way, on the binary: Control + Right Click -> Open
+
+See also the last section of https://support.apple.com/en-us/HT202491
+"How to open an app that hasn't been notarized or is from an unidentified developer"
+
+I don't own a Catalina computer so I can't experiment on this nor make
+imapsync directly ok with Catalina. You're richer than me :-)
+
+
+=======================================================================
+C) Installing imapsync script on Darwin / Mac OS X with brew
=======================================================================
In case you have brew installed on your system ( see https://brew.sh/ ),
@@ -110,16 +158,23 @@ install imapsync with the command:
Do a real test with imap server test.lamiral.info:
imapsync --testslive
-
+
+If you encouter an error like "String.c: loadable library and perl binaries
+are mismatched (got handshake key 0xc500080, needed 0xc400080)",
+then install imapsync from source with the command:
+
+ brew install -s imapsync
+
+Thanks to Alessandro for this tip!
=======================================================================
- Installing imapsync script on Darwin / Mac OS X the way I do
+D) Installing imapsync script on Darwin / Mac OS X the way I do
=======================================================================
This part is only for advanced Unix users, or brave users.
The "make" command is a prerequisite to build some Perl modules.
-Install make in case it is not already installed.
+Install the "make" command in case it is not already installed.
First let us install cpanminus locally in ~/perl5
@@ -173,7 +228,7 @@ Now imapsync should work on your system.
./imapsync --testslive
=======================================================================
- Building imapsync binary on Darwin / Mac OS X
+E) Building imapsync binary on Darwin / Mac OS X
=======================================================================
cpanm Module::ScanDeps
@@ -187,12 +242,5 @@ pp -o imapsync.bin imapsync
./imapsync.bin --module
-=======================================================================
- Installing imapsync Mac OS X Leopard
-=======================================================================
-
-Mac OS X Leopard has perl 5.8.8 and an old openssl version.
-
-
=======================================================================
=======================================================================
diff --git a/INSTALL.d/INSTALL.Debian.txt b/INSTALL.d/INSTALL.Debian.txt
index cf81e41..3884bc7 100644
--- a/INSTALL.d/INSTALL.Debian.txt
+++ b/INSTALL.d/INSTALL.Debian.txt
@@ -1,5 +1,5 @@
#!/bin/cat
-# $Id: INSTALL.Debian.txt,v 1.30 2019/11/28 14:36:18 gilles Exp gilles $
+# $Id: INSTALL.Debian.txt,v 1.32 2020/12/11 09:27:29 gilles Exp gilles $
This documentation is also located online at
https://imapsync.lamiral.info/INSTALL.d/
@@ -7,9 +7,25 @@ https://imapsync.lamiral.info/INSTALL.d/INSTALL.Debian.txt
There is three install sections in this document,
-one for Debian 9 Stretch and Debian 10 Buster
-one for Debian 8 Jessie
-one for Debian 7 Wheezy
+1) one for Debian 9 Stretch and Debian 10 Buster
+2) one for Debian 8 Jessie
+3) one for Debian 7 Wheezy
+
+After reading and following 1) or 2) or 3), you'll be invited to read and follow
+the fourth section "4) After installing the dependencies"
+
+What is your Debian release?
+Type on a terminal:
+
+ cat /etc/debian_version
+
+10.x => Buster
+ 9.x => Stretch
+ 8.x => Jessie
+ 7.x => Wheezy
+
+where x is any number between 0 and 9, x is minor and to be forgotten.
+
First a call to Debian packagers
Why imapsync is not in Debian as a package?
@@ -24,7 +40,7 @@ https://lists.debian.org/debian-user/2016/11/msg00849.html
=======================================================================
- Installing imapsync on Debian 9 Stretch or Debian 10 Buster
+ 1) Installing imapsync on Debian 9 Stretch or Debian 10 Buster
=======================================================================
How to install imapsync dependencies on a Debian system?
@@ -76,12 +92,12 @@ apt install -y \
After installing the dependencies, imapsync should be working,
-go to the section "After installing the dependencies" below.
+go to the section "4) After installing the dependencies" below.
-=======================================================================
- Installing imapsync on Debian 8 Jessie
-=======================================================================
+=============================================
+ 2) Installing imapsync on Debian 8 Jessie
+=============================================
How to install imapsync dependencies on a Debian system?
@@ -114,9 +130,9 @@ apt install \
libtest-nowarnings-perl \
libtest-deep-perl \
libtest-warn-perl \
+ gcc \
make \
- cpanminus \
- time
+ cpanminus
The package libdata-uniqid-perl is in the jessie-backports repository
https://packages.debian.org/fr/jessie-backports/libdata-uniqid-perl
@@ -149,11 +165,11 @@ the module JSON::WebToken with the command:
cpanm JSON::WebToken
After installing the dependencies, imapsync should be working,
-go to the section "After installing the dependencies" below.
+go to the section "4) After installing the dependencies" below.
=======================================================================
- Installing imapsync on Debian 7 Wheezy
+ 3) Installing imapsync on Debian 7 Wheezy
=======================================================================
How to install imapsync dependencies on a Debian system?
@@ -189,6 +205,7 @@ apt-get install \
libtest-simple-perl \
libunicode-string-perl \
liburi-perl \
+ gcc \
make \
cpanminus
@@ -216,11 +233,12 @@ the module JSON::WebToken with the command:
cpanm JSON::WebToken
-After installing the dependencies, imapsync should be working.
+After installing the dependencies, imapsync should be working,
+then go to the section "4) After installing the dependencies" below.
-=======================================================================
- After installing the dependencies
-=======================================================================
+=======================================
+ 4) After installing the dependencies
+=======================================
You don't have to be root to test and use imapsync.
@@ -249,7 +267,7 @@ on the system:
imapsync
Now go to read http://imapsync.lamiral.info/#doc
-start with the tutorial.
+and start with the tutorial.
=======================================================================
=======================================================================
diff --git a/INSTALL.d/INSTALL.OnlineUI.txt b/INSTALL.d/INSTALL.OnlineUI.txt
index 921e640..1e84da5 100644
--- a/INSTALL.d/INSTALL.OnlineUI.txt
+++ b/INSTALL.d/INSTALL.OnlineUI.txt
@@ -1,5 +1,5 @@
#!/bin/cat
-# $Id: INSTALL.OnlineUI.txt,v 1.32 2019/11/28 14:42:17 gilles Exp gilles $
+# $Id: INSTALL.OnlineUI.txt,v 1.49 2021/03/19 09:39:01 gilles Exp gilles $
This documentation is also located online at
https://imapsync.lamiral.info/INSTALL.d/
@@ -9,9 +9,10 @@ https://imapsync.lamiral.info/INSTALL.d/INSTALL.OnlineUI.txt
Installing imapsync online
=======================================================================
-Please consider this as relatively experimental.
-However, to a certain extent, I'm now confident with /X
-since the /X service is up and running quite well since January 2017.
+
+I'm now confident with /X since the /X service is up and running quite
+well since January 2017. Anyway, if you run this service on your own
+online, you take responsibility for it.
=======================================================================
Hardware consideration
@@ -22,39 +23,41 @@ Load mean: 0.8 on a CPU 4 cores "Intel(R) i5-2320 3.00GHz K8-class"
-
=======================================================================
Installation
-
+
You have to be a little familiar with what a CGI script is
and how to activate a CGI script on the Apache
-HTTP server, or any other HTTP server. Linux is also a
-preferred platform (I run /X service on Linux and FreeBSD).
+HTTP server, or any other HTTP server. I have received demands
+to run it on the Ngnix HTTP server but I haven't played with it yet.
+Linux is also a preferred platform (I run /X service on Linux and FreeBSD).
-I have tested yet this visual interface on Mac. It works
-but for now it demands some skills few Mac users have.
+I have tested this visual interface on Mac. It works.
+For now, it demands some skills few Mac users have.
+Drop me a note in case you want to do that.
I have tested this visual interface on Windows,
-it fails on Windows because of some hard coded Unix paths.
-I'm working on it to be Windows ok but it's not done yet (october 2019).
+it fails on Windows because of some hardcoded Unix paths.
+I'm working on it to be Windows ok but it's not done yet (May 2020).
Some users have successfully installed a /X visual interface
on Windows using a Linux VM machine.
The web visual user interface frontend /X is compounded in four
-files: a html5 file, a css file, a javascript file and
+files: a html5 file, a CSS file, a javascript file, and
a logo image:
-* https://i005.lamiral.info/X/imapsync_form_extra.html
-* https://i005.lamiral.info/X/imapsync_form.css
-* https://i005.lamiral.info/X/imapsync_form.js
-* https://i005.lamiral.info/X/logo_imapsync_Xn.png
+* https://imapsync.lamiral.info/X/imapsync_form_extra.html
+* https://imapsync.lamiral.info/X/imapsync_form.css
+* https://imapsync.lamiral.info/X/imapsync_form.js
+* https://imapsync.lamiral.info/X/logo_imapsync_Xn.png
-You can do a "view source" to see the html file as
+You can do a "view source" to see the HTML file as
it is written, and a "save" to get it locally.
The three other files can be saved the same way or
-with wget.
+with a command named "wget". I suggest using wget,
+see below the ready-to-use command lines.
Those four files can be put anywhere on a web server,
as long as they stand in the same directory. If you
@@ -63,7 +66,7 @@ the content of imapsync_form_extra.html to reflect the change,
ie, change the two lines referencing imapsync_form.css and imapsync_form.js
href="imapsync_form.css" (near the beginning of imapsync_form_extra.html)
src="imapsync_form.js" (near the end of imapsync_form_extra.html)
-I let you changing the image logo as an exercise, it's safe if you fail.
+I let you change the image logo as an exercise, it's safe if you fail.
The actual imap syncing work is done by imapsync acting as a CGI,
the visual interface is only there to give imapsync the parameters
@@ -71,8 +74,8 @@ needed for the sync.
Use at least Perl module CGI.pm release 4.08 (2014-10-18)
to avoid the bug "Undefined subroutine CGI::multi_param".
-You can use the command cpanm to upgrade CGI.pm to its last version,
-it's the easiest way.
+You can use the command named cpanm to upgrade CGI.pm to
+its last version, it's the easiest way.
Print the CGI.pm release with:
@@ -91,14 +94,14 @@ To check and fix the Perl modules dependencies, run:
wget -N https://imapsync.lamiral.info/prerequisites_imapsync
sh prerequisites_imapsync
-In order to make imapsync work as a cgi, there is two conditions.
+To make imapsync work as a CGI script, there are two conditions.
First, imapsync has to work by itself on the web host.
If imapsync doesn't work by itself, as a command line,
-then it won't work as a cgi.
+then it won't work as a CGI script.
Second, imapsync has to work by itself on the web host using
-the Unix user running the web server. Detailed examples to
+the Unix user running the webserver. Detailed examples to
verify that will be provided further in this document.
The imapsync_form_extra.html file in action calls the CGI location
@@ -108,85 +111,116 @@ which has to be imapsync itself, the file script (not the directory).
The very latest and relatively stable imapsync is at
https://imapsync.lamiral.info/imapsync
This file is the program file used verbatim for the service given at
-https://i005.lamiral.info/X/
+https://imapsync.lamiral.info/X/
Copy the three files imapsync_form.* on a directory that is exported
by your HTTP server.
Copy the imapsync script on the cgi-bin/ directory
-allowing CGIs and you'll have your own imapsync visual interface
-and service. The cgi-bin/ directory is usually outside the
+allowing CGIs and you'll have your imapsync visual interface
+and service. The cgi-bin/ directory is usually outside the
hierarchy exported to anybody by the HTTP server.
+The default Apache 2.4 timeout is 60 seconds, one minute, 300 for older Apache.
+https://httpd.apache.org/docs/2.4/mod/core.html#timeout
+Mine is now "Timeout 3600", 3600 seconds, an hour. I chose this huge
+timeout value because imapsync can spend a long time without talking while
+getting the headers of huge folders of 100k messages.
+If you intend to offer this service for huge mailboxes or for a long
+time, I strongly recommand you to set this "Timeout 3600" in
+the Apache configuration right now because you will sure end up with this
+timeout issue in a few months.
+Search for timeouts in the Apache error log to see if you have timeout issues.
+
Now that I have explained the general context for any system,
I'll describe concrete examples on several systems,
Debian/Ubuntu and Centos. Feedbacks show that the Centos
-process is easier in case you know just a little of the
-linux distributions.
+process is easier in case you don't know very much any of the
+Linux distributions.
=============================================================================
A) Concrete example on a Debian server with Apache:
-Imapsync script place on the server disk:
+Imapsync script place on the server disk is
/usr/lib/cgi-bin/imapsync
-Get and install latest imapsync:
-
- cd
- wget -N -O /usr/lib/cgi-bin/imapsync https://imapsync.lamiral.info/imapsync
- chmod +x /usr/lib/cgi-bin/imapsync
-
- Check it like this:
-
- cd
- /usr/lib/cgi-bin/imapsync --testslive
-
-Assuming that the Unix account running Apache is www-data,
-check that it will work under Apache with this command:
-
- su -s /bin/sh -c 'SERVER_SOFTWARE=foo /usr/lib/cgi-bin/imapsync' www-data
-
- wget -nv -S -O- http://localhost/cgi-bin/imapsync?testslive=1
-
-It should print something like:
-Status: 200 OK to sync IMAP boxes. Load on bar is ...
-...
-
-
-This classical /cgi-bin directory is already configured
+This classical /cgi-bin directory is usually already configured
in the Apache configuration file
/etc/apache2/sites-available/default-ssl
or
/etc/apache2/sites-available/default
-The configuration file contains the following section
+This configuration file contains the following section
somewhere, maybe in comments for now, ie, with
-some # characters
-at the beginning to make them ignored:
+some # characters at the beginning to make them ignored:
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
AllowOverride None
# Next line "no-gzip 1" is to avoid output buffering,
- # clients can then see the log along the sync
+ # clients can then see the log during the sync
SetEnv no-gzip 1
Options +ExecCGI -MultiViews
- Order allow,deny
- Allow from all
+
+ # Choose either one or the other, depending on your Apache version
+ # Lines beginning with # are ignored
+
+ # For Apache 2.2
+ #Order allow, deny
+ #Allow from all
+
+ # Apache 2.4
+ Require all granted
+That's all for the Apache configuration side.
+
+Now get, test, and install the latest imapsync:
+
+ cd
+ wget -N https://imapsync.lamiral.info/imapsync
+ chmod +x imapsync
+
+ # some basic tests
+ ./imapsync
+ ./imapsync --testslive
+
+ cp imapsync /usr/lib/cgi-bin/
+
+Assuming that the Unix account running Apache is www-data,
+check that it will work under Apache with this command:
+
+ su -s /bin/sh -c 'SERVER_SOFTWARE=foo /usr/lib/cgi-bin/imapsync' www-data
+ wget -nv -S -O- http://localhost/cgi-bin/imapsync?testslive=1
+
+The last command should print something like:
+Status: 200 OK to sync IMAP boxes. Load on bar is ...
+...
+
+
+You can also verify that the webserver is not buffering its output with the
+command:
+
+ wget -nv -S -O- 'http://localhost/cgi-bin/imapsync?testslive=1&simulong=10'
+
+You should get the output as time goes on. If you don't get the
+output as time goes on, ie you see no output then all output
+at once, it means the webserver is buffering. Fix it with
+the "SetEnv no-gzip 1" described above.
+
+
The UI front-end file place on the server disk in
this example is
/var/www/html/X/imapsync_form_extra.html
-but it can be placed it anywhere on disk, the important
-thing is that it has to be served by the web server.
+but it can be placed anywhere on the disk, the important
+thing is that it has to be served by the webserver.
mkdir /var/www/html/X/
cd /var/www/html/X/
wget -N \
- https://i005.lamiral.info/X/imapsync_form_extra.html \
- https://i005.lamiral.info/X/imapsync_form.css \
- https://i005.lamiral.info/X/imapsync_form.js \
- https://i005.lamiral.info/X/logo_imapsync_Xn.png
+ https://imapsync.lamiral.info/X/imapsync_form_extra.html \
+ https://imapsync.lamiral.info/X/imapsync_form.css \
+ https://imapsync.lamiral.info/X/imapsync_form.js \
+ https://imapsync.lamiral.info/X/logo_imapsync_Xn.png
ln -s imapsync_form_extra.html index.html
The imapsync process working directory in cgi mode is
@@ -204,15 +238,26 @@ or the safer
That's all for installing a /X service on Debian.
=============================================================================
-B) Concrete example on a Centos 7 server with httpd Apache:
+B) Here is a concrete example on a Centos 7 server with the Apache
+ webserver httpd:
+
+First, follow and apply the section "Centos 7 and latest imapsync"
+at https://imapsync.lamiral.info/INSTALL.d/INSTALL.Centos.txt
+
+Then:
+
+ yum install httpd
+ systemctl restart httpd
+
+ cpanm CGI
mkdir /var/www/html/X/
cd /var/www/html/X/
wget -N \
- https://i005.lamiral.info/X/imapsync_form_extra.html \
- https://i005.lamiral.info/X/imapsync_form.css \
- https://i005.lamiral.info/X/imapsync_form.js \
- https://i005.lamiral.info/X/logo_imapsync_Xn.png
+ https://imapsync.lamiral.info/X/imapsync_form_extra.html \
+ https://imapsync.lamiral.info/X/imapsync_form.css \
+ https://imapsync.lamiral.info/X/imapsync_form.js \
+ https://imapsync.lamiral.info/X/logo_imapsync_Xn.png
ln -s imapsync_form_extra.html index.html
cd
@@ -223,17 +268,228 @@ B) Concrete example on a Centos 7 server with httpd Apache:
./imapsync --testslive
cp imapsync /var/www/cgi-bin/
+
+Assuming that the Unix account running Apache is "apache",
+which is the default Apache user on Centos system,
+check that it will work under Apache with this command:
+
+# a real synchronization but not in cgi context
+ cd /tmp
+ su -s /bin/sh -c '/var/www/cgi-bin/imapsync --testslive' apache
+
+# in cgi context but just the imapsync command with no parameter
+ cd
su -s /bin/sh -c 'SERVER_SOFTWARE=foo /var/www/cgi-bin/imapsync' apache
+
+# a real synchronization in cgi context
wget -nv -S -O- http://localhost/cgi-bin/imapsync?testslive=1
+The last command should print something like:
+Status: 200 OK to sync IMAP boxes. Load on bar is ...
+...
-Check
+You can also verify that the webserver is not buffering its output with the
+command:
+
+ wget -nv -S -O- 'http://localhost/cgi-bin/imapsync?testslive=1&simulong=10'
+
+You should get the output as time goes on. If you don't, no output then all
+output at once, it means the webserver is buffering. Fix it with
+the "SetEnv no-gzip 1" described above.
+
+Now check
http://yourhost/X/imapsync_form_extra.html
or the safer
https://yourhost/X/imapsync_form_extra.html
That's all for installing a /X service on Centos 7.
+
+B bis) How about Centos 8?
+
+Follow the procedure for Centos 7. While imapsync is ok on the command line,
+you will encounter some permission denied in the CGI context. Something like:
+
+wget -nv -S -O- http://localhost/cgi-bin/imapsync?testslive=1
+...
+Host1 failure: can not open imap connection on host1 [test1.lamiral.info]
+with user [test1]: Unable to connect to test1.lamiral.info: Permission denied
+
+The issue might come from SELinux. I haven't dig into SELinux enough to give
+you the commands that will allow imapsync online and only it while maintaining
+SELinux in enforcing mode.
+
+Quick solution:
+
+ sestatus
+ setenforce 0
+ sestatus
+
+To go back to the previous state:
+
+ setenforce 1
+ sestatus
+
+
+Nota bene
+=========
+You may also want to avoid being placed by systemd in
+a directory like (where xxx are crypto hash characters):
+
+/var/tmp/systemd-private-xxx-httpd.service-xxx/tmp/
+
+In that case, edit the file
+
+ /usr/lib/systemd/system/httpd.service
+
+and in it, replace the line
+
+ PrivateTmp=true
+
+by the line
+
+ PrivateTmp=false
+
+then reload systemd and restart httpd with the commands:
+
+ systemctl daemon-reload
+ systemctl restart httpd
+ systemctl status httpd
+
+
+=======================================================================
+=================== Bandwidth statistics ==========================
+=======================================================================
+
+If you want the bandwidth statistics like the ones at the bottom
+of the page and following the image link, more detailed at
+https://imapsync.lamiral.info/vnstat/vnstati.html
+
+Those stats are generated by vnstat
+https://humdi.net/vnstat/
+
+Vnstat is already available as a package in most Linux distros.
+
+The images are generated by the following commands, every minute:
+vnstati -s -o /var/www/vnstat/vnstat_s.png
+vnstati -h -o /var/www/vnstat/vnstat_h.png
+vnstati -hg -o /var/www/vnstat/vnstat_hg.png
+vnstati -hs -o /var/www/vnstat/vnstat_hs.png
+vnstati -d -o /var/www/vnstat/vnstat_d.png
+vnstati -m -o /var/www/vnstat/vnstat_m.png
+vnstati -y -o /var/www/vnstat/vnstat_y.png
+vnstati -t -o /var/www/vnstat/vnstat_t.png
+vnstati -vs -o /var/www/vnstat/vnstat_vs.png
+vnstati -5 -o /var/www/vnstat/vnstat_5.png
+
+
+=======================================================================
+====================== Troubleshooting ============================
+=======================================================================
+
+The log says the temporary directory is
+/var/tmp/imapsync_cgi/
+but it is not in the system.
+
+It may be that the apache or httpd service is run by systemd with a jailed
+temporary directory.
+
+Solution:
+
+ find /etc/systemd/ /usr/lib/systemd/ |xargs grep -s PrivateTmp
+
+If systemd jails Apache then you'll find a line like:
+/etc/systemd/system/multi-user.target.wants/apache2.service:PrivateTmp=true
+(Debian/Ubuntu)
+or
+/usr/lib/systemd/system/httpd.service:PrivateTmp=true
+(Centos)
+
+Replace this line "PrivateTmp=true"
+in /etc/systemd/system/multi-user.target.wants/apache2.service
+or
+/usr/lib/systemd/system/httpd.service
+
+with:
+
+PrivateTmp=false
+
+Then reload the systemd daemon and restart the apache2 service
+
+Debian:
+ systemctl daemon-reload
+ systemctl restart apache2
+ systemctl status apache2
+
+Centos:
+ systemctl daemon-reload
+ systemctl restart httpd
+ systemctl status httpd
+
+Then retry
+
+ wget -nv -S -O- http://localhost/cgi-bin/imapsync?testslive=1
+
+Look now if /var/tmp/imapsync_cgi/ is there.
+
+=======================================================================
+If you encounter this issue:
+
+Failed to find a valid digest in the 'integrity' attribute for resource
+'https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js'
+with computed SHA-256 integrity 'kZMXypKF3if9/5v2tP9UHBvS/535tSyH7vjszruyCso='.
+The resource has been blocked.
+
+It may be because of AdBlock.
+
+Verification:
+
+ wget https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js
+ cat jquery.min.js | openssl dgst -sha384 -binary | openssl base64 -A
+
+gives exactly what is in imapsync_form_extra.html
+
+ more imapsync_form_extra.html
+...
+src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"
+integrity="sha384-xBuQ/xzmlsLoJpyjoggmTEz8OWUFM0/RC5BsqQBDX2v5cMvDHcMakNTNrHIW2I5f"
+
+So if your https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js
+is not what it should be, your access looks compromised.
+
+Thanks to Dominik Ulrich for this insight!
+=======================================================================
+=======================================================================
+
+This part is for hackers only.
+
+If you want to use the UI but make it more complicated things than
+just run imapsync then use the following files:
+
+imapsync_shell_wrapper instead of imapsync itself
+imapsync_form_wrapper.js instead of imapsync_form.js
+imapsync_form_wrapper.html instead of imapsync_form.html
+
+How to get those files:
+
+wget -N https://imapsync.lamiral.info/X/imapsync_shell_wrapper \
+ https://imapsync.lamiral.info/X/imapsync_form_wrapper.js \
+ https://imapsync.lamiral.info/X/imapsync_form_wrapper.html
+
+Centos:
+ chmod +x imapsync_shell_wrapper
+ cp imapsync_shell_wrapper /var/www/cgi-bin/
+
+Debian:
+ chmod +x imapsync_shell_wrapper
+ cp imapsync_shell_wrapper /usr/lib/cgi-bin/
+
+Normally, you only have to change the script imapsync_shell_wrapper
+to suit your needs.
+
+Have in mind that the abort button will kill only one imapsync so
+it is not a working button in case of successive imapsync runs.
+
=======================================================================
=======================================================================
@@ -245,7 +501,7 @@ The script imapsync doesn't work under Modperl::Registry
nor under ModPerl::PerlRun. So read on if you think you
are better than me.
-I've try the standard way, telling how any cgi perl script
+I tried the standard way, telling how any cgi Perl script
can be run under mod_perl perlrun, but it fails with imapsync.
Any hint welcome!
diff --git a/INSTALL.d/memo_docker b/INSTALL.d/memo_docker
index 81ee8d6..9d442e2 100644
--- a/INSTALL.d/memo_docker
+++ b/INSTALL.d/memo_docker
@@ -1,7 +1,8 @@
#!/bin/sh
echo imapsync_docker_timestamp_dockerfile
-imapsync_docker_timestamp_dockerfile() {
+imapsync_docker_timestamp_dockerfile()
+{
DATE_CURRENT=`date +%Y_%m_%d_%H_%M_%S`
echo $DATE_CURRENT
sed -i -e "/just_a_comment_to_force_update/s/comment_to_force_update.*/comment_to_force_update $DATE_CURRENT/" Dockerfile
@@ -9,7 +10,8 @@ imapsync_docker_timestamp_dockerfile() {
}
echo imapsync_docker_build
-imapsync_docker_build() {
+imapsync_docker_build()
+{
docker build -t gilleslamiral/imapsync . \
&& imapsync_docker_add_tag_version && echo Build SUCCEEDED || echo Build FAILED
@@ -19,11 +21,18 @@ imapsync_docker_build() {
# docker run gilleslamiral/imapsync imapsync --testslive6 --nossl2
}
+echo imapsync_docker_version
+imapsync_docker_version()
+{
+ docker run gilleslamiral/imapsync imapsync --version
+}
+
echo imapsync_docker_add_tag_version
-imapsync_docker_add_tag_version() {
+imapsync_docker_add_tag_version()
+{
docker images gilleslamiral/imapsync
echo
- version=`docker run gilleslamiral/imapsync imapsync --version`
+ version=`imapsync_docker_version`
echo $version
docker tag gilleslamiral/imapsync:latest gilleslamiral/imapsync:$version
docker images gilleslamiral/imapsync
@@ -32,25 +41,37 @@ imapsync_docker_add_tag_version() {
echo imapsync_docker_testslive
-imapsync_docker_testslive() {
+imapsync_docker_testslive()
+{
echo docker run gilleslamiral/imapsync imapsync --testslive
docker run gilleslamiral/imapsync imapsync --testslive
}
echo imapsync_docker_testslive6
-imapsync_docker_testslive6() {
+imapsync_docker_testslive6()
+{
echo docker run gilleslamiral/imapsync imapsync --testslive6 --ssl1 --ssl2
docker run gilleslamiral/imapsync imapsync --testslive6 --ssl1 --ssl2
}
echo imapsync_docker_tests
-imapsync_docker_tests() {
+imapsync_docker_tests()
+{
echo docker run gilleslamiral/imapsync imapsync --tests
docker run gilleslamiral/imapsync imapsync --tests
}
+echo imapsync_docker_envfile
+imapsync_docker_envfile()
+{
+ docker run --env-file ./secret.txt gilleslamiral/imapsync imapsync \
+ --host1 test1.lamiral.info --user1 test1 \
+ --host2 test2.lamiral.info --user2 test2 --justlogin
+}
+
echo docker_delete_all_images
-docker_delete_all_images() {
+docker_delete_all_images()
+{
docker rm `docker ps -a -q`
docker rmi `docker images -q`
}
@@ -62,7 +83,8 @@ docker_system_prune()
}
echo docker_delete_dandling_images
-docker_delete_dandling_images() {
+docker_delete_dandling_images()
+{
docker images
dandling_images=`docker images -f dangling=true -q`
exited_containers=`docker ps -a -f status=exited -q`
@@ -73,23 +95,28 @@ docker_delete_dandling_images() {
echo imapsync_docker_rebuild_from_scratch
-imapsync_docker_rebuild_from_scratch() {
+imapsync_docker_rebuild_from_scratch()
+{
delete_all_images
docker images
imapsync_docker_build
}
echo imapsync_docker_upload
-imapsync_docker_upload() {
- # upload only after successful tests
- set -x \
- && imapsync_docker_testslive \
- && imapsync_docker_tests \
- && docker run gilleslamiral/imapsync true \
- && docker login --username=gilleslamiral --password=`cat $HOME/var/pass/secret.docker` \
- && docker push gilleslamiral/imapsync:latest \
- && set +x && echo imapsync push SUCCEEDED || echo imapsync push FAILED
- set +x
+imapsync_docker_upload()
+{
+ version=`imapsync_docker_version`
+ # upload only after successful tests
+ set -x \
+ && rcsdiff imapsync \
+ && imapsync_docker_testslive \
+ && imapsync_docker_tests \
+ && docker run gilleslamiral/imapsync true \
+ && docker login --username=gilleslamiral --password=`cat $HOME/var/pass/secret.docker` \
+ && docker push gilleslamiral/imapsync:latest \
+ && docker push gilleslamiral/imapsync:$version \
+ && set +x && echo imapsync push SUCCEEDED || echo imapsync push FAILED
+ set +x
}
diff --git a/INSTALL.d/secret.txt b/INSTALL.d/secret.txt
new file mode 100644
index 0000000..35f8f71
--- /dev/null
+++ b/INSTALL.d/secret.txt
@@ -0,0 +1,2 @@
+IMAPSYNC_PASSWORD1=secret1
+IMAPSYNC_PASSWORD2=secret2
diff --git a/Makefile b/Makefile
index 94dcaeb..6046a6b 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
-# $Id: Makefile,v 1.320 2020/01/03 22:50:27 gilles Exp gilles $
+# $Id: Makefile,v 1.335 2021/07/06 02:00:46 gilles Exp gilles $
.PHONY: help usage all doc
@@ -15,9 +15,9 @@ usage:
@echo "make testf # run tests"
@echo "make testv # run tests verbosely"
@echo "make test_quick # few tests verbosely"
- @echo "make W/test.bat # run --tests and W/test.bat on win32"
- @echo "make W/test_tests.bat # run --tests on win32"
- @echo "make W/test_testsdebug.bat # run --testsdebug on win32"
+ @echo "make win32testsbat # run --tests and W/test.bat on win32"
+ @echo "make win32tests # run --tests on win32"
+ @echo "make win32testsdebug # run --testsdebug on win32"
@echo "make W/test2.bat # run W/test2.bat on win32"
@echo "make W/test3.bat # run W/test3.bat on win32"
@echo "make W/test_reg.bat # run W/test_reg.bat on win32"
@@ -52,9 +52,9 @@ usage:
@echo "make mactestsdebug # run ./imapsync --testsdebug on Mac"
@echo "make mactests # run ./imapsync --tests on Mac"
@echo "make mactestslive # run ./imapsync --testslive on Mac"
- @echo "make ks2testsdebug # run ./imapsync --testsdebug on ks2"
- @echo "make ks2tests # run ./imapsync --tests on ks2"
- @echo "make ks2testslive # run ./imapsync --testslive on ks2"
+ @echo "make ks5testsdebug # run ./imapsync --testsdebug on ks5"
+ @echo "make ks5tests # run ./imapsync --tests on ks5"
+ @echo "make ks5testslive # run ./imapsync --testslive on ks5"
PREFIX ?= /usr
@@ -62,9 +62,6 @@ DIST_PATH := dist2/
VERSION := $(shell perl ./imapsync --version 2>/dev/null || cat VERSION)
VERSION_PREVIOUS := $(shell perl ./$(DIST_PATH)/imapsync --version 2>/dev/null || echo ERROR)
-IMAPClient_3xx := ./W/Mail-IMAPClient-3.42/lib
-IMAPClient := $(IMAPClient_3xx)
-
DIST_NAME := imapsync-$(VERSION)
DIST_FILE := $(DIST_NAME).tgz
@@ -85,7 +82,6 @@ hello:
@echo "VERSION $(VERSION)"
@echo "DIST_NAME $(DIST_NAME)"
@echo "VERSION_PREVIOUS $(VERSION_PREVIOUS)"
- @echo "IMAPClient $(IMAPClient)"
@echo "HOSTNAME $(HOSTNAME)"
@echo "ARCH $(ARCH)"
@echo "KERNEL $(KERNEL)"
@@ -93,9 +89,9 @@ hello:
@echo "DISTRO $(DISTRO)"
-all: doc VERSION biz prereq allcritic bin
+all: doc VERSION biz prereq allcritic
-testp :
+testp:
sh INSTALL.d/prerequisites_imapsync
@perl -c imapsync || { echo; echo "Read the INSTALL file to solve Perl module dependencies!"; exit 1; }
@@ -108,7 +104,7 @@ README: imapsync
VERSION: imapsync
rcsdiff imapsync
- perl -I./$(IMAPClient) ./imapsync --version > ./VERSION
+ ./imapsync --version > ./VERSION
touch -r ./imapsync ./VERSION
@@ -128,9 +124,9 @@ doc/TUTORIAL_Unix.html: doc/TUTORIAL_Unix.t2t
doc: README ChangeLog doc/TUTORIAL_Unix.html doc/GOOD_PRACTICES.html W/imapsync.1
-.PHONY: clean clean_tilde clean_test doc clean_log clean_bak clean_permissions
+.PHONY: clean clean_tilde clean_test doc clean_log clean_bak clean_permissions clean_oauth2
-clean: clean_tilde clean_man clean_log clean_bak clean_permissions
+clean: clean_tilde clean_man clean_log clean_bak clean_permissions clean_oauth2
clean_permissions:
chmod a-x Makefile FAQ.d/FAQ.*.txt README_Windows.txt
@@ -153,6 +149,9 @@ clean_log:
clean_bak:
rm -f index.shtml.bak ./S/style.css.bak
+clean_oauth2:
+ rm oauth2/typescript oauth2/D_*txt
+
.PHONY: install dist man
man: W/imapsync.1
@@ -178,32 +177,50 @@ install: testp W/imapsync.1
# Local goals
###############
-.PHONY: prereq test tests unitests testp testf test3xx testv3 perlcritic allcritic crit compok dev cover tidy nytprof
+.PHONY: prereq test tests unitests testp testf test3xx perlcritic allcritic crit compok dev cover tidy nytprof functree
dev: test functree crit cover nytprof bin
+
docker:
- ssh ks3 'cd docker/imapsync && . memo_docker'
- @echo "make docker_copy_to_ks3 # copy imapsync Dockerfile memo_docker to ks3"
+ @echo "make docker_copy_to_vp3 # copy imapsync Dockerfile memo_docker to vp3"
+ @echo "make docker_build # build the imapsync docker image"
@echo "make docker_upload_docker_hub # upload last build to https://hub.docker.com/r/gilleslamiral/imapsync"
+ @echo "ssh vp3 THEN cd docker/imapsync && . memo_docker"
+
+docker_build:
+ ssh vp3 'cd docker/imapsync && . memo_docker && imapsync_docker_build'
-docker_copy_to_ks3:
- rsync -av imapsync INSTALL.d/Dockerfile INSTALL.d/memo_docker INSTALL.d/prerequisites_imapsync ks3:docker/imapsync/
- rsync -av RCS/imapsync,v INSTALL.d/RCS/Dockerfile,v INSTALL.d/RCS/memo_docker,v ks3:docker/imapsync/RCS/
+
+docker_copy_to_vp3:
+ ssh vp3 'mkdir -p docker/imapsync/ var/pass/'
+ rsync -av /g/var/pass/secret.docker vp3:var/pass/secret.docker
+ rsync -av imapsync INSTALL.d/Dockerfile INSTALL.d/memo_docker INSTALL.d/prerequisites_imapsync INSTALL.d/secret.txt vp3:docker/imapsync/
+ rsync -av RCS/imapsync,v INSTALL.d/RCS/Dockerfile,v INSTALL.d/RCS/memo_docker,v vp3:docker/imapsync/RCS/
docker_upload_docker_hub:
- ssh ks3 'cd docker/imapsync && . memo_docker && imapsync_docker_upload'
+ ssh vp3 'cd docker/imapsync && . memo_docker && imapsync_docker_upload'
-functree:
+functree: W/imapsync_functions_tree_ppi.txt W/imapsync_functions_tree.txt
+
+W/imapsync_functions_tree_ppi.txt: imapsync
perl ./W/learn/function_calls_ppi ./imapsync > W/imapsync_functions_tree_ppi.txt
+ rcsdiff W/imapsync_functions_tree_ppi.txt || { echo 'rcsdiff detected a diff' | ci -l W/imapsync_functions_tree_ppi.txt ; }
+
+W/imapsync_functions_tree.txt: imapsync
perl ./W/learn/function_calls ./imapsync > W/imapsync_functions_tree.txt
+ rcsdiff W/imapsync_functions_tree.txt || { echo 'rcsdiff detected a diff' | ci -l W/imapsync_functions_tree.txt ; }
-nytprof:
+nytprof: nytprof_clean
sh tests.sh ll_nytprof
nytprofhtml
+nytprof_clean:
+ rm -rfv nytprof/
+
+
cover:
perl -c ./imapsync
perl -MDevel::Cover ./imapsync --tests --testslive
@@ -240,17 +257,17 @@ perlcritic: W/perlcritic_3.txt W/perlcritic_2.txt
allcritic: W/perlcritic_4.txt W/perlcritic_3.txt W/perlcritic_2.txt W/perlcritic_1.txt
W/perlcritic_1.txt: imapsync W/.compok
- perlcritic --statistics -1 imapsync > W/perlcritic_1.txt.tmp || :
+ perlcritic --statistics-only -1 imapsync > W/perlcritic_1.txt.tmp || :
mv W/perlcritic_1.txt.tmp W/perlcritic_1.txt
echo | ci -l W/perlcritic_1.txt
W/perlcritic_2.txt: imapsync W/.compok
- perlcritic --statistics -2 imapsync > W/perlcritic_2.txt.tmp || :
+ perlcritic --statistics-only -2 imapsync > W/perlcritic_2.txt.tmp || :
mv W/perlcritic_2.txt.tmp W/perlcritic_2.txt
echo | ci -l W/perlcritic_2.txt
W/perlcritic_3.txt: imapsync W/.compok
- perlcritic --statistics -3 imapsync > W/perlcritic_3.txt.tmp || :
+ perlcritic --statistics-only -3 imapsync > W/perlcritic_3.txt.tmp || :
mv W/perlcritic_3.txt.tmp W/perlcritic_3.txt
echo | ci -l W/perlcritic_3.txt
@@ -260,32 +277,27 @@ W/perlcritic_4.txt: imapsync W/.compok
echo | ci -l W/perlcritic_4.txt
-test_quick : test_quick_3xx
+test_quick: imapsync tests.sh
+ /usr/bin/time sh -x tests.sh locallocal
-test_quick_3xx: imapsync tests.sh
- CMD_PERL='perl -I./$(IMAPClient_3xx)' /usr/bin/time sh -x tests.sh locallocal
-
-testv3: imapsync tests.sh
- CMD_PERL='perl -I./$(IMAPClient_3xx)' /usr/bin/time sh tests.sh
-
-
-
-testv: testv3
-
-test: .test_3xx
+testv: imapsync tests.sh
+ /usr/bin/time sh tests.sh
tests: test
-unitests:
- perl -I./$(IMAPClient_3xx) ./imapsync --tests
+test: .test_3xx
# .test_3xx is created by tests.sh with success at all mandatory tests
.test_3xx: imapsync tests.sh
- CMD_PERL='perl -I./$(IMAPClient_3xx)' /usr/bin/time sh tests.sh 1>/dev/null
+ /usr/bin/time sh tests.sh 1>/dev/null
+
+unitests:
+ ./imapsync --tests
+
testf: clean_test test
-.PHONY: lfo upload_lfo dosify_bat public imapsync_cidone
+.PHONY: dosify_bat
dosify_bat:
unix2dos W/*.bat examples/*.bat
@@ -293,7 +305,9 @@ dosify_bat:
copy_win32:
scp imapsync Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
-W/test.bat:
+.PHONY: win32testsbat win32tests win32testsdebug
+
+win32testsbat:
unix2dos W/test.bat
scp imapsync W/test.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
# ssh Admin@c 'perl C:/msys/1.0/home/Admin/imapsync/imapsync --testsdebug'
@@ -303,21 +317,19 @@ W/test.bat:
# ssh Admin@c 'tasklist /NH /FO CSV'
-W/test_tests.bat:
+win32tests:
unix2dos 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'
./W/check_winerr test_tests.bat
-W/test_testsdebug.bat:
+win32testsdebug:
unix2dos W/test_testsdebug.bat
scp imapsync W/test_testsdebug.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/test_testsdebug.bat'
./W/check_winerr test_testsdebug.bat
-
-
.PHONY: W/*.bat examples/*
@@ -440,13 +452,13 @@ imapsync_32bit.exe: imapsync
-p24tests:
+win64tests:
unix2dos W/test_tests.bat
scp imapsync W/test_tests.bat pc_HP_DV7_p24:'Desktop/imapsync_build'
ssh 'pc HP DV7'@p24 'Desktop/imapsync_build/test_tests.bat'
./W/check_win64err test_tests.bat
-p24testsdebug:
+win64testsdebug:
unix2dos W/test_testsdebug.bat
scp imapsync W/test_testsdebug.bat pc_HP_DV7_p24:'Desktop/imapsync_build'
ssh 'pc HP DV7'@p24 'Desktop/imapsync_build/test_testsdebug.bat'
@@ -472,6 +484,11 @@ W/test_ipv6.bat:
scp W/test_ipv6.bat pc_HP_DV7_p24:'Desktop/imapsync_build'
ssh 'pc HP DV7'@p24 'Desktop/imapsync_build/test_ipv6.bat'
+W/test_namespace.bat:
+ unix2dos W/test_namespace.bat
+ scp W/test_namespace.bat ../../var/pass/secret.outlook.com pc_HP_DV7_p24:'Desktop/imapsync_build'
+ ssh 'pc HP DV7'@p24 'Desktop/imapsync_build/test_namespace.bat'
+
W/test4.bat:
unix2dos W/test4.bat
scp W/test4.bat pc_HP_DV7_p24:'Desktop/imapsync_build'
@@ -517,7 +534,7 @@ win64build:
./W/check_win64err build_exe.bat
imapsync.exe: imapsync_64bit.exe
- cp imapsync_64bit.exe imapsync.exe
+ cp -a imapsync_64bit.exe imapsync.exe
imapsync_64bit.exe: imapsync
@@ -554,13 +571,13 @@ zip: dosify_bat
# C:\Users\mansour\Desktop\imapsync
-.PHONY: mac bin win lin win64
+.PHONY: mac maccopy macforce mactests mactestsdebug mactestslive mactestslive6 bin win lin win64
mac: imapsync_bin_Darwin
maccopy:
rsync -p -e 'ssh -4 -p 995' imapsync W/build_mac.sh INSTALL.d/prerequisites_imapsync webserver \
- gilleslamira@gate.polarhome.com:
+ gilleslamira@gate.polarhome.com:
rsync -av -p -e 'ssh -4 -p 995' X/ gilleslamira@gate.polarhome.com:X/
@@ -590,25 +607,25 @@ mactestslive6:
rsync -p -e 'ssh -4 -p 995' imapsync gilleslamira@gate.polarhome.com:
ssh -4 -p 995 gilleslamira@gate.polarhome.com '. .bash_profile; perl imapsync --testslive6'
+.PHONY: bin win lin win32 win64
-bin: mac win64 win32
+bin: mac win
lin: $(BIN_NAME)
win: win64 win32 imapsync.exe
-win64: imapsync_64bit.exe
-
win32: imapsync_32bit.exe
+win64: imapsync_64bit.exe
+
$(BIN_NAME): imapsync
rcsdiff imapsync
- { pp -x -o $(BIN_NAME) -I $(IMAPClient_3xx) \
- -M Mail::IMAPClient \
+ { pp -x -o $(BIN_NAME) \
imapsync ; \
}
- # Maybe add -M Test2::Event::Info \
+ # Maybe add -M Test2::Event::Info Mail::IMAPClient \
#-M Net::SSLeay -M IO::Socket -M IO::Socket::INET6 -M IO::Socket::SSL \
#-M Digest::MD5 -M Digest::HMAC_MD5 -M Term::ReadKey \
#-M Authen::NTLM -M HTML::Entities -M JSON::WebToken \
@@ -619,7 +636,6 @@ $(BIN_NAME): imapsync
./$(BIN_NAME) --justbanner
-lfo: upload_lfo
.PHONY: tarball cidone ci
@@ -636,9 +652,10 @@ tarball: cidone
ci: cidone
cidone: auto_ci
- rcsdiff X/cgi_memo X/*.txt X/imapsync_form.* X/noscript.css
- rcsdiff W/*.bat W/*.sh W/*.txt W/*.txt W/*.htaccess
+ rcsdiff X/cgi_memo X/stat_patterns.txt X/server_survey_patterns.txt X/imapsync_form.* X/imapsync_form_extra.html X/noscript.css
+ rcsdiff W/*.bat W/*.sh W/*.txt W/*.htaccess
cd W && rcsdiff RCS/*
+ cd oauth2 && rcsdiff RCS/*
rcsdiff doc/*.t2t
rcsdiff INSTALL.d/*.txt INSTALL.d/prerequisites_imapsync
rcsdiff FAQ.d/*.txt
@@ -649,7 +666,7 @@ cidone: auto_ci
rcsdiff RCS/*
-dist: cidone test clean all perlcritic dist_prepa dist_zip README_dist
+dist: cidone test clean all dist_prepa dist_zip README_dist
md5:
@@ -658,7 +675,7 @@ md5:
sha:
cd $(DIST_PATH)/ && sha512sum *
-.PHONY: moveoldrelease ks2testsdebug ks2tests README_dist docker_pull_count
+.PHONY: moveoldrelease ks5testsdebug ks5tests README_dist docker_pull_count
moveoldrelease:
./W/tools/backup_old_dist $(DIST_PATH)
@@ -681,7 +698,7 @@ README_dist:
sh W/tools/gen_README_dist > $(DIST_PATH)/README.txt
unix2dos $(DIST_PATH)/README.txt
-.PHONY: publish upload_ks ks valid_index biz ks2tests_gilles ks2tests_root auto_ci
+.PHONY: publish upload_ks ks valid_index biz ks5tests_gilles ks5tests_root auto_ci
biz: S/imapsync_sold_by_country.txt docker_pull_count
@@ -690,7 +707,7 @@ auto_ci: docker_pull_count
docker_pull_count:
cd W/ && rcsdiff docker_pull_count.txt || { echo | ci -l docker_pull_count.txt ; }
-S/imapsync_sold_by_country.txt: imapsync
+S/imapsync_sold_by_country.txt: /g/bin/imapsync_by_country
cd S/ && /g/bin/imapsync_by_country && echo | ci -l imapsync_sold_by_country.txt
@@ -708,37 +725,40 @@ ks3:
rsync -avHz --delete -P \
. gilles@ks3.lamiral.info:public_html/imapsync/
+ks6:
+ rsync -avHz --delete -P --exclude 'dist2' \
+ . gilles@ks6.lamiral.info:public_html/imapsync/
+
+
upload_tests: tests.sh
rsync -avHz --delete -P \
tests.sh \
gilles@ks.lamiral.info:public_html/imapsync/
-ks2testsdebug:
+ks5testsdebug:
rsync -aP imapsync gilles@ks.lamiral.info:public_html/imapsync/imapsync
ssh gilles@ks.lamiral.info 'public_html/imapsync/imapsync --testsdebug'
-ks2tests: ks2tests_gilles ks2tests_root
+ks5tests: ks5tests_gilles ks5tests_root
-ks2tests_gilles:
- rsync -aP imapsync gilles@ks.lamiral.info:public_html/imapsync/imapsync
+ks5tests_gilles:
+ rsync -P imapsync gilles@ks.lamiral.info:public_html/imapsync/
+ rsync -P oauth2_access_token.txt oauth2_string_for_oauthdirect.txt gilles@ks.lamiral.info:
ssh gilles@ks.lamiral.info 'public_html/imapsync/imapsync --tests'
-ks2tests_root:
- rsync -aP imapsync root@ks.lamiral.info:
- ssh root@ks.lamiral.info './imapsync --tests'
-
-i005tests_root:
- rsync -P imapsync INSTALL.d/prerequisites_imapsync root@i005.lamiral.info:
- ssh root@i005.lamiral.info './imapsync --tests'
-
-i005prerequisites:
- rsync -P imapsync INSTALL.d/prerequisites_imapsync root@i005.lamiral.info:
- ssh root@i005.lamiral.info 'sh prerequisites_imapsync'
+ks5tests_root:
+ rsync -P imapsync oauth2_access_token.txt oauth2_string_for_oauthdirect.txt root@ks5.lamiral.info:
+ ssh root@ks5.lamiral.info './imapsync --tests'
-ks2testslive:
+ks5prerequisites:
+ rsync -P imapsync INSTALL.d/prerequisites_imapsync root@ks5.lamiral.info:
+ ssh root@ks5.lamiral.info 'sh prerequisites_imapsync'
+
+
+ks5testslive:
rsync -aP imapsync gilles@ks.lamiral.info:public_html/imapsync/imapsync
ssh gilles@ks.lamiral.info 'public_html/imapsync/imapsync --testslive'
@@ -752,9 +772,6 @@ centos:
-
-
-
PUBLIC = ./ChangeLog ./NOLIMIT ./LICENSE ./CREDITS ./FAQ \
./index.shtml ./INSTALL ./README_Windows.txt \
./VERSION ./imapsync \
@@ -766,6 +783,7 @@ ml:
m4 -P W/ml_announce.in.txt | mutt -H-
mailq
+lfo: upload_lfo
upload_lfo:
#rm -rf /home/gilles/public_html/www.linux-france.org/html/prj/imapsync/
@@ -777,8 +795,13 @@ upload_lfo:
/home/gilles/public_html/www.linux-france.org/html/prj/imapsync/.htaccess
sh ~/memo/lfo-rsync
+.PHONY: valid_index va
+
+
valid_index: W/.valid.index.shtml
+va: valid_index
+
cl: ./W/checklink.txt
./W/checklink.txt: index.shtml
@@ -794,15 +817,18 @@ cle: ./W/checklinkext.txt
http://lamiral.info/~gilles/imapsync/S/imapservers.shtml \
| tee ./W/checklinkext.txt
-W/.valid.index.shtml: index.shtml
+W/.valid.index.shtml: index.shtml S/*.shtml
for f in index.shtml S/*.shtml; do echo tidy -e -q $$f; tidy -e -q $$f ; done
./W/tools/validate_xml_html5 index.shtml S/*.shtml
+ ./W/tools/validate index.shtml S/donate.shtml S/external.shtml S/imapservers.shtml \
+ S/news.shtml S/no_download.shtml S/paypal_return.shtml S/poll.shtml \
+ S/template_xhtml1.shtml
touch W/.valid.index.shtml
.PHONY: upload_index upload_FAQ ci_imapsync upload_bin
-upload_index: W/.valid.index.shtml clean_permissions
+upload_index: valid_index clean_permissions
rcsdiff index.shtml README_Windows.txt S/style.css S/*.shtml FAQ.d/*.txt LICENSE CREDITS TODO examples/*.bat examples/*.sh index.shtml INSTALL.d/*.txt
rm -f examples/LOG_imapsync/*
rsync -avH index.shtml README_Windows.txt FAQ INSTALL NOLIMIT LICENSE CREDITS TODO S/robots.txt S/favicon.ico ../imapsync_website/
@@ -812,35 +838,37 @@ upload_index: W/.valid.index.shtml clean_permissions
rsync -aHv --delete ./INSTALL.d/ ../imapsync_website/INSTALL.d/
rsync -aHv --delete ./FAQ.d/ ../imapsync_website/FAQ.d/
rsync -avH --delete ./doc/ ../imapsync_website/doc/
- rsync -aHvz --delete ../imapsync_website/ root@ks.lamiral.info:/var/www/imapsync/
+ rsync -aHvz --delete ../imapsync_website/ root@ks5.lamiral.info:/usr/local/www/apache24/data/imapsync/
+
ci_imapsync:
rcsdiff imapsync
upload_latest: unitests ci_imapsync bin
- rsync -a imapsync imapsync_bin_Darwin imapsync.exe imapsync_32bit.exe ./INSTALL.d/prerequisites_imapsync ../imapsync_website/
- rsync -aHvz --delete ../imapsync_website/ root@ks.lamiral.info:/var/www/imapsync/
+ rsync -av imapsync imapsync_bin_Darwin imapsync.exe imapsync_32bit.exe ./INSTALL.d/prerequisites_imapsync ../imapsync_website/
+ rsync -aHvzP --delete ../imapsync_website/ root@ks5.lamiral.info:/usr/local/www/apache24/data/imapsync/
-upload_cgi: unitests ks2tests i005tests_root ci_imapsync
+upload_cgi: unitests ks5tests ks5tests_root ci_imapsync
rsync -a imapsync ./INSTALL.d/prerequisites_imapsync ../imapsync_website/
- rsync -aHvz --delete ../imapsync_website/ root@ks.lamiral.info:/var/www/imapsync/
- rsync -P imapsync root@i005.lamiral.info:/home/www/apache24/cgi-bin/imapsync
+ rsync -aHvz --delete ../imapsync_website/ root@ks5.lamiral.info:/usr/local/www/apache24/data/imapsync/
+ rsync -P imapsync root@ks5.lamiral.info:/home/www/apache24/cgi-bin/imapsync
upload_cgi_memo:
dos2unix X/stat_patterns.txt X/server_survey_patterns.txt
- rsync -av X/cgi_memo X/stat_patterns.txt X/server_survey_patterns.txt root@ks2:/var/tmp/imapsync_cgi/
- rsync -av X/cgi_memo X/stat_patterns.txt X/server_survey_patterns.txt root@i005:/var/tmp/imapsync_cgi/
+ sed -i".bak" '/^[[:space:]]*$$/d' X/stat_patterns.txt X/server_survey_patterns.txt
+ rsync -av X/cgi_memo X/stat_patterns.txt X/server_survey_patterns.txt root@ks5:/var/tmp/imapsync_cgi/
upload_X:
- ./W/tools/validate_xml_html5 X/index.html X/imapsync_form.html X/imapsync_form_extra.html
- rcsdiff X/imapsync_form.html X/imapsync_form_extra.html X/imapsync_form.css X/noscript.css
- rcsdiff X/imapsync_form.js
+ ./W/tools/validate_xml_html5 X/index.html X/imapsync_form.html X/imapsync_form_extra.html X/imapsync_form_extra_free.html X/imapsync_form_wrapper.html
+ rcsdiff X/imapsync_form.html X/imapsync_form_extra.html X/imapsync_form_wrapper.html X/imapsync_form.css X/noscript.css
+ rcsdiff X/imapsync_form.js X/imapsync_form_wrapper.js
+ rcsdiff INSTALL.d/INSTALL.OnlineUI.txt
+ rsync -a ./INSTALL.d/INSTALL.OnlineUI.txt ../imapsync_website/INSTALL.d/INSTALL.OnlineUI.txt
rsync -av --delete X/ ../imapsync_website/X/
- rsync -aHvz --delete ../imapsync_website/ root@ks.lamiral.info:/var/www/imapsync/
- rsync -av --delete X/ root@i005:/home/www/apache24/data/X/
+ rsync -aHvz --delete ../imapsync_website/ root@ks5.lamiral.info:/usr/local/www/apache24/data/imapsync/
upload_FAQ:
rcsdiff FAQ.d/*.txt LICENSE CREDITS TODO INSTALL.d/*.txt
@@ -848,7 +876,7 @@ upload_FAQ:
rsync -aHv --delete ./INSTALL.d/ ../imapsync_website/INSTALL.d/
rsync -aHv --delete ./FAQ.d/ ../imapsync_website/FAQ.d/
rsync -avH --delete ./doc/ ../imapsync_website/doc/
- rsync -aHvz --delete ../imapsync_website/ root@ks.lamiral.info:/var/www/imapsync/
+ rsync -aHvz --delete ../imapsync_website/ root@ks5.lamiral.info:/usr/local/www/apache24/data/imapsync/
upload_ks_W_memo:
@@ -863,7 +891,7 @@ upload_ks: ci tarball
rsync -aHv --delete ./INSTALL.d/ ../imapsync_website/INSTALL.d/
rsync -aHv --delete ./FAQ.d/ ../imapsync_website/FAQ.d/
rsync -avH --delete ./doc/ ../imapsync_website/doc/
- rsync -aHvz --delete ../imapsync_website/ root@ks.lamiral.info:/var/www/imapsync/
+ rsync -aHvz --delete ../imapsync_website/ root@ks5.lamiral.info:/usr/local/www/apache24/data/imapsync/
ssh root@ks.lamiral.info 'apachectl configtest && /etc/init.d/apache2 reload'
diff --git a/README b/README
index 510ca35..4fc332f 100644
--- a/README
+++ b/README
@@ -6,7 +6,7 @@ NAME
VERSION
- This documentation refers to Imapsync $Revision: 1.977 $
+ This documentation refers to Imapsync $Revision: 2.140 $
USAGE
@@ -27,52 +27,76 @@ DESCRIPTION
Imapsync command is a tool allowing incremental and recursive imap
transfers from one mailbox to another. If you don't understand the
- previous sentence, it's normal, it's pedantic computer oriented jargon.
+ previous sentence, it's normal, it's pedantic computer-oriented jargon.
All folders are transferred, recursively, meaning the whole folder
- hierarchy is taken, all messages in them, and all messages flags (\Seen
+ hierarchy is taken, all messages in them, and all message flags (\Seen
\Answered \Flagged etc.) are synced too.
Imapsync reduces the amount of data transferred by not transferring a
given message if it already resides on the destination side. Messages
that are on the destination side but not on the source side stay as they
- are (see the --delete2 option to have a strict sync).
+ are. See the --delete2 option to have strict sync and delete them.
- How imapsync knows a message is already on both sides? Same specific
+ How imapsync know a message is already on both sides? Same specific
headers and the transfer is done only once. By default, the
identification headers are "Message-Id:" and "Received:" lines but this
- choice can be changed with the --useheader option.
+ choice can be changed with the --useheader option, most often a
+ duplicate problem is solved by using --useheader "Message-Id"
All flags are preserved, unread messages will stay unread, read ones
- will stay read, deleted will stay deleted.
+ will stay read, deleted will stay deleted. In the IMAP protocol, a
+ deleted message is not really deleted, it is marked \Deleted and can be
+ undelete. Real destruction comes with the EXPUNGE or UIDEXPUNGE IMAP
+ commands.
You can abort the transfer at any time and restart it later, imapsync
works well with bad connections and interruptions, by design. On a
- terminal hit Ctr-c twice within two seconds in order to abort the
- program. Hit Ctr-c just once makes imapsync reconnect to both imap
- servers.
+ terminal hit Ctr-c twice within two seconds to abort the program. Hit
+ Ctr-c just once makes imapsync reconnect to both imap servers.
+
+ How do you know the sync is finished and well done? When imapsync ends
+ by itself it mentions it with lines like those:
+
+ Exiting with return value 0 (EX_OK: successful termination) 0/50 nb_errors/max_errors PID 301
+ Removing pidfile /tmp/imapsync.pid
+ Log file is LOG_imapsync/2020_11_17_15_59_22_761_test1_test2.txt ( to change it, use --logfile filepath ; or use --nolog to turn off logging )
+
+ If you don't have those lines it means that either the sync process is
+ still running (or eventually hanging indefinitely) or that it ended
+ without a whisper, a strong kill -9 on Linux for example.
+
+ If you have those final lines then it means the sync process is properly
+ finished. It may have encountered problems though.
+
+ A good synchronization is mentioned by some lines above the last ones,
+ especially those three lines:
+
+ The sync looks good, all 1745 identified messages in host1 are on host2.
+ There is no unidentified message on host1.
+ Detected 0 errors
A classical scenario is synchronizing a mailbox B from another mailbox A
where you just want to keep a strict copy of A in B. Strict meaning all
messages in A will be in B but no more.
- For this, option --delete2 has to be used, it deletes messages in host2
- folder B that are not in host1 folder A. If you also need to destroy
+ For this, option --delete2 can be used, it deletes messages in the host2
+ folder B that are not in the host1 folder A. If you also need to destroy
host2 folders that are not in host1 then use --delete2folders. See also
--delete2foldersonly and --delete2foldersbutnot to set up exceptions on
- folders to destroy. INBOX will never be destroy, it's a mandatory folder
- in IMAP.
+ folders to destroy. INBOX will never be destroyed, it's a mandatory
+ folder in IMAP so imapsync doesn't even try to remove it.
A different scenario is to delete the messages from the source mailbox
after a successful transfer, it can be a good feature when migrating
mailboxes since messages will be only on one side. The source account
will only have messages that are not on the destination yet, ie,
- messages that arrived after a sync or that failed to be copied.
+ messages that arrived after a sync or that failed to be transferred.
In that case, use the --delete1 option. Option --delete1 implies also
- option --expunge1 so all messages marked deleted on host1 will be really
- deleted. In IMAP protocol deleting a message does not really delete it,
- it marks it with the flag \Deleted, allowing an undelete. Expunging a
+ the option --expunge1 so all messages marked deleted on host1 will be
+ deleted. In IMAP protocol deleting a message does not delete it, it
+ marks it with the flag \Deleted, allowing an undelete. Expunging a
folder removes, definitively, all the messages marked as \Deleted in
this folder.
@@ -90,17 +114,18 @@ OPTIONS
usage: imapsync [options]
The standard options are the six values forming the credentials. Three
- values on each side are needed in order to log in into the IMAP servers.
- These six values are a host, a username, and a password, two times.
+ values on each side are needed in order to login into the IMAP servers.
+ These six values are a hostname, a username, and a password, two times.
Conventions used in the following descriptions of the options:
str means string
- int means integer
+ int means integer number
+ flo means float number
reg means regular expression
cmd means command
- --dry : Makes imapsync doing nothing for real, just print what
+ --dry : Makes imapsync doing nothing for real; it just print what
would be done without --dry.
OPTIONS/credentials
@@ -110,18 +135,18 @@ OPTIONS
Optional since default ports are the
well known ports imap/143 or imaps/993.
--user1 str : User to login on host1.
- --password1 str : Password for the user1.
+ --password1 str : Password of user1.
--host2 str : "destination" imap server.
--port2 int : Port to connect on host2. Optional
--user2 str : User to login on host2.
- --password2 str : Password for the user2.
+ --password2 str : Password of user2.
--showpasswords : Shows passwords on output instead of "MASKED".
Useful to restart a complete run by just reading
the command line used in the log,
or to debug passwords.
- It's not a secure practice at all.
+ It's not a secure practice at all!
--passfile1 str : Password file for the user1. It must contain the
password on the first line. This option avoids showing
@@ -129,7 +154,10 @@ OPTIONS
--passfile2 str : Password file for the user2.
You can also pass the passwords in the environment variables
- IMAPSYNC_PASSWORD1 and IMAPSYNC_PASSWORD2
+ IMAPSYNC_PASSWORD1 and IMAPSYNC_PASSWORD2. If you don't pass the user1
+ password via --password1 nor --passfile1 nor $IMAPSYNC_PASSWORD1 then
+ imapsync will prompt to enter the password on the terminal. Same thing
+ for user2 password.
OPTIONS/encryption
@@ -154,11 +182,16 @@ OPTIONS
--sslargs2 str : Pass any ssl parameter for host2 ssl or tls connection.
See --sslargs1
- --timeout1 int : Connection timeout in seconds for host1.
+ --timeout1 flo : Connection timeout in seconds for host1.
Default is 120 and 0 means no timeout at all.
- --timeout2 int : Connection timeout in seconds for host2.
+ --timeout2 flo : Connection timeout in seconds for host2.
Default is 120 and 0 means no timeout at all.
+ Caveat, under CGI context, you may encounter a timeout
+ from the webserver, killing imapsync and the imap connexions.
+ See the document INSTALL.OnlineUI.txt and search
+ for "Timeout" for how to deal with this issue.
+
OPTIONS/authentication
--authmech1 str : Auth mechanism to use with host1:
@@ -178,6 +211,28 @@ OPTIONS
--domain1 str : Domain on host1 (NTLM authentication).
--domain2 str : Domain on host2 (NTLM authentication).
+ --oauthaccesstoken1 str : The access token to authenticate with OAUTH2.
+ It will be combined with the --user1 value to form the
+ string to pass with XOAUTH2 authentication.
+ The password given by --password1 or --passfile1
+ is ignored.
+ Instead of the access token itself, the value can be a
+ file containing the access token on the first line.
+ If the value is a file, imapsync reads its first line
+ and take this line as the access token. The advantage
+ of the file is that if the access token changes then
+ imapsync can read it again when it needs to reconnect
+ during a run.
+
+
+ --oauthaccesstoken2 str : same thing as --oauthaccesstoken1
+
+ --oauthdirect1 str : The direct string to pass with XOAUTH2 authentication.
+ The password given by --password1 or --passfile1 and
+ the user given by --user1 are ignored.
+
+ --oauthdirect2 str : same thing as oauthdirect1
+
OPTIONS/folders
--folder str : Sync this folder.
@@ -212,6 +267,9 @@ OPTIONS
--f1f2 str1=str2 : Force folder str1 to be synced to str2,
--f1f2 overrides --automap and --regextrans2.
+ Use several --f1f2 options to map several folders.
+ Option --f1f2 is a one to one only folder mapping,
+ str1 and str2 have to be full path folder names.
--subfolder2 str : Syncs the whole host1 folders hierarchy under the
host2 folder named str.
@@ -256,7 +314,7 @@ OPTIONS
--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 for a run, then
+ Then, when happy, remove --dry for a run, then
remove --justfolders for the next ones.
Have in mind that --regextrans2 is applied after
the automatic prefix and separator inversion.
@@ -278,9 +336,11 @@ OPTIONS
Default is system specific, Unix is /tmp but
/tmp is often too small and deleted at reboot.
--tmpdir /var/tmp should be better.
+
--pidfile str : The file where imapsync pid is written,
- it can be dirname/filename.
- Default name is imapsync.pid in tmpdir.
+ it can be dirname/filename complete path.
+ The default name is imapsync.pid in tmpdir.
+
--pidfilelocking : Abort if pidfile already exists. Useful to avoid
concurrent transfers on the same mailbox.
@@ -297,7 +357,7 @@ OPTIONS
where:
2019_12_22_23_57_59_532 is nearly the date of the start
- YYYY_MM_DD_HH_MM_SS_mmm
+ YYYY_MM_DD_HH_MM_SS_mmm
year_month_day_hour_minute_seconde_millisecond
and user1 user2 are the --user1 --user2 values.
@@ -305,18 +365,18 @@ OPTIONS
OPTIONS/messages
--skipmess reg : Skips messages matching the regex.
- Example: 'm/[\x80-ff]/' # to avoid 8bits messages.
+ Example: 'm/[\x80-\xff]/' # to avoid 8bits messages.
--skipmess is applied before --regexmess
--skipmess reg : or this one, etc.
--skipcrossduplicates : Avoid copying messages that are already copied
- in another folder, good from Gmail to X when
- X is not also Gmail.
+ in another folder, good from Gmail to XYZ when
+ XYZ is not also Gmail.
Activated with --gmail1 unless --noskipcrossduplicates
--debugcrossduplicates : Prints which messages (UIDs) are skipped with
- --skipcrossduplicates (and in what other folders
- they are).
+ --skipcrossduplicates and in what other folders
+ they are.
--pipemess cmd : Apply this cmd command to each message content
before the copy.
@@ -332,19 +392,20 @@ OPTIONS
--disarmreadreceipts : Disarms read receipts (host2 Exchange issue)
--regexmess reg : Apply the whole regex to each message before transfer.
- Example: 's/\000/ /g' # to replace null by space.
+ Example: 's/\000/ /g' # to replace null characters
+ by spaces.
--regexmess reg : and this one, etc.
OPTIONS/labels
Gmail present labels as folders in imap. Imapsync can accelerate the
sync by syncing X-GM-LABELS, it will avoid to transfer messages when
- they are already on host2.
+ they are already on host2 in another folder.
--synclabels : Syncs also Gmail labels when a message is copied to host2.
Activated by default with --gmail1 --gmail2 unless
--nosynclabels is added.
-
+
--resynclabels : Resyncs Gmail labels when a message is already on host2.
Activated by default with --gmail1 --gmail2 unless
--noresynclabels is added.
@@ -367,6 +428,9 @@ OPTIONS
May be useful when a user has already started to play
with its host2 account.
+ --filterbuggyflags : Filter flags known to be buggy and generators of errors
+ "BAD Invalid system flag" or "NO APPEND Invalid flag list".
+
OPTIONS/deletions
--delete1 : Deletes messages on host1 server after a successful
@@ -391,16 +455,18 @@ OPTIONS
Useful with --delete1 since what remains on host1
is only what failed to be synced.
- --delete2 : Delete messages in host2 that are not in
- host1 server. Useful for backup or pre-sync.
+ --delete2 : Delete messages in the host2 account that are not in
+ the host1 account. Useful for backup or pre-sync.
--delete2 implies --uidexpunge2
- --delete2duplicates : Delete messages in host2 that are duplicates.
+ --delete2duplicates : Deletes messages in host2 that are duplicates in host2.
Works only without --useuid since duplicates are
detected with an header part of each message.
+ NB: --delete2duplicates is far less violent than --delete2
+ since it removes only duplicates.
- --delete2folders : Delete folders in host2 that are not in host1 server.
- For safety, first try it like this (it is safe):
+ --delete2folders : Delete folders in host2 that are not in host1.
+ For safety, first try it like this, it is safe:
--delete2folders --dry --justfolders --nofoldersizes
and see what folders will be deleted.
@@ -421,16 +487,17 @@ OPTIONS
If you encounter problems with dates, see also:
https://imapsync.lamiral.info/FAQ.d/FAQ.Dates.txt
- --syncinternaldates : Sets the internal dates on host2 same as host1.
+ --syncinternaldates : Sets the internal dates on host2 as the same as host1.
Turned on by default. Internal date is the date
- a message arrived on a host (Unix mtime).
- --idatefromheader : Sets the internal dates on host2 same as the
+ a message arrived on a host (Unix mtime usually).
+ --idatefromheader : Sets the internal dates on host2 as same as the
ones in "Date:" headers.
OPTIONS/message selection
--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
@@ -451,18 +518,30 @@ OPTIONS
--search2 str : Same as --search but for selecting host2 messages only.
So --search CRIT equals --search1 CRIT --search2 CRIT
+ --noabletosearch : Makes --minage and --maxage options use the internal
+ dates given by a FETCH imap command instead of the
+ "Date:" header. Internal date is the arrival date
+ in the mailbox.
+ --noabletosearch equals --noabletosearch1 --noabletosearch2
+
+ --noabletosearch1 : Like --noabletosearch but for host1 only.
+ --noabletosearch2 : Like --noabletosearch but for host2 only.
+
--maxlinelength int : skip messages with a line length longer than int bytes.
RFC 2822 says it must be no more than 1000 bytes but
real life servers and email clients do more.
--useheader str : Use this header to compare messages on both sides.
- Ex: Message-ID or Subject or Date.
+ Example: "Message-Id" or "Received" or "Date".
--useheader str and this one, etc.
- --usecache : Use cache to speed up next syncs. Not set by default.
+ --syncduplicates : Sync also duplicates. Off by default.
+
+ --usecache : Use cache to speed up next syncs. Off by default.
--nousecache : Do not use cache. Caveat: --useuid --nousecache creates
duplicates on multiple runs.
+
--useuid : Use UIDs instead of headers as a criterion to recognize
messages. Option --usecache is then implied unless
--nousecache is used.
@@ -479,6 +558,7 @@ OPTIONS
--addheader adds a "Message-Id" header,
like "Message-Id: 12345@imapsync", where 12345
is the imap UID of the message on the host1 folder.
+ Useful to sync folders "Sent" or "Draft".
OPTIONS/debugging
@@ -496,7 +576,7 @@ OPTIONS
--tests : Run local non-regression tests. Exit code 0 means all ok.
--testslive : Run a live test with test1.lamiral.info imap server.
Useful to check the basics. Needs internet connection.
- --testslive6 : Run a live test with ks2ipv6.lamiral.info imap server.
+ --testslive6 : Run a live test with ks6ipv6.lamiral.info imap server.
Useful to check the ipv6 connectivity. Needs internet.
OPTIONS/specific
@@ -504,8 +584,8 @@ OPTIONS
--gmail1 : sets --host1 to Gmail and other options. See FAQ.Gmail.txt
--gmail2 : sets --host2 to Gmail and other options. See FAQ.Gmail.txt
- --office1 : sets --host1 to Office365 and other options. See FAQ.Exchange.txt
- --office2 : sets --host2 to Office365 and other options. See FAQ.Exchange.txt
+ --office1 : sets --host1 to Office365 and other options. See FAQ.Office365.txt
+ --office2 : sets --host2 to Office365 and other options. See FAQ.Office365.txt
--exchange1 : sets options for Exchange. See FAQ.Exchange.txt
--exchange2 : sets options for Exchange. See FAQ.Exchange.txt
@@ -515,13 +595,14 @@ OPTIONS
OPTIONS/behavior
- --maxmessagespersecond int : limits the number of messages transferred per second.
+ --maxmessagespersecond flo : limits the average number of messages
+ transferred per second.
--maxbytespersecond int : limits the average transfer rate per second.
--maxbytesafter int : starts --maxbytespersecond limitation only after
--maxbytesafter amount of data transferred.
- --maxsleep int : do not sleep more than int seconds.
+ --maxsleep flo : do not sleep more than int seconds.
On by default, 2 seconds max, like --maxsleep 2
--abort : terminates a previous call still running.
@@ -530,13 +611,13 @@ OPTIONS
--exitwhenover int : Stop syncing and exits when int total bytes
transferred is reached.
- --version : Print only software version.
+ --version : Print only the software version.
--noreleasecheck : Do not check for any new imapsync release.
--releasecheck : Check for new imapsync release.
it's an http request to
http://imapsync.lamiral.info/prj/imapsync/VERSION
- --noid : Do not send/receive ID command to imap servers.
+ --noid : Do not send/receive IMAP "ID" command to imap servers.
--justconnect : Just connect to both servers and print useful
information. Need only --host1 and --host2 options.
@@ -561,7 +642,7 @@ OPTIONS
SECURITY
- You can use --passfile1 instead of --password1 to give the password
+ You can use --passfile1 instead of --password1 to mention the password
since it is safer. With --password1 option, on Linux, any user on your
host can see the password by using the 'ps auxwwww' command. Using a
variable (like IMAPSYNC_PASSWORD1) is also dangerous because of the 'ps
@@ -576,7 +657,7 @@ SECURITY
on the imap servers. If the imaps port is closed then it open a normal
(clear) connection on port 143 but it looks for TLS support in the
CAPABILITY list of the servers. If TLS is supported then imapsync goes
- to encryption.
+ to encryption with STARTTLS.
If the automatic ssl and the tls detections fail then imapsync will not
protect against sniffing activities on the network, especially for
@@ -592,7 +673,10 @@ EXIT STATUS
Imapsync will exit with a 0 status (return code) if everything went
good. Otherwise, it exits with a non-zero status. That's classical Unix
behavior. Here is the list of the exit code values (an integer between 0
- and 255). The names reflect their meaning:
+ and 255). In Bourne Shells, this exit code value can be retrieved within
+ the variable value "$?" if you read it just after the imapsync call.
+
+ The names reflect their meaning:
EX_OK => 0 ; #/* successful termination */
EX_USAGE => 64 ; #/* command line usage error */
@@ -601,6 +685,7 @@ EXIT STATUS
EX_SOFTWARE => 70 ; #/* internal software error */
EXIT_CATCH_ALL => 1 ; # Any other error
EXIT_BY_SIGNAL => 6 ; # Should be 128+n where n is the sig_num
+ EXIT_BY_FILE => 7 ;
EXIT_PID_FILE_ERROR => 8 ;
EXIT_CONNECTION_FAILURE => 10 ;
EXIT_TLS_FAILURE => 12 ;
@@ -608,7 +693,18 @@ EXIT STATUS
EXIT_SUBFOLDER1_NO_EXISTS => 21 ;
EXIT_WITH_ERRORS => 111 ;
EXIT_WITH_ERRORS_MAX => 112 ;
+ EXIT_OVERQUOTA => 113 ;
+ EXIT_ERR_APPEND => 114 ;
+ EXIT_ERR_FETCH => 115 ;
+ EXIT_ERR_CREATE => 116 ;
+ EXIT_ERR_SELECT => 117 ;
+ EXIT_TRANSFER_EXCEEDED => 118 ;
+ EXIT_ERR_APPEND_VIRUS => 119 ;
EXIT_TESTS_FAILED => 254 ; # Like Test::More API
+ EXIT_CONNECTION_FAILURE_HOST1 => 101 ;
+ EXIT_CONNECTION_FAILURE_HOST2 => 102 ;
+ EXIT_AUTHENTICATION_FAILURE_USER1 => 161 ;
+ EXIT_AUTHENTICATION_FAILURE_USER2 => 162 ;
LICENSE AND COPYRIGHT
@@ -632,10 +728,10 @@ AUTHOR
Good feedback is always welcome. Bad feedback is very often welcome.
Gilles LAMIRAL earns his living by writing, installing, configuring and
- teaching free, open and often gratis software. Imapsync used to be
- "always gratis" but now it is only "often gratis" because imapsync is
- sold by its author, a good way to maintain and support free open public
- software over decades.
+ sometimes teaching free, open and often gratis software. Imapsync used
+ to be "always gratis" but now it is only "often gratis" because imapsync
+ is sold by its author, your servitor, a good way to maintain and support
+ free open public software tools over decades.
BUGS AND LIMITATIONS
@@ -686,8 +782,8 @@ INSTALL
and all Server releases 2000, 2003, 2008 and R2, 2012 and R2, 2016)
as a standalone binary software called imapsync.exe,
usually launched from a batch file in order to avoid always typing
- the options. There is also a 64bit binary called imapsync_64bit.exe
-
+ the options. There is also a 32bit binary called imapsync_32bit.exe
+
Imapsync works under OS X as a standalone binary
software called imapsync_bin_Darwin
@@ -721,7 +817,7 @@ SIMILAR SOFTWARE
See also https://imapsync.lamiral.info/S/external.shtml
for a better up to date list.
- Last updated and verified on Sun Dec 8, 2019.
+ List verified on Friday July 1, 2021.
imapsync: https://github.com/imapsync/imapsync (this is an imapsync copy, sometimes delayed, with --noreleasecheck by default since release 1.592, 2014/05/22)
imap_tools: https://web.archive.org/web/20161228145952/http://www.athensfbc.com/imap_tools/. The imap_tools code is now at https://github.com/andrewnimmo/rick-sanders-imap-tools
@@ -729,6 +825,7 @@ SIMILAR SOFTWARE
Doveadm-Sync: https://wiki2.dovecot.org/Tools/Doveadm/Sync ( Dovecot sync tool )
davmail: http://davmail.sourceforge.net/
offlineimap: http://offlineimap.org/
+ fdm: https://github.com/nicm/fdm
mbsync: http://isync.sourceforge.net/
mailsync: http://mailsync.sourceforge.net/
mailutil: https://www.washington.edu/imap/ part of the UW IMAP toolkit. (well, seems abandoned now)
@@ -750,6 +847,8 @@ SIMILAR SOFTWARE
imapbackup: https://github.com/rcarmo/imapbackup (A Python script for incremental backups of IMAP mailboxes)
BitRecover email-backup 99 USD, 299 USD https://www.bitrecover.com/email-backup/.
ImportExportTools: https://addons.thunderbird.net/en-us/thunderbird/addon/importexporttools/ ImportExportTools for Mozilla Thunderbird by Paolo Kaosmos. ImportExportTools does not do IMAP.
+ rximapmail: https://sourceforge.net/projects/rximapmail/
+ CodeTwo: https://www.codetwo.com/ but CodeTwo does imap source to Office365 only.
HISTORY
@@ -767,6 +866,6 @@ HISTORY
tarball source (more precisely in the examples/ directory of the
Mail-IMAPClient tarball).
- So many happened since then that I wonder if it remains any lines of the
- original copy_folder.pl in imapsync source code.
+ So many changes happened since then that I wonder if it remains any
+ lines of the original copy_folder.pl in imapsync source code.
diff --git a/README.md b/README.md
deleted file mode 100644
index 8a6fe04..0000000
--- a/README.md
+++ /dev/null
@@ -1,789 +0,0 @@
-# Imapsync sponsoring
-
-You are a great imapsync user or perhaps a future one! I thank you for that, very much.
-The paradox to get imapsync stay free and gratis for anyone is that the imapsync author needs to be paid for maintening and improving it.
-
-In case you're using imapsync in a professional context,
-then consider buying imapsync and support at https://imapsync.lamiral.info/#buy_all,
-you will get also a regular invoice for your company.
-
-If it's too much, then consider a smaller donation:
-
-[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=TUENPW59U9LL2) or on regular monthly donation via the new github sponsoring campaign https://github.com/sponsors/gilleslamiral
-
-**Thanks in any case, even no money, I'm ok with that!**
-
-# README
-````
-NAME
-
- imapsync - Email IMAP tool for syncing, copying, migrating and archiving
- email mailboxes between two imap servers, one way, and without
- duplicates.
-
-VERSION
-
- This documentation refers to Imapsync $Revision: 1.977 $
-
-USAGE
-
- To synchronize the source imap account
- "test1" on server "test1.lamiral.info" with password "secret1"
- to the destination imap account
- "test2" on server "test2.lamiral.info" with password "secret2"
- do:
-
- imapsync \
- --host1 test1.lamiral.info --user1 test1 --password1 secret1 \
- --host2 test2.lamiral.info --user2 test2 --password2 secret2
-
-DESCRIPTION
-
- We sometimes need to transfer mailboxes from one imap server to one
- another.
-
- Imapsync command is a tool allowing incremental and recursive imap
- transfers from one mailbox to another. If you don't understand the
- previous sentence, it's normal, it's pedantic computer oriented jargon.
-
- All folders are transferred, recursively, meaning the whole folder
- hierarchy is taken, all messages in them, and all messages flags (\Seen
- \Answered \Flagged etc.) are synced too.
-
- Imapsync reduces the amount of data transferred by not transferring a
- given message if it already resides on the destination side. Messages
- that are on the destination side but not on the source side stay as they
- are (see the --delete2 option to have a strict sync).
-
- How imapsync knows a message is already on both sides? Same specific
- headers and the transfer is done only once. By default, the
- identification headers are "Message-Id:" and "Received:" lines but this
- choice can be changed with the --useheader option.
-
- All flags are preserved, unread messages will stay unread, read ones
- will stay read, deleted will stay deleted.
-
- You can abort the transfer at any time and restart it later, imapsync
- works well with bad connections and interruptions, by design. On a
- terminal hit Ctr-c twice within two seconds in order to abort the
- program. Hit Ctr-c just once makes imapsync reconnect to both imap
- servers.
-
- A classical scenario is synchronizing a mailbox B from another mailbox A
- where you just want to keep a strict copy of A in B. Strict meaning all
- messages in A will be in B but no more.
-
- For this, option --delete2 has to be used, it deletes messages in host2
- folder B that are not in host1 folder A. If you also need to destroy
- host2 folders that are not in host1 then use --delete2folders. See also
- --delete2foldersonly and --delete2foldersbutnot to set up exceptions on
- folders to destroy. INBOX will never be destroy, it's a mandatory folder
- in IMAP.
-
- A different scenario is to delete the messages from the source mailbox
- after a successful transfer, it can be a good feature when migrating
- mailboxes since messages will be only on one side. The source account
- will only have messages that are not on the destination yet, ie,
- messages that arrived after a sync or that failed to be copied.
-
- In that case, use the --delete1 option. Option --delete1 implies also
- option --expunge1 so all messages marked deleted on host1 will be really
- deleted. In IMAP protocol deleting a message does not really delete it,
- it marks it with the flag \Deleted, allowing an undelete. Expunging a
- folder removes, definitively, all the messages marked as \Deleted in
- this folder.
-
- You can also decide to remove empty folders once all of their messages
- have been transferred. Add --delete1emptyfolders to obtain this
- behavior.
-
- Imapsync is not adequate for maintaining two active imap accounts in
- synchronization when the user plays independently on both sides. Use
- offlineimap (written by John Goerzen) or mbsync (written by Michael R.
- Elkins) for a 2 ways synchronization.
-
-OPTIONS
-
- usage: imapsync [options]
-
- The standard options are the six values forming the credentials. Three
- values on each side are needed in order to log in into the IMAP servers.
- These six values are a host, a username, and a password, two times.
-
- Conventions used in the following descriptions of the options:
-
- str means string
- int means integer
- reg means regular expression
- cmd means command
-
- --dry : Makes imapsync doing nothing for real, just print what
- would be done without --dry.
-
- OPTIONS/credentials
-
- --host1 str : Source or "from" imap server.
- --port1 int : Port to connect on host1.
- Optional since default ports are the
- well known ports imap/143 or imaps/993.
- --user1 str : User to login on host1.
- --password1 str : Password for the user1.
-
- --host2 str : "destination" imap server.
- --port2 int : Port to connect on host2. Optional
- --user2 str : User to login on host2.
- --password2 str : Password for the user2.
-
- --showpasswords : Shows passwords on output instead of "MASKED".
- Useful to restart a complete run by just reading
- the command line used in the log,
- or to debug passwords.
- It's not a secure practice at all.
-
- --passfile1 str : Password file for the user1. It must contain the
- password on the first line. This option avoids showing
- the password on the command line like --password1 does.
- --passfile2 str : Password file for the user2.
-
- You can also pass the passwords in the environment variables
- IMAPSYNC_PASSWORD1 and IMAPSYNC_PASSWORD2
-
- OPTIONS/encryption
-
- --nossl1 : Do not use a SSL connection on host1.
- --ssl1 : Use a SSL connection on host1. On by default if possible.
-
- --nossl2 : Do not use a SSL connection on host2.
- --ssl2 : Use a SSL connection on host2. On by default if possible.
-
- --notls1 : Do not use a TLS connection on host1.
- --tls1 : Use a TLS connection on host1. On by default if possible.
-
- --notls2 : Do not use a TLS connection on host2.
- --tls2 : Use a TLS connection on host2. On by default if possible.
-
- --debugssl int : SSL debug mode from 0 to 4.
-
- --sslargs1 str : Pass any ssl parameter for host1 ssl or tls connection. Example:
- --sslargs1 SSL_verify_mode=1 --sslargs1 SSL_version=SSLv3
- See all possibilities in the new() method of IO::Socket::SSL
- http://search.cpan.org/perldoc?IO::Socket::SSL#Description_Of_Methods
- --sslargs2 str : Pass any ssl parameter for host2 ssl or tls connection.
- See --sslargs1
-
- --timeout1 int : Connection timeout in seconds for host1.
- Default is 120 and 0 means no timeout at all.
- --timeout2 int : Connection timeout in seconds for host2.
- Default is 120 and 0 means no timeout at all.
-
- OPTIONS/authentication
-
- --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 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 authentication for host1.
- --authmd52 : Use MD5 authentication for host2.
- --domain1 str : Domain on host1 (NTLM authentication).
- --domain2 str : Domain on host2 (NTLM authentication).
-
- OPTIONS/folders
-
- --folder str : Sync this folder.
- --folder str : and this one, etc.
- --folderrec str : Sync this folder recursively.
- --folderrec str : and this one, etc.
-
- --folderfirst str : Sync this folder first. Ex. --folderfirst "INBOX"
- --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 (example: with folders
- "Sent", "SENT" and "sent"
- on host1 only "Sent" will be synced to host2).
-
- --skipemptyfolders : Empty host1 folders are not created on host2.
-
- --include reg : Sync folders matching this regular expression
- --include reg : or this one, etc.
- If both --include --exclude options are used, then
- 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.
-
- --automap : guesses folders mapping, for folders well known as
- "Sent", "Junk", "Drafts", "All", "Archive", "Flagged".
-
- --f1f2 str1=str2 : Force folder str1 to be synced to str2,
- --f1f2 overrides --automap and --regextrans2.
-
- --subfolder2 str : Syncs the whole host1 folders hierarchy under the
- host2 folder named str.
- It does it internally by adding three
- --regextrans2 options before all others.
- Add --debug to see what's really going on.
-
- --subfolder1 str : Syncs the host1 folders hierarchy which is under folder
- str to the root hierarchy of host2.
- It's the couterpart of a sync done by --subfolder2
- when doing it in the reverse order.
- Backup/Restore scenario:
- Use --subfolder2 str for a backup to the folder str
- on host2. Then use --subfolder1 str for restoring
- from the folder str, after inverting
- host1/host2 user1/user2 values.
-
-
- --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.
-
- --prefix1 str : Remove prefix str to all destination folders,
- usually "INBOX." or "INBOX/" or an empty string "".
- imapsync guesses the prefix if host1 imap server
- does not have NAMESPACE capability. So this option
- should not be used most of the time.
- --prefix2 str : Add prefix to all host2 folders. See --prefix1
-
- --sep1 str : Host1 separator. This option should not be used
- most of the time.
- Imapsync gets the separator from the server itself,
- by using NAMESPACE, or it tries to guess it
- from the folders listing (it counts
- characters / . \\ \ in folder names and choose the
- more frequent, or finally / if nothing is found.
- --sep2 str : Host2 separator. See --sep1
-
- --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 for a run, then
- remove --justfolders for the next ones.
- Have in mind that --regextrans2 is applied after
- the automatic prefix and separator inversion.
- For examples see:
- https://imapsync.lamiral.info/FAQ.d/FAQ.Folders_Mapping.txt
-
- OPTIONS/folders sizes
-
- --nofoldersizes : Do not calculate the size of each folder at the
- beginning of the sync. Default is to calculate them.
- --nofoldersizesatend: Do not calculate the size of each folder at the
- end of the sync. Default is to calculate them.
- --justfoldersizes : Exit after having printed the initial folder sizes.
-
- OPTIONS/tmp
-
- --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
- /tmp is often too small and deleted at reboot.
- --tmpdir /var/tmp should be better.
- --pidfile str : The file where imapsync pid is written,
- it can be dirname/filename.
- Default name is imapsync.pid in tmpdir.
- --pidfilelocking : Abort if pidfile already exists. Useful to avoid
- concurrent transfers on the same mailbox.
-
- OPTIONS/log
-
- --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/
-
- The default logfile name is for example
-
- LOG_imapsync/2019_12_22_23_57_59_532_user1_user2.txt
-
- where:
-
- 2019_12_22_23_57_59_532 is nearly the date of the start
- YYYY_MM_DD_HH_MM_SS_mmm
- year_month_day_hour_minute_seconde_millisecond
-
- and user1 user2 are the --user1 --user2 values.
-
- OPTIONS/messages
-
- --skipmess reg : Skips messages matching the regex.
- Example: 'm/[\x80-ff]/' # to avoid 8bits messages.
- --skipmess is applied before --regexmess
- --skipmess reg : or this one, etc.
-
- --skipcrossduplicates : Avoid copying messages that are already copied
- in another folder, good from Gmail to X when
- X is not also Gmail.
- Activated with --gmail1 unless --noskipcrossduplicates
-
- --debugcrossduplicates : Prints which messages (UIDs) are skipped with
- --skipcrossduplicates (and in what other folders
- they are).
-
- --pipemess cmd : Apply this cmd command to each message content
- before the copy.
- --pipemess cmd : and this one, etc.
- With several --pipemess, the output of each cmd
- command (STDOUT) is given to the input (STDIN)
- of the next command.
- For example,
- --pipemess cmd1 --pipemess cmd2 --pipemess cmd3
- is like a Unix pipe:
- "cat message | cmd1 | cmd2 | cmd3"
-
- --disarmreadreceipts : Disarms read receipts (host2 Exchange issue)
-
- --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.
-
- OPTIONS/labels
-
- Gmail present labels as folders in imap. Imapsync can accelerate the
- sync by syncing X-GM-LABELS, it will avoid to transfer messages when
- they are already on host2.
-
- --synclabels : Syncs also Gmail labels when a message is copied to host2.
- Activated by default with --gmail1 --gmail2 unless
- --nosynclabels is added.
-
- --resynclabels : Resyncs Gmail labels when a message is already on host2.
- Activated by default with --gmail1 --gmail2 unless
- --noresynclabels is added.
-
- For Gmail syncs, see also:
- https://imapsync.lamiral.info/FAQ.d/FAQ.Gmail.txt
-
- OPTIONS/flags
-
- If you encounter flag problems see also:
- https://imapsync.lamiral.info/FAQ.d/FAQ.Flags.txt
-
- --regexflag reg : Apply the whole regex to each flags list.
- Example: 's/"Junk"//g' # to remove "Junk" flag.
- --regexflag reg : then this one, etc.
-
- --resyncflags : Resync flags for already transferred messages.
- On by default.
- --noresyncflags : Do not resync flags for already transferred messages.
- May be useful when a user has already started to play
- with its host2 account.
-
- OPTIONS/deletions
-
- --delete1 : Deletes messages on host1 server after a successful
- transfer. Option --delete1 has the following behavior:
- it marks messages as deleted with the IMAP flag
- \Deleted, then messages are really deleted with an
- EXPUNGE IMAP command. If expunging after each message
- slows down too much the sync then use
- --noexpungeaftereach to speed up, expunging will then be
- done only twice per folder, one at the beginning and
- one at the end of a folder sync.
-
- --expunge1 : Expunge messages on host1 just before syncing a folder.
- Expunge is done per folder.
- Expunge aims is to really delete messages marked deleted.
- An expunge is also done after each message copied
- if option --delete1 is set (unless --noexpungeaftereach).
-
- --noexpunge1 : Do not expunge messages on host1.
-
- --delete1emptyfolders : Deletes empty folders on host1, INBOX excepted.
- Useful with --delete1 since what remains on host1
- is only what failed to be synced.
-
- --delete2 : Delete messages in host2 that are not in
- host1 server. Useful for backup or pre-sync.
- --delete2 implies --uidexpunge2
-
- --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
- and see what folders will be deleted.
-
- --delete2foldersonly reg : Delete only folders matching the regex reg.
- Example: --delete2foldersonly "/^Junk$|^INBOX.Junk$/"
- This option activates --delete2folders
-
- --delete2foldersbutnot reg : Do not delete folders matching the regex rex.
- Example: --delete2foldersbutnot "/Tasks$|Contacts$|Foo$/"
- This option activates --delete2folders
-
- --noexpunge2 : Do not expunge messages on host2.
- --nouidexpunge2 : Do not uidexpunge messages on the host2 account
- that are not on the host1 account.
-
- OPTIONS/dates
-
- If you encounter problems with dates, see also:
- https://imapsync.lamiral.info/FAQ.d/FAQ.Dates.txt
-
- --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 (Unix mtime).
- --idatefromheader : Sets the internal dates on host2 same as the
- ones in "Date:" headers.
-
- OPTIONS/message selection
-
- --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 (+ zone are the messages selected):
- past|----maxage+++++++++++++++>now
- past|+++++++++++++++minage---->now
- past|----maxage+++++minage---->now (intersection)
- past|++++minage-----maxage++++>now (union)
-
- --search str : Selects only messages returned by this IMAP SEARCH
- command. Applied on both sides.
- For a complete set of what can be search see
- https://imapsync.lamiral.info/FAQ.d/FAQ.Messages_Selection.txt
-
- --search1 str : Same as --search but for selecting host1 messages only.
- --search2 str : Same as --search but for selecting host2 messages only.
- So --search CRIT equals --search1 CRIT --search2 CRIT
-
- --maxlinelength int : skip messages with a line length longer than int bytes.
- RFC 2822 says it must be no more than 1000 bytes but
- real life servers and email clients do more.
-
-
- --useheader str : Use this header to compare messages on both sides.
- Ex: Message-ID or Subject or Date.
- --useheader str and this one, etc.
-
- --usecache : Use cache to speed up next syncs. Not set by default.
- --nousecache : Do not use cache. Caveat: --useuid --nousecache creates
- duplicates on multiple runs.
- --useuid : Use UIDs instead of headers as a criterion to recognize
- messages. Option --usecache is then implied unless
- --nousecache is used.
-
- OPTIONS/miscellaneous
-
- --syncacls : Synchronizes acls (Access Control Lists).
- Acls in IMAP are not standardized, be careful
- since one acl code on one side may signify something
- else on the other one.
- --nosyncacls : Does not synchronize acls. This is the default.
-
- --addheader : When a message has no headers to be identified,
- --addheader adds a "Message-Id" header,
- like "Message-Id: 12345@imapsync", where 12345
- is the imap UID of the message on the host1 folder.
-
- OPTIONS/debugging
-
- --debug : Debug mode.
- --debugfolders : Debug mode for the folders part only.
- --debugcontent : Debug content of the messages transferred. Huge output.
- --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. Twice very verbose.
- --debugmemory : Debug mode showing memory consumption after each copy.
-
- --errorsmax int : Exit when int number of errors is reached. Default is 50.
-
- --tests : Run local non-regression tests. Exit code 0 means all ok.
- --testslive : Run a live test with test1.lamiral.info imap server.
- Useful to check the basics. Needs internet connection.
- --testslive6 : Run a live test with ks2ipv6.lamiral.info imap server.
- Useful to check the ipv6 connectivity. Needs internet.
-
- OPTIONS/specific
-
- --gmail1 : sets --host1 to Gmail and other options. See FAQ.Gmail.txt
- --gmail2 : sets --host2 to Gmail and other options. See FAQ.Gmail.txt
-
- --office1 : sets --host1 to Office365 and other options. See FAQ.Exchange.txt
- --office2 : sets --host2 to Office365 and other options. See FAQ.Exchange.txt
-
- --exchange1 : sets options for Exchange. See FAQ.Exchange.txt
- --exchange2 : sets options for Exchange. See FAQ.Exchange.txt
-
- --domino1 : sets options for Domino. See FAQ.Domino.txt
- --domino2 : sets options for Domino. See FAQ.Domino.txt
-
- OPTIONS/behavior
-
- --maxmessagespersecond int : limits the number of messages transferred per second.
-
- --maxbytespersecond int : limits the average transfer rate per second.
- --maxbytesafter int : starts --maxbytespersecond limitation only after
- --maxbytesafter amount of data transferred.
-
- --maxsleep int : do not sleep more than int seconds.
- On by default, 2 seconds max, like --maxsleep 2
-
- --abort : terminates a previous call still running.
- It uses the pidfile to know what process to abort.
-
- --exitwhenover int : Stop syncing and exits when int total bytes
- transferred is reached.
-
- --version : Print only software version.
- --noreleasecheck : Do not check for any new imapsync release.
- --releasecheck : Check for new imapsync release.
- it's an http request to
- http://imapsync.lamiral.info/prj/imapsync/VERSION
-
- --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.
- Obsolete since "imapsync --host1 imaphost" alone
- implies --justconnect
-
- --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.
-
- Example: to synchronize imap account "test1" on "test1.lamiral.info"
- to imap account "test2" on "test2.lamiral.info"
- with test1 password "secret1"
- and test2 password "secret2"
-
- imapsync \
- --host1 test1.lamiral.info --user1 test1 --password1 secret1 \
- --host2 test2.lamiral.info --user2 test2 --password2 secret2
-
-SECURITY
-
- You can use --passfile1 instead of --password1 to give the password
- since it is safer. With --password1 option, on Linux, any user on your
- host can see the password by using the 'ps auxwwww' command. Using a
- variable (like IMAPSYNC_PASSWORD1) is also dangerous because of the 'ps
- auxwwwwe' command. So, saving the password in a well protected file (600
- or rw-------) is the best solution.
-
- Imapsync activates ssl or tls encryption by default, if possible.
-
- What detailed behavior is under this "if possible"?
-
- Imapsync activates ssl if the well known port imaps port (993) is open
- on the imap servers. If the imaps port is closed then it open a normal
- (clear) connection on port 143 but it looks for TLS support in the
- CAPABILITY list of the servers. If TLS is supported then imapsync goes
- to encryption.
-
- If the automatic ssl and the tls detections fail then imapsync will not
- protect against sniffing activities on the network, especially for
- passwords.
-
- If you want to force ssl or tls just use --ssl1 --ssl2 or --tls1 --tls2
-
- See also the document FAQ.Security.txt in the FAQ.d/ directory or at
- https://imapsync.lamiral.info/FAQ.d/FAQ.Security.txt
-
-EXIT STATUS
-
- Imapsync will exit with a 0 status (return code) if everything went
- good. Otherwise, it exits with a non-zero status. That's classical Unix
- behavior. Here is the list of the exit code values (an integer between 0
- and 255). The names reflect their meaning:
-
- EX_OK => 0 ; #/* successful termination */
- EX_USAGE => 64 ; #/* command line usage error */
- EX_NOINPUT => 66 ; #/* cannot open input */
- EX_UNAVAILABLE => 69 ; #/* service unavailable */
- EX_SOFTWARE => 70 ; #/* internal software error */
- EXIT_CATCH_ALL => 1 ; # Any other error
- EXIT_BY_SIGNAL => 6 ; # Should be 128+n where n is the sig_num
- EXIT_PID_FILE_ERROR => 8 ;
- EXIT_CONNECTION_FAILURE => 10 ;
- EXIT_TLS_FAILURE => 12 ;
- EXIT_AUTHENTICATION_FAILURE => 16 ;
- EXIT_SUBFOLDER1_NO_EXISTS => 21 ;
- EXIT_WITH_ERRORS => 111 ;
- EXIT_WITH_ERRORS_MAX => 112 ;
- EXIT_TESTS_FAILED => 254 ; # Like Test::More API
-
-LICENSE AND COPYRIGHT
-
- Imapsync is free, open, public but not always gratis software cover by
- the NOLIMIT Public License, now called NLPL. See the LICENSE file
- included in the distribution or just read this simple sentence as it IS
- the licence text:
-
- "No limits to do anything with this work and this license."
-
- In case it is not long enough, I repeat:
-
- "No limits to do anything with this work and this license."
-
- Look at https://imapsync.lamiral.info/LICENSE
-
-AUTHOR
-
- Gilles LAMIRAL
-
- Good feedback is always welcome. Bad feedback is very often welcome.
-
- Gilles LAMIRAL earns his living by writing, installing, configuring and
- teaching free, open and often gratis software. Imapsync used to be
- "always gratis" but now it is only "often gratis" because imapsync is
- sold by its author, a good way to maintain and support free open public
- software over decades.
-
-BUGS AND LIMITATIONS
-
- See https://imapsync.lamiral.info/FAQ.d/FAQ.Reporting_Bugs.txt
-
-IMAP SERVERS supported
-
- See https://imapsync.lamiral.info/S/imapservers.shtml
-
-HUGE MIGRATION
-
- 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. The separator used in this example is ';'
-
- The file.txt file contains:
-
- 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 ...
-
- On Unix the shell program 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
-
- On Windows the batch program 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 ...
-
- The ... have to be replaced by nothing or any imapsync option. Welcome
- in shell or batch programming !
-
- You will find already written scripts at
- https://imapsync.lamiral.info/examples/
-
-INSTALL
-
- Imapsync works under any Unix with Perl.
-
- Imapsync works under most Windows (2000, XP, Vista, Seven, Eight, Ten
- and all Server releases 2000, 2003, 2008 and R2, 2012 and R2, 2016)
- as a standalone binary software called imapsync.exe,
- usually launched from a batch file in order to avoid always typing
- the options. There is also a 64bit binary called imapsync_64bit.exe
-
- Imapsync works under OS X as a standalone binary
- software called imapsync_bin_Darwin
-
- Purchase latest imapsync at
- https://imapsync.lamiral.info/
-
- You'll receive a link to a compressed tarball called imapsync-x.xx.tgz
- where x.xx is the version number. Untar the tarball where
- you want (on Unix):
-
- tar xzvf imapsync-x.xx.tgz
-
- Go into the directory imapsync-x.xx and read the INSTALL file.
- As mentioned at https://imapsync.lamiral.info/#install
- the INSTALL file can also be found at
- https://imapsync.lamiral.info/INSTALL.d/INSTALL.ANY.txt
- It is now split in several files for each system
- https://imapsync.lamiral.info/INSTALL.d/
-
-CONFIGURATION
-
- There is no specific configuration file for imapsync, everything is
- specified by the command line parameters and the default behavior.
-
-HACKING
-
- Feel free to hack imapsync as the NOLIMIT license permits it.
-
-SIMILAR SOFTWARE
-
- See also https://imapsync.lamiral.info/S/external.shtml
- for a better up to date list.
-
- Last updated and verified on Sun Dec 8, 2019.
-
- imapsync: https://github.com/imapsync/imapsync (this is an imapsync copy, sometimes delayed, with --noreleasecheck by default since release 1.592, 2014/05/22)
- imap_tools: https://web.archive.org/web/20161228145952/http://www.athensfbc.com/imap_tools/. The imap_tools code is now at https://github.com/andrewnimmo/rick-sanders-imap-tools
- imaputils: https://github.com/mtsatsenko/imaputils (very old imap_tools fork)
- Doveadm-Sync: https://wiki2.dovecot.org/Tools/Doveadm/Sync ( Dovecot sync tool )
- davmail: http://davmail.sourceforge.net/
- offlineimap: http://offlineimap.org/
- mbsync: http://isync.sourceforge.net/
- mailsync: http://mailsync.sourceforge.net/
- mailutil: https://www.washington.edu/imap/ part of the UW IMAP toolkit. (well, seems abandoned now)
- imaprepl: https://bl0rg.net/software/ http://freecode.com/projects/imap-repl/
- imapcopy (Pascal): http://www.ardiehl.de/imapcopy/
- imapcopy (Java): https://code.google.com/archive/p/imapcopy/
- imapsize: http://www.broobles.com/imapsize/
- migrationtool: http://sourceforge.net/projects/migrationtool/
- imapmigrate: http://sourceforge.net/projects/cyrus-utils/
- larch: https://github.com/rgrove/larch (derived from wonko_imapsync, good at Gmail)
- wonko_imapsync: http://wonko.com/article/554 (superseded by larch)
- pop2imap: http://www.linux-france.org/prj/pop2imap/ (I wrote that too)
- exchange-away: http://exchange-away.sourceforge.net/
- SyncBackPro: http://www.2brightsparks.com/syncback/sbpro.html
- ImapSyncClient: https://github.com/ridaamirini/ImapSyncClient
- MailStore: https://www.mailstore.com/en/products/mailstore-home/
- mnIMAPSync: https://github.com/manusa/mnIMAPSync
- imap-upload: http://imap-upload.sourceforge.net/ (A tool for uploading a local mbox file to IMAP4 server)
- imapbackup: https://github.com/rcarmo/imapbackup (A Python script for incremental backups of IMAP mailboxes)
- BitRecover email-backup 99 USD, 299 USD https://www.bitrecover.com/email-backup/.
- ImportExportTools: https://addons.thunderbird.net/en-us/thunderbird/addon/importexporttools/ ImportExportTools for Mozilla Thunderbird by Paolo Kaosmos. ImportExportTools does not do IMAP.
-
-HISTORY
-
- I initially wrote imapsync in July 2001 because an enterprise, called
- BaSystemes, paid me to install a new imap server without losing huge old
- mailboxes located in a far away remote imap server, accessible by an
- often broken low-bandwidth ISDN link.
-
- I had to verify every mailbox was well transferred, all folders, all
- messages, without wasting bandwidth or creating duplicates upon resyncs.
- The imapsync design was made with the beautiful rsync command in mind.
-
- Imapsync started its life as a patch of the copy_folder.pl script. The
- script copy_folder.pl comes from the Mail-IMAPClient-2.1.3 perl module
- tarball source (more precisely in the examples/ directory of the
- Mail-IMAPClient tarball).
-
- So many happened since then that I wonder if it remains any lines of the
- original copy_folder.pl in imapsync source code.
-
diff --git a/README_Windows.txt b/README_Windows.txt
index 6d89489..99ba050 100644
--- a/README_Windows.txt
+++ b/README_Windows.txt
@@ -1,112 +1,150 @@
-# $Id: README_Windows.txt,v 1.18 2019/12/11 18:52:16 gilles Exp gilles $
+# $Id: README_Windows.txt,v 1.24 2021/06/15 10:29:45 gilles Exp gilles $
#
# This is the README_Windows.txt file for imapsync
-# imapsync : IMAP syncing and migration tool.
+# imapsync: IMAP syncing and migration tool.
=====================
Imapsync on Windows
=====================
- There is two ways to install and use imapsync on Windows systems: A) or B).
+ There are two ways to install and use imapsync on Windows systems: A) or B).
Standard users should take the A) way, the simplest way.
- Developers, or powerful users that want to build their own imapsync.exe
+ Developers, or power users that want to build their own imapsync.exe
or modify it, have to consider the B) way, the complex and powerful way.
+
---------------
A) Simplest way
---------------
A.0) Preamble for visual users looking for a visual tool.
- Imapsync itself is not a visual tool. The visual tool is Notepad
- or any text editor. Many pure visual users have succeeded using imapsync
- to transfer their email accounts. Only the ones that tried have succeeded,
- so don't give up before trying once. Another assumption is that visual
- users can read. So let's go further.
+ First, the visual thing I am talking about here is not the online visual
+ interface I call /X that you might have seen and used at the URL
+ https://imapsync.lamiral.info/X/
+ This /X visual interface is not yet available on Windows as a service
+ that you can install and use in your system.
+ I plan to make a visual tool available on Windows but, for now,
+ I encountered technical issues.
+
+ So what visual thing am I talking about?
+
+ Imapsync itself is not a visual tool. The visual tool is Notepad or
+ any text editor. Many pure visual users have succeeded in using
+ imapsync to transfer their email accounts. As you can guess, only
+ the ones that tried have succeeded, so don't give up before
+ trying at least once. Another assumption is that visual users can read.
+ Let's go for some reading!
A.1) Get imapsync.
Get imapsync at https://imapsync.lamiral.info/
- You'll then have access to a zip archive file named imapsync_1.xxx.zip
- where 1.xxx is the imapsync release number.
+ You'll then have access to a zip archive file named imapsync_1.977.zip
+ where 1.977 is the imapsync release number.
A.2) Extract the zip file in a folder where you will work with imapsync.
You can work on the Desktop since the zip file extraction creates
- a unique folder named imapsync_1.xxx (where 1.xxx is the imapsync
- release number).
+ a unique folder named imapsync_1.977/
+
+ Do not unzip the archive in what is called a "system" directory since
+ you may encounter permission issues.
+
+Two-point to have in mind:
+* You don't need to be an Administrator to unzip the zip archive.
+* You don't need to be an Administrator to run imapsync.
+
A.3) Check the folder
- In the folder extracted imapsync_1.xxx you see 6 files and 2 directories:
+ In the folder extracted imapsync_1.977 you see 7 files and 2 directories,
+ which may be presented in a different order than the following, the order
+ is not important anyway. The really important files to get your mailbox
+ transfer job started in a few minutes are the first two files of the
+ following list:
* README_Windows.txt is the current file you are reading.
+ * imapsync_example.bat is a simple batch file example that you will copy and edit.
+
* README.txt is the imapsync general document.
* FAQ.d/* FAQs are a good read when something goes wrong.
- * imapsync_example.bat is a simple batch file example you will copy and edit.
* sync_loop_windows.bat is a batch file example for syncing many accounts.
* file.txt is an input file example for syncing many accounts.
* imapsync.exe is the imapsync 64bit binary. You don't have to run it directly.
* imapsync_32bit.exe is the imapsync 32bit binary. You don't have to run it directly.
* Cook/ is the directory to build imapsync.exe from its source,
- for the B) way and expert users.
+ for the B) way and expert users.
You can copy or rename the file imapsync_example.bat as you wish,
- as long as its extension remains ".bat", for example mysync.bat
+ as long as its extension remains ".bat", for example, mysync.bat
- On Windows systems .bat extension means "I am a batch script".
- A batch script is a file containing commands, it's a program.
- Don't be afraid, a program can be simple or at least simple to
- modify. Think it like a cook recipe.
+ On Windows systems, a file name ending with a .bat extension means "I am a batch script".
+ A batch script is a file containing commands, it's a program.
+ Don't be afraid, a program can be very simple to modify and I hope
+ imapsync_example.bat is one of them.
- The batch scripts have to stay in the same directory than
+ The batch scripts have to stay in the same directory as
imapsync.exe because of the way they call imapsync.exe.
- They use ".\imapsync.exe", so let them be in the same directory.
+ They use the string ".\imapsync.exe", so let them be in the same directory.
- Or you can change the path .\ to whatever you want if you understand what
+ You can change the path .\ to whatever you want if you understand what
you are doing (you have to use a pathname from the script point of view).
- For the rest of this documentation I assume you copied
- imapsync_example.bat to a file named imapsync_stuff.bat
+ For the rest of this documentation, I assume you copied
+ imapsync_example.bat to a file named mysync.bat
- If you don't know how to copy and rename a file then
- use imapsync_example.bat itself.
+ If you don't know how to copy and rename a file then use imapsync_example.bat
+ itself, it's ok. The original file is still in the zip file in case
+ you want to restart from scratch.
A.4) Edit the batch file
- Edit the file imapsync_stuff.bat and change the values with yours.
- In order to edit it you have do a right click on it and select "modify"
+ This section describes how to edit the file mysync.bat to change
+ the example values with yours.
+
+ To edit mysync.bat, you have to right-click on it and select "modify"
in the list presented in the small window menu.
- Notepad or Notepadd++ are very good editors to modify it.
+ Notepad or Notepadd++ are very good editor candidates to modify it.
+ Notepad is already installed on any Windows system, Notepadd++
+ is not usually installed but if you have it then use it.
- Office Word or any powerful text processor are not good for that job.
- Text processors transform files in a special format that
- are wrong to make them stay a good batch file, so don't use them!
+ Office Word or any powerful text processor is NOT good for that job.
+ Text processors transform files in a special format that is wrong to
+ make them stay a good batch file, so don't use them!
Files FAQ.txt and FAQ.d/* contain many tips and special options sometimes
- needed by specific imap server softwares like Exchange or Gmail.
+ needed by specific imap software servers like Exchange, Office365, or Gmail.
Those files are also available online at
https://imapsync.lamiral.info/FAQ.d/
-
+ You don't have to look into them unless you encounter problems.
A.5) Run the batch file
- To run imapsync with your values just double-click on
- the batch file imapsync_stuff.bat
+ To run imapsync with your values just double-click on the batch file mysync.bat
There is no need to have administrator privileges to run imapsync.
- The run happens in a DOS window.
+ The run happens in a DOS window; usually, this window is black.
-A.6) Look the sync running.
- You can abort it at any time with a quick double ctrl-c,
- hit ctrl-c twice within one second.
+If imapsync.exe returns immediately with the ERRORLEVEL -1, it may be
+because you have an Group Policy in place to prevent execution of
+programs in %TEMP%. Temporarily remove this restriction and imapsync
+will work as expected. Thanks to Walter H. for this input!
+Technically imapsync.exe is an embedded Perl script with also Perl
+and many Perl modules glued together in an archive auto-extracted.
+
+A.6) Look at the sync running.
+
+ You can abort the sync at any time with a quick double ctrl-c,
+ ie hit ctrl-c twice within one second.
+
A single ctrl-c will reconnect to both imap servers.
- You can also abort the sync by closing the DOS window.
+ You can also simply abort the sync by closing the DOS window,
+ using the cross situated at the up-right corner.
What you see in this DOS terminal is also put in a logfile located
in the subdirectory LOG_imapsync/
@@ -114,30 +152,37 @@ A.6) Look the sync running.
A.7) Control what happened.
When the sync is finished you can find the whole log file
- of the output in the folder named "LOG_imapsync".
- the logfile name is based on the launching date,
- hour, minute, second, milliseconds plus the user1 and user2 parameters.
- For example a file name can be
+ of the output in the folder named "LOG_imapsync/".
+ The logfile name is based on the launching date,
+ hour, minute, second, milliseconds, plus the user1 and user2 parameters.
+ For example, a file name can be
LOG_imapsync\2019_11_29_14_49_36_514_tata_titi.txt
- There is one logfile created at each run.
- The logfile name is printed at the end of the imapsync run.
+ There is one log file created for each run.
+ The log file name is printed at the end of the imapsync run.
- When there is a problem, the problem is very often described
- at the end of the logfile.
+ IMPORTANT: When there is a problem, the problem is very often described
+ at the end of the log file. It means you don't have to read all this
+ bloody ununderstandable verbose logfile, just read the end first.
A.8) Loop on A.4 through A.7
- * A.4) edit
- * A.5) run
- * A.6) look
- * A.7) control
+ * A.4) edit the batch file
+ * A.5) run the batch file
+ * A.6) look at the run and the log file
+ * A.7) control what happened.
- Loop on the process of editing, running and controlling imapsync
+ Loop on the process of editing, running, and controlling imapsync
until you solve all issues and the sync is over.
- Congratulations!
+A good sign that the sync went very well is when the nearly last lines are like:
+
+" The sync looks good, all 123456 identified messages in host1 are on host2.
+" There is no unidentified message
+" Detected 0 errors
+
+Congratulations!
------------
@@ -154,7 +199,7 @@ B.1) Install Perl if it isn't already installed.
should work as well (Perl 5.18 to 5.26 do).
B.2) Go into the Cook/ directory
-B.3) Double-clic build_exe.bat
+B.3) Double-click build_exe.bat
It should create a binary imapsync.exe in the current Cook/ directory.
diff --git a/S/conversion_data.js b/S/conversion_data.js
new file mode 100755
index 0000000..79956ef
--- /dev/null
+++ b/S/conversion_data.js
@@ -0,0 +1,13 @@
+
+
+/* Google Code for Achat imapsync Conversion Page */
+
+var google_conversion_id = 992916412;
+var google_conversion_language = "en";
+var google_conversion_format = "2";
+var google_conversion_color = "ffffff";
+var google_conversion_label = "hVVWCKzApQIQvOe62QM";
+var google_conversion_value = "USD 1.00";
+var google_conversion_currency = "USD";
+var google_remarketing_only = false;
+
diff --git a/S/donate.shtml b/S/donate.shtml
index 45416a6..0379a05 100644
--- a/S/donate.shtml
+++ b/S/donate.shtml
@@ -31,7 +31,14 @@
Imapsync donation
-Help the author to maintain imapsync and its online services:
+
+Help the imapsync author, Gilles LAMIRAL, to maintain imapsync and its online services!
+
+
+

+
+
+
Donate via Paypal
@@ -46,6 +53,12 @@ value="-----BEGIN PKCS7-----MIIHRwYJKoZIhvcNAQcEoIIHODCCBzQCAQExggEwMIIBLAIBADCB
+Donate via Github
+
+
+Become a Github sponsor to Gilles LAMIRAL
+
+
Donate with Crypto
This donate button will ask your email address and your name but don't hesitate
@@ -61,7 +74,9 @@ to give fake ones, like "Smith" and smith@example.com if you prefer to be anonym
-
Thanks in advance!
+Thanks!
+And remember, no money donation is ok!
+Kind words are always sweets to me
@@ -83,7 +98,7 @@ to give fake ones, like "Smith" and smith@example.com if you prefer to be anonym
This document last modified on
-($Id: donate.shtml,v 1.16 2019/07/31 22:49:12 gilles Exp gilles $)
+($Id: donate.shtml,v 1.20 2021/01/01 22:38:02 gilles Exp gilles $)
diff --git a/S/external.shtml b/S/external.shtml
index f1113fb..38ff879 100644
--- a/S/external.shtml
+++ b/S/external.shtml
@@ -26,18 +26,23 @@
-Similar software tools (back to menu)
+Imapsync similar software tools (back to menu)
+
Here is a list of Imapsync alternative tools, list verified on Friday July 1, 2021:
+
- imapsync: https://github.com/imapsync/imapsync (this is an imapsync copy, sometimes delayed, with --noreleasecheck by default since release 1.592, 2014/05/22)
- imap_tools: https://web.archive.org/web/20161228145952/http://www.athensfbc.com/imap_tools/.
The imap_tools code is now at https://github.com/andrewnimmo/rick-sanders-imap-tools
- imaputils: https://github.com/mtsatsenko/imaputils (very old imap_tools fork)
-- Doveadm-Sync: https://wiki2.dovecot.org/Tools/Doveadm/Sync ( Dovecot sync tool )
+- Doveadm-Sync: https://wiki2.dovecot.org/Tools/Doveadm/Sync ( Dovecot sync tool )
- davmail: http://davmail.sourceforge.net/
- offlineimap: http://offlineimap.org/
+
+- fdm: https://github.com/nicm/fdm
+
- mbsync: http://isync.sourceforge.net/
- mailsync: http://mailsync.sourceforge.net/
- mailutil: https://www.washington.edu/imap/
@@ -68,25 +73,65 @@
- ImportExportTools: https://addons.thunderbird.net/en-us/thunderbird/addon/importexporttools/
ImportExportTools for Mozilla Thunderbird by Paolo Kaosmos. ImportExportTools does not do IMAP.
-
+
+
+- rximapmail: https://sourceforge.net/projects/rximapmail/
+
+- CodeTwo: https://www.codetwo.com/ but CodeTwo does
+ imap source to Office365 only.
+
External online IMAP migration services (back to menu)
-I have no share in these free or paid services.
-Some use Imapsync, most don't.
-Prices are given par mailbox and may be outdated
-(Last checked on Thu Apr 11, 2019).
+These services are similar to the
+imapsync online service
+I call /X. Some are an exact copy of /X, some are not, some use Imapsync, some don't.
+I have no share in these free or paid services.
+Prices are given par mailbox and may be outdated
+(Last checked on Tuesday 10th November 2020).
+
+
+Imapsync based
+
+
+
+1.945 and upper use --useheader "Message-Id" as default in CGI mode and
+this is a better choice to avoid duplicates with some imap servers.
+
-- Web Hosting Canada 0 USD: https://imapsync.whc.ca/ (imapsync based)
-- BoomHost 0 USD: https://imapsync.boomhost.com/ (imapsync based)
-- https://tools.controlpanel.si/imapsync/ (imapsync based)
-- https://www.cadeolink.com.br/ (imapsync based)
+- Slovenia Control Panel 0 USD: https://tools.controlpanel.si/imapsync/ (imapsync 1.810)
+- Intertune Cloud 0 USD: https://tools.intertune.io/imapsync/X/ (imapsync 1.882)
+- Web Hosting Canada 0 USD: https://imapsync.whc.ca/ (imapsync 1.882)
+- BoomHost 0 USD: https://imapsync.boomhost.com/ (imapsync 1.925)
+- WebHosting|4u (greek) 0 USD: https://imapcopy.webhosting4u.gr/ (imapsync 1.977)
+- Vimexx 0 USD: https://imapsync.nl/ (imapsync 1.991)
+- Timetakernet 0 USD: https://mailsync.timetakernet.info/ (imapsync 1.998)
+- KeurigOnline 0 USD: https://imapsync.keurigonline.nl/ (imapsync 1.998)
+- UK Migration Wizard 0 USD: https://app.migrationwizard.co.uk/ (imapsync ?.???)
+
+
+Not Imapsync based
+
- Ovh migration 0 EUR: https://omm.ovh.net/Migration/Create
- Rackspace migration 0 USD: http://www.rackspace.com/email-hosting/migrations
- Movemymail one free, 5 USD after: https://movemymail.net/
@@ -96,9 +141,20 @@ Prices are given par mailbox and may be outdated
-
Yippiemove 14.95 USD (discontinued on April 2019): http://www.yippiemove.com/
( See Yippiemove vs ImapSync )
- ShuttleCloud one free, 19.95 USD after https://www.shuttlecloud.com/
-
+Imap to files services
+
+
+This services allow you to backup/archive your imap email account to a zip file.
+The most common and useful format to restore an imap account is the Maildir format.
+
+
+
+- PowerMail Backup (French language)
+ https://www.powermail.fr/sauvegarder-une-boite-mail/.
+
+