diff --git a/CREDITS b/CREDITS index c5f44fb..dd5024c 100644 --- a/CREDITS +++ b/CREDITS @@ -1,5 +1,5 @@ #!/bin/cat -# $Id: CREDITS,v 1.192 2018/10/04 10:20:47 gilles Exp gilles $ +# $Id: CREDITS,v 1.193 2019/07/31 23:05:10 gilles Exp gilles $ If you want to make a donation to me, imapsync author, Gilles LAMIRAL, use any of the following ways: @@ -9,7 +9,7 @@ b) If you can read french, please use the following wishlist : (books will be send with free postal cost) c) my paypal account is gilles@lamiral.info -http://imapsync.lamiral.info/S/paypal.shtml +http://imapsync.lamiral.info/S/donate.shtml My postal address is: Gilles LAMIRAL diff --git a/ChangeLog b/ChangeLog index f55f08c..5bb195d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,17 +1,178 @@ RCS file: RCS/imapsync,v Working file: imapsync -head: 1.945 +head: 1.977 branch: locks: strict - gilles: 1.945 + gilles: 1.977 access list: symbolic names: keyword substitution: kv -total revisions: 945; selected revisions: 945 +total revisions: 977; selected revisions: 977 description: ---------------------------- -revision 1.945 locked by: gilles; +revision 1.977 locked by: gilles; +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) +---------------------------- +revision 1.976 +date: 2019/12/19 15:37:33; author: gilles; state: Exp; lines: +16 -12 +Moved tests tests_probe_imapssl tests_mailimapclient_connect tests_resolv at the end. +---------------------------- +revision 1.975 +date: 2019/12/19 10:44:23; author: gilles; state: Exp; lines: +21 -13 +Commented the tests_kill* tests +Added a resolv petiteipv6.lamiral.info before check it (frequent failure) +---------------------------- +revision 1.974 +date: 2019/12/16 13:01:18; author: gilles; state: Exp; lines: +18 -9 +Enhancement, internal. Use Debug_fh to set where go the --debugimap outputs. +---------------------------- +revision 1.973 +date: 2019/12/15 00:27:10; author: gilles; state: Exp; lines: +8 -8 +Bugfix. Upgraded ks2 Dovecot and now logout in ssl does not cause failure +---------------------------- +revision 1.972 +date: 2019/12/14 23:45:12; author: gilles; state: Exp; lines: +9 -9 +Added -utf8 when requiring CGI. Hope it will allow utf8 characters in passwords. +---------------------------- +revision 1.971 +date: 2019/12/14 23:41:41; author: gilles; state: Exp; lines: +8 -8 +Bugfix. CGI context. charset was charset=ISO-8859-1 in header (CGI.pm default). Now "text/plain; charset=UTF-8" +---------------------------- +revision 1.970 +date: 2019/12/09 23:09:05; author: gilles; state: Exp; lines: +297 -259 +Reread README part. +Change tests. ks2ipv6.lamiral.info replaced by petiteipv6.lamiral.info +1510 unit tests +---------------------------- +revision 1.969 +date: 2019/11/29 13:00:32; author: gilles; state: Exp; lines: +9 -9 +1509 unit tests +---------------------------- +revision 1.968 +date: 2019/11/29 12:42:13; author: gilles; state: Exp; lines: +29 -19 +Bugfix. binmode UTF-8 for log and output. +---------------------------- +revision 1.967 +date: 2019/11/27 20:41:34; author: gilles; state: Exp; lines: +9 -9 +Bugfix. Bad tests count under docker +---------------------------- +revision 1.966 +date: 2019/11/27 20:23:08; author: gilles; state: Exp; lines: +10 -9 +Commented test probe_imapssl: ks2ipv6.lamiral.info +---------------------------- +revision 1.965 +date: 2019/11/27 20:16:32; author: gilles; state: Exp; lines: +13 -11 +Removed some tests that take time and sometimes fail (ipv6 related) +---------------------------- +revision 1.964 +date: 2019/11/27 15:50:39; author: gilles; state: Exp; lines: +52 -27 +CGI context. Adaptation to a local http server webserver. pidfile and cgidir. +Added Encode Encode::IMAPUTF7 and MIME::Base64 modules versions. +Removed doublon "use MIME::Base64". +Bugfix. Make --tests pass on docker context and under root. +---------------------------- +revision 1.963 +date: 2019/11/25 12:38:44; author: gilles; state: Exp; lines: +52 -18 +Skip tests under Win Win64 and Mac that fail. ipv6 related or fork ones. +---------------------------- +revision 1.962 +date: 2019/11/22 09:51:29; author: gilles; state: Exp; lines: +19 -9 +Added dependencies: +* MIME::Base64 +* Encode +Added test for Encode::find_encoding that fails with the binaries not cmpiled with perl -x +---------------------------- +revision 1.961 +date: 2019/11/19 19:45:02; author: gilles; state: Exp; lines: +117 -47 +Added module dependency to Encode::IMAPUTF7 +Bugfix. Folders names with + characters must stay as they are. +Bugfix. When using --subfolder2 SUB --delete2folders, do not delete the folder SUB. +---------------------------- +revision 1.960 +date: 2019/10/31 23:08:18; author: gilles; state: Exp; lines: +54 -7 +Added test to remove header bad. +---------------------------- +revision 1.959 +date: 2019/10/07 21:21:45; author: gilles; state: Exp; lines: +318 -92 +Added tests: +tests_kill_zero() +tests_killpid_by_parent() +tests_killpid_by_brother() +tests_abort() + +cgidir is . when used by Net::Server::HTTP + +Bugfix. Added SSL_cipher_list => 'DEFAULT:!DH' to tests with ssl +Bugfix. PIDs can be negative under Windows. +Bugfix. --resynclabels was not on with --gmail1 --gmail2 +1502 unit tests under Unix +---------------------------- +revision 1.958 +date: 2019/09/11 21:16:40; author: gilles; state: Exp; lines: +40 -37 +cgi context is now set on with env variables SERVER_SOFTWARE and SERVER_PORT +it is because Net::Server::HTTP does not set SERVER_SOFTWARE but SERVER_PORT +It is a preparation to a homemade web server to serve on imapsync as a cgi and +get free from Apache or a complicated web server stuff configuration. +---------------------------- +revision 1.957 +date: 2019/08/29 17:40:13; author: gilles; state: Exp; lines: +34 -25 +Bugfix. Do not compute a folder size if the folder does not exist. Happened with --skipemptyfolders +---------------------------- +revision 1.956 +date: 2019/08/02 20:18:52; author: gilles; state: Exp; lines: +118 -55 +Bugfix. Reviewed all exit_clean to include a final CR on the error message. +Bugfix. New foldersize tried to select non existent folder that caused a premature exit +when host2 account is mostly empty. +Bugfix. --justconnect did not show the line "IP address:" +---------------------------- +revision 1.955 +date: 2019/07/31 20:30:27; author: gilles; state: Exp; lines: +69 -36 +Bugfix in docker context. killing myself in docker context doesn't seem to work well, as well as sending signals several times. +So just install catch_exit with INT (ctr-c on terminals) and exits if still alive after killing myself. +---------------------------- +revision 1.954 +date: 2019/07/29 18:04:07; author: gilles; state: Exp; lines: +19 -14 +Bufix. In docker context, print "context detected" only with --debug. imapsync --version printed the release on the third line instead of the first. +---------------------------- +revision 1.953 +date: 2019/07/29 05:12:18; author: gilles; state: Exp; lines: +9 -9 +Bugfix. tests_imapsync_context under Docker bugfix. +---------------------------- +revision 1.952 +date: 2019/07/29 04:52:52; author: gilles; state: Exp; lines: +8 -8 +1477 regression tests +---------------------------- +revision 1.951 +date: 2019/07/29 04:40:48; author: gilles; state: Exp; lines: +66 -9 +Added context in --releasecheck user_agent. CGI or Docker or Standard. +---------------------------- +revision 1.950 +date: 2019/07/28 02:24:17; author: gilles; state: Exp; lines: +604 -189 +Folders sizes are now presented per folder from host1 and host2 as well as the differrences between them. +---------------------------- +revision 1.949 +date: 2019/07/18 03:44:00; author: gilles; state: Exp; lines: +59 -32 +Refactor. timenext() deglobalized. +Added tests_timenext(). +---------------------------- +revision 1.948 +date: 2019/07/17 16:51:50; author: gilles; state: Exp; lines: +153 -128 +Refactor. Moved main instructions into sub single_sync(). Goal is to prepare multiple different syncs. +---------------------------- +revision 1.947 +date: 2019/07/15 01:10:05; author: gilles; state: Exp; lines: +119 -45 +Bugfix. Count all fatal errors. +---------------------------- +revision 1.946 +date: 2019/07/09 18:01:42; author: gilles; state: Exp; lines: +136 -48 +Usability. Added the number of errors and the max number of errors allowed at the final line "Exiting with return value xx" +Deglobalized $foldersizes to $sync->{ foldersizes } +Usability. Added ETA at the beginning of a folder process. +1467 regression tests +---------------------------- +revision 1.945 date: 2019/06/26 19:30:56; author: gilles; state: Exp; lines: +151 -94 Proofread the documentation part, what will go to README. The pod at the beginning. diff --git a/FAQ.d/FAQ.Admin_Authentication.txt b/FAQ.d/FAQ.Admin_Authentication.txt index b23ec77..488d562 100644 --- a/FAQ.d/FAQ.Admin_Authentication.txt +++ b/FAQ.d/FAQ.Admin_Authentication.txt @@ -1,5 +1,5 @@ #!/bin/cat -$Id: FAQ.Admin_Authentication.txt,v 1.9 2019/06/26 22:16:43 gilles Exp gilles $ +$Id: FAQ.Admin_Authentication.txt,v 1.10 2019/10/31 23:13:50 gilles Exp gilles $ This documentation is also available online at https://imapsync.lamiral.info/FAQ.d/ @@ -13,8 +13,9 @@ https://imapsync.lamiral.info/FAQ.d/FAQ.Admin_Authentication.txt It can be useful to authenticate without knowing each user password. Using an admin account to authenticate is not a standard feature -supported by all imap servers. Sometimes it is implemented via --authuser1 -sometimes not. It depends on the imap software server and its configuration. +supported by all imap servers. Sometimes it is implemented via the +--authuser1 option, sometimes not. It depends on the imap software +server and its configuration. You have to follow this road: * Determine what is the imap software server diff --git a/FAQ.d/FAQ.Archiving.txt b/FAQ.d/FAQ.Archiving.txt index cd56d16..041e529 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.14 2019/03/22 11:50:36 gilles Exp gilles $ +$Id: FAQ.Archiving.txt,v 1.18 2019/10/23 17:56:28 gilles Exp gilles $ This documentation is also available online at https://imapsync.lamiral.info/FAQ.d/ @@ -11,49 +11,82 @@ https://imapsync.lamiral.info/FAQ.d/FAQ.Archiving.txt Questions answered in this FAQ are: -Q. Can I archive different accounts on the same destination account, +Q. How can I archive different accounts on the same destination account, each account on a separate folder? +Q. How can I restore a complete account archived in a subfolder, like + with the option --subfolder2? + Q. How to move emails from one IMAP folder to another either on the - same IMAP server or a different one? - For example, all messages older than 1 year, move from INBOX to Archive. + same IMAP server or a different one? + For example, all messages older than 1 year, move from INBOX to Archive. -Q. Can imapsync be used to maintain a local offline copy of a - mailbox from host1, eg for backup purposes, so that if the - server fails, then the mailbox could be reinstated, - ideally without requiring a second IMAP host? +Q. Can imapsync be used to maintain and restore a local offline copy + of a mailbox, eg for backup purposes, using Mbox or Maildir + format, so that if the server fails, then the mailbox could be + reinstated? +Q. How to archive a whole year in a subfolder? +Q. How to archive a whole year in subfolders but without subsubfolders? https://imapsync.lamiral.info/FAQ.d/FAQ.Archiving.txt ======================================================================= -Q. Can I archive different accounts on the same destination account, +Q. How can I archive different accounts on the same destination account, each account on a separate folder? -R. Yes. Use --subfolder2 +R. Use --subfolder2 --subfolder2 str : Syncs the whole host1 folders hierarchy under the host2 given folder str. (It does it internally by adding two --regextrans2 options before all others.) -Example: +Examples: - imapsync ... --user1 Foo --subfolder2 FooArch + imapsync ... --user1 Foo --subfolder2 FooArchiv - imapsync ... --user1 Bar --subfolder2 BarArch + imapsync ... --user1 Bar --subfolder2 BarArchiv -In case you need a strict sync, add --delete2 --delete2foldersonly "FooArch" -(or "BarArch" for the second example); it will delete on account2 -what is not on account1 but only in the right place, ie, the subfolder "foo". -Example: - - imapsync ... --user1 Foo --subfolder2 FooArch --delete2 --delete2foldersonly "FooArch" +In case you need a very strict sync, add options +--delete2 --delete2foldersonly "FooArchiv" +(or "BarArchiv" for the second example). +It will delete on account2 what is not on account1 but only in the right place, +ie, the subfolder "FooArchiv". + +Examples: + imapsync ... --user1 Foo --subfolder2 FooArchiv --delete2 --delete2foldersonly "FooArchiv" + + imapsync ... --user1 Bar --subfolder2 BarArchiv --delete2 --delete2foldersonly "BarArchiv" + +======================================================================= +Q. How can I restore a complete account archived in a subfolder, like + with the option --subfolder2? + +R. Use --subfolder1 + + --subfolder1 str : Syncs the host1 folders hierarchy 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. + +Examples: + + imapsync ... --user2 Foo --subfolder1 FooArchiv + + imapsync ... --user2 Bar --subfolder1 BarArchiv + + ======================================================================= Q. How to move emails from one IMAP folder to another either on the - same IMAP server or a different one? - For example, move all messages older than 1 year from INBOX to Archive. + same IMAP server or a different one? + For example, all messages older than 1 year, move from INBOX to Archive. R1. Solution: @@ -67,12 +100,12 @@ R2. See also file FAQ.Folders_Mapping.txt https://imapsync.lamiral.info/FAQ.d/FAQ.Archiving.txt ======================================================================= -Q. Can imapsync be used to maintain a local offline copy of a - mailbox from host1, eg for backup purposes, so that if the - server fails, then the mailbox could be reinstated, - ideally without requiring a second IMAP host? +Q. Can imapsync be used to maintain and restore a local offline copy + of a mailbox, eg for backup purposes, using Mbox or Maildir + format, so that if the server fails, then the mailbox could be + reinstated? -R1. No. Imapsync plays with imap servers only. +R1. No. Imapsync plays with IMAP servers only. R2. Imapsync can't but rick-sanders-imap-tools can! See https://github.com/andrewnimmo/rick-sanders-imap-tools @@ -88,6 +121,23 @@ R2. Imapsync can't but rick-sanders-imap-tools can! is more dangerous than doing no backups at all. No backups makes people act in a safer way, well, usually... -======================================================================= -======================================================================= +R3. Use ImportExportTools for Mozilla Thunderbird by Paolo Kaosmos. + ImportExportTools does not do IMAP as a destination. +======================================================================= +Q. How to archive a whole year in a subfolder? + +R. + + imapsync ... --search "SENTSINCE 1-Jan-2018 SENTBEFORE 31-Dec-2018" \ + --folder2 ARCHIVE_2018 --justfolders --dry + +======================================================================= +Q. How to archive a whole year in subfolders but without subsubfolders? + + + imapsync ... --search "SENTSINCE 1-Jan-2018 SENTBEFORE 31-Dec-2018" \ + --sep2 _ --regextrans2 's{(.*)}{Archive_$1_2018}' --justfolders --dry + +======================================================================= +======================================================================= diff --git a/FAQ.d/FAQ.Big_Mailbox.txt b/FAQ.d/FAQ.Big_Mailbox.txt index 4ec0d2a..94e2c08 100644 --- a/FAQ.d/FAQ.Big_Mailbox.txt +++ b/FAQ.d/FAQ.Big_Mailbox.txt @@ -1,5 +1,5 @@ #!/bin/cat -$Id: FAQ.Big_Mailbox.txt,v 1.2 2018/07/25 10:37:30 gilles Exp gilles $ +$Id: FAQ.Big_Mailbox.txt,v 1.4 2019/07/31 10:37:15 gilles Exp gilles $ This document is also available online at https://imapsync.lamiral.info/FAQ.d/ @@ -10,24 +10,36 @@ https://imapsync.lamiral.info/FAQ.d/FAQ.Big_Mailbox.txt Imapsync tips to deal with huge mailboxes ===================================================================== - Questions answered in this FAQ are: Q. How to deal with huge mailboxes, whose size is over dozens of GB? - - Now the questions again with their answers. ===================================================================== Q. How to deal with huge mailboxes, whose size is over dozens of GB? -R. It should be ok with imapsync. In case imapsync seems to stall - when sizing the folders or before syncing a huge folder and - you wander if it is doing something or just frozen, you can - add option --debugimap. Option --debugimap will show what is - currently done, it's quite a big output but it helps waiting, - saying to ourself - "ok it's long but it's working, let's wait a little more". - The real purpose of --debugimap is to show genuine IMAP - commands used and their responses. \ No newline at end of file +R1. It should be ok with imapsync. + +In case imapsync seems to stall when sizing the folders or before +syncing a huge folder and you wander wether it is doing something or +just frozen, you can add option --debugimap. Option --debugimap shows +what is currently done, it's quite a big output but it helps waiting, +saying to ourselves "ok it's long but it's working, let's wait a +little more". The real purpose of --debugimap is to show genuine IMAP +commands used and their responses. The problem with --debugimap is +that it is very verbose and so with a big mailbox it generates a very +BIG logfile. + +R2. If it is not ok with imapsync then consider spliting the whole +sync into smaller chunks using --search + +For example, select messages only for a given year: + +... +..imapsync ... --search "SENTSINCE 1-Jan-2017 SENTBEFORE 31-Dec-2017" + imapsync ... --search "SENTSINCE 1-Jan-2018 SENTBEFORE 31-Dec-2018" + imapsync ... --search "SENTSINCE 1-Jan-2019 SENTBEFORE 31-Dec-2019" + +===================================================================== +===================================================================== diff --git a/FAQ.d/FAQ.Dates.txt b/FAQ.d/FAQ.Dates.txt index 1059d3d..05b04de 100644 --- a/FAQ.d/FAQ.Dates.txt +++ b/FAQ.d/FAQ.Dates.txt @@ -1,5 +1,5 @@ #!/bin/cat -$Id: FAQ.Dates.txt,v 1.10 2019/05/27 14:26:39 gilles Exp gilles $ +$Id: FAQ.Dates.txt,v 1.11 2019/12/23 12:46:50 gilles Exp gilles $ This documentation is also available online at https://imapsync.lamiral.info/FAQ.d/ @@ -26,7 +26,11 @@ Q. We have found that the time and date displayed have been changed to R. This is the case by default with some email readers like: - Outlook 2003 - Ipad - + - Iphone + - spark https://sparkmailapp.com/ (iphone app) + - Edison mail https://apps.apple.com/us/app/email-edison-mail/id922793622 (iphone app) + - ... + but not with: - Mutt @@ -37,9 +41,9 @@ but not with: First, a thing to keep in mind. Imapsync does not touch any byte of messages unless told to do so by -special options like --regexmess or --pipemess. Messages on both -parts should be exactly identical because imapsync does a verbatim -sync of all messages, by default. +special and rarely used options like --regexmess or --pipemess. +Messages on both parts should be exactly identical because imapsync +does a verbatim sync of all messages, by default. Now I explain the whole picture about dates of messages. diff --git a/FAQ.d/FAQ.Docker.txt b/FAQ.d/FAQ.Docker.txt new file mode 100644 index 0000000..bfe1c40 --- /dev/null +++ b/FAQ.d/FAQ.Docker.txt @@ -0,0 +1,65 @@ +#!/bin/cat +# $Id: FAQ.Docker.txt,v 1.6 2019/12/11 15:39:14 gilles Exp gilles $ + +This document is also available online at +https://imapsync.lamiral.info/FAQ.d/ +https://imapsync.lamiral.info/FAQ.d/FAQ.Docker.txt + +======================================================================= + Installing and using imapsync docker image +======================================================================= + +Questions answered in this FAQ are: + +Q. How can I install and use the imapsync Docker image on my system? + +Q. How can I install or update only the imapsync Docker image on my system? + +Q. Where is the imapsync Docker hub location? + +Q. Any tips for the Docker Mailcow distribution? + + +Now the questions again with their answers. + +======================================================================= +Q. How can I install and use the imapsync Docker image on my system? + +R. Install Docker on your system. Once Docker is installed on your system, + all you have to do in order to run imapsync is the command line: + + docker run gilleslamiral/imapsync imapsync + +======================================================================= +Q. How can I install or update only the imapsync Docker image on my system? + +R. To install or update the imapsync image, run: + + docker pull gilleslamiral/imapsync + +======================================================================= +Q. Where is the imapsync Docker hub location? + +R. Here: + + https://hub.docker.com/r/gilleslamiral/imapsync/ + +======================================================================= +Q. Any tips for the Docker Mailcow distribution? + +R. With the Mailcow distribution, imapsync is running inside a Docker + container. Quoting Mathilde: + +To make it work with Mailcow, options should be added like this: + + --regexflag=s/\\Indexed//gi + +Without spaces, without quotes. + +See the original Mathilde's comment: + +https://github.com/imapsync/imapsync/issues/201#issuecomment-559500077 + + +======================================================================= +======================================================================= diff --git a/FAQ.d/FAQ.Domino.txt b/FAQ.d/FAQ.Domino.txt index 9ecdc82..b615e9b 100644 --- a/FAQ.d/FAQ.Domino.txt +++ b/FAQ.d/FAQ.Domino.txt @@ -1,5 +1,5 @@ #!/bin/cat -# $Id: FAQ.Domino.txt,v 1.10 2018/05/24 11:34:30 gilles Exp gilles $ +# $Id: FAQ.Domino.txt,v 1.12 2019/10/31 23:13:31 gilles Exp gilles $ This documentation is also available online at https://imapsync.lamiral.info/FAQ.d/ @@ -10,9 +10,23 @@ https://imapsync.lamiral.info/FAQ.d/FAQ.Domino.txt Imapsync tips for Domino. ======================================================================= +Questions answered in this FAQ are: + +Q. How to use imapsync from Domino Notes to XXX? + +Q. How to use imapsync from XXX to Domino Notes? + +Q. Whan I use --maxage imapsync sees no messages at all. + What can I do? + +Q. My usual email software client like Thunderbird sees more messages + than imapsync. How can it be possible? + +Now the questions again with their answers: + ======================================================================= -Q. From Domino Notes to XXX +Q. How to use imapsync from Domino Notes to XXX? R1. Use --domino1, like this: @@ -30,7 +44,7 @@ On Unix use: imapsync ... --sep1 '\' --prefix1 '' --messageidnodomain ======================================================================= -Q. From XXX to Domino Notes +Q. How to use imapsync from XXX to Domino Notes R1. Use --domino2, like this: @@ -89,6 +103,28 @@ For Domino 853FP6 on Linux, we used this command on Unix: --prefix2 "" --sep2 "\/" --messageidnodomain \ --regexmess 's{\A(.*?(?! ^$))^Date:(.*?)$}{$1Migratedbyus:$2\nx-MailDate:$2}gxms' +======================================================================= +Q. Whan I use --maxage imapsync sees no messages at all. + What can I do? + +R. Use --noabletosearch + + imapsync ... --noabletosearch + +Same thing with --minage ======================================================================= +Q. My usual email software client like Thunderbird sees more messages + than imapsync. How can it be possible? + +R. (Issue given and solved by Falko Veith) + "As you might know, it is possible to replicate databases, aka mailboxes, + across domino servers. THAT is the explanation. Thunderbird and some Notes + clients may be connected to one server and imapsync to another. + As funny and simply the solution is, as mysterious is why those two + databases are not completely in sync - new emails are replicated but not + the old ones. One mystery solved - and a new one to go. + +Thanks to Falko Veith for this question and the answer! + ======================================================================= diff --git a/FAQ.d/FAQ.Dovecot.txt b/FAQ.d/FAQ.Dovecot.txt index e269229..63ec7eb 100644 --- a/FAQ.d/FAQ.Dovecot.txt +++ b/FAQ.d/FAQ.Dovecot.txt @@ -1,5 +1,5 @@ #!/bin/cat -$Id: FAQ.Dovecot.txt,v 1.6 2018/05/24 11:34:30 gilles Exp gilles $ +$Id: FAQ.Dovecot.txt,v 1.7 2019/09/25 09:25:52 gilles Exp gilles $ This documentation is also available online at https://imapsync.lamiral.info/FAQ.d/ @@ -11,6 +11,15 @@ https://imapsync.lamiral.info/FAQ.d/FAQ.Dovecot.txt ======================================================================= +Questions answered in this FAQ are: + +Q. Subfolders are not created by imapsync and the error is + "Mailbox doesn't allow inferior mailboxes" + +Q. How to migrate to Dovecot with an admin/MasterUser account? + +Now the questions again with their answers. + ======================================================================= Q. How to migrate to Dovecot with an admin/MasterUser account? @@ -21,5 +30,23 @@ R. Dovecot uses the same syntax as uw-imap To setup a Dovecot MasterUser see http://wiki2.dovecot.org/Authentication/MasterUsers +======================================================================= +Q. Subfolders are not created by imapsync and the error is + "Mailbox doesn't allow inferior mailboxes" + +R. Dovecot usually supports subfolders with messages and subfolders, + it's a Dovecot configuration issue. + +If you can change the Dovecot configuration dovecot.conf, +then try this: + +mail_location = maildir:~/Maildir:LAYOUT=fs + +See details at: +https://superuser.com/questions/813362/sub-folders-in-dovecot +https://wiki2.dovecot.org/MailLocation/Maildir + + + ======================================================================= ======================================================================= \ No newline at end of file diff --git a/FAQ.d/FAQ.Exchange.txt b/FAQ.d/FAQ.Exchange.txt index cc3148c..b9be939 100644 --- a/FAQ.d/FAQ.Exchange.txt +++ b/FAQ.d/FAQ.Exchange.txt @@ -1,5 +1,5 @@ -$Id: FAQ.Exchange.txt,v 1.50 2019/04/02 09:29:38 gilles Exp gilles $ +$Id: FAQ.Exchange.txt,v 1.57 2019/12/04 18:26:28 gilles Exp gilles $ This documentation is also available online at https://imapsync.lamiral.info/FAQ.d/ @@ -52,10 +52,6 @@ Q. From XXX to Exchange 2010/2013 or Office365 I get this error message Q. From XXX to Exchange 2010 or 2013 or Office365 the flag Flagged does not seem to be well synced. What can I do? -Q. Exchange and Office365 have throttle mechanisms to limit any huge - usage. Sometimes imapsync transfers are too stressful for servers. - How to deal with that? - Q. How to migrate from or to Exchange 2007/2010/2013 with an admin/authuser account? @@ -71,7 +67,10 @@ Q. Couldn't create folder [trash] "Mailbox already exists". Q. Migrating to Exchange 201O, messages get date of the transfer, this is bad for sorting and listing. What can I do? -Q. How to sync from any to Exchange2007? +Q. How to sync from any to Exchange 2007? + +Q. Exchange 2007 folders ending with a space cause an imapsync crash. + "Could not select: socket closed while reading data from server" Q. How to sync from Microsoft Exchange 2000 IMAP4rev1 server? @@ -104,33 +103,37 @@ On Windows, use: imapsync.exe ... --exchange2 -or use (before imapsync release 1.836): +which is equivalent in imapsync release 1.970 to: imapsync.exe ... ^ - --maxsize 10000000 ^ + --maxsize 10_000_000 ^ --maxmessagespersecond 4 ^ - --regexflag "s/\\Flagged//g" ^ --disarmreadreceipts ^ - --regexmess "s,(.{9900}),$1\r\n,g" + --regexflag "s/\\Flagged//g" ^ + --regexmess "s,(.{10239}),$1\r\n,g" On Unix, use: imapsync ... --exchange2 -or use (before imapsync release 1.836): +which is equivalent in imapsync release 1.970 to: imapsync ... \ - --maxsize 10000000 \ - --maxlinelength 9900 \ + --maxsize 10_000_000 \ --maxmessagespersecond 4 \ + --maxlinelength 10239 \ --regexflag 's/\\Flagged//g' \ --disarmreadreceipts \ - --maxlinelengthcmd 'reformime -r7' - -On Linux, to get the "reformime" command, install the "maildrop" package. -In case you don't have it you can still use - --regexmess 's,(.{9900}),$1\r\n,g' -instead of --maxlinelengthcmd 'reformime -r7' + --regexmess 's,(.{10239}),$1\r\n,g' + + + +On Linux, you can also try the "reformime" command +that can be used like: + + imapsync ... --maxlinelengthcmd "reformime -r7" + +To get reformime, install the "maildrop" package. ======================================================================= Q. How to sync from Office365 to XXX? @@ -143,7 +146,12 @@ On Unix, use: imapsync ... --office1 - +Option --office1 is like (release 1.970): + + imapsync ... --host1 outlook.office365.com \ + --ssl1 \ + --exclude "^Files$" + ======================================================================= Q. How to sync from XXX to Office365 @@ -158,36 +166,27 @@ R. Here is a command line resume that solves most encountered issues when next Q/R sections. -On Windows, use: - - imapsync.exe ... --office2 - -or use (before imapsync release 1.836): - imapsync.exe ... ^ - --maxsize 45000000 ^ - --maxmessagespersecond 2 ^ - --regexflag "s/\\Flagged//g" ^ - --disarmreadreceipts ^ - --regexmess "s,(.{10500}),$1\r\n,g" - -On Unix, use: - imapsync ... --office2 -or use (before imapsync release 1.836): +which is equivalent to (in imapsync release 1.870): imapsync ... \ + --host2 outlook.office365.com \ + --ssl2 \ --maxsize 45000000 \ - --maxlinelength 10500 \ - --maxmessagespersecond 2 \ - --regexflag 's/\\Flagged//g' \ + --maxmessagespersecond 4 \ --disarmreadreceipts \ - --maxlinelengthcmd 'reformime -r7' - -On Linux, to get the "reformime" command, install the "maildrop" package. -In case you don't have it you can use - --regexmess 's,(.{10500}),$1\r\n,g' -instead of --maxlinelengthcmd 'reformime -r7' + --regexmess "s,(.{10239}),$1\r\n,g" \ + --f1f2 "Files=Files_renamed_by_imapsync" + + +On Linux, you can also try the "reformime" command +that can be used like: + + imapsync ... --maxlinelengthcmd "reformime -r7" + +To get reformime, install the "maildrop" package. + ======================================================================= Q. For Office365 I have double and triple checked the username and @@ -288,13 +287,23 @@ Q. Office365 throttles the sync and says: "Request is throttled. Suggested Backoff Time: 299961 milliseconds". What can I do with that? -R. To solve the throttles issues from 0365, there's two solutions: + +R. Exchange and Office365 have throttle mechanisms to limit any huge + usage. Sometimes imapsync transfers are too stressful for servers. + The message + "Request is throttled. Suggested Backoff Time: 299961 milliseconds" + comes from the imap Office365 server, imapsync just reports it + before being disconnected from it. + + To solve the throttles issues from 0365, there are two solutions + at least: R1. Call Microsoft Office365 and ask them to remove the limits on your mailboxes. That's not a joke, they do it for 90 days usually, sometimes only after you reach the second technician you call, - the first one been not enough competent to understand what you're - talking about. + the first one usually been not enough competent to understand + what you're talking about (I would be glad to remove this bad + fact). R2. Play with options --maxbytespersecond or --maxmessagespersecond or --exitwhenover @@ -308,6 +317,14 @@ R2. Play with options --maxbytespersecond or --maxmessagespersecond I don't know the upper value that avoid the default throttling from 0365 and I guess it changes over time. +R3. For Exchange, in case throttle appears anyway, fix them with: + https://technet.microsoft.com/en-us/library/jj863577(v=exchg.150).aspx + See also: + http://www.linux-france.org/prj/imapsync_list/msg02072.html + + Sometimes restarting the Exchange server is needed to take + into account the change in the configuration. + ======================================================================= Q. Office365 refuses to create the folder named "Files" with the error "NO Folder name is reserved". What happens? @@ -323,6 +340,19 @@ R0. To fix this, add --exclude Files imapsync ... --exclude Files + If you use --office1 then imapsync will add this exclusion + automatically like using the option: + + imapsync ... --exclude "^Files$" + + If you use --office2 then imapsync will add a renaming of any + "Files" folder on host1, like using the option: + + imapsync ... --f1f2 "Files=Files_renamed_by_imapsync" + + The host2 account ends up with a folder named + "Files_renamed_by_imapsync", but no complaining. + R1. This folder "Files" seems to be a standard folder in Exchange Online, but it is not. The folder contains all attachments in every email that is in the mailbox, but without any headers. @@ -455,7 +485,7 @@ encountered so you might also see "BYE Connection closed" errors from Exchange, which means Exchange leaves the session and say goodbye, come back later. Rerun a sync then. -If on Linux, there is a good Python script in the tarball that can +On Linux, there is a good Python script in the tarball that can fix several things that Exchange or O365 have issues with. Use it like this: @@ -486,24 +516,6 @@ With STORE it sets and gets the "\Flagged" flag everywhere. Thanks to Dave Murray and Simon Savva for reporting and solving this issue. -====================================================================== -Q. Exchange and Office365 have throttle mechanisms to limit any huge - usage. Sometimes imapsync transfers are too stressful for servers. - How to deal with that? - -R. It looks like limiting 4 messages per second is enough to avoid - the throttle limits. - - imapsync ... --maxmessagespersecond 4 - -In case throttle appears anyway, fix them with: -https://technet.microsoft.com/en-us/library/jj863577(v=exchg.150).aspx -See also: -http://www.linux-france.org/prj/imapsync_list/msg02072.html - -Sometimes restarting the Exchange server is needed to take -into account the change in the configuration. - ====================================================================== Q. How to migrate from or to Exchange 2007/2010/2013 with an admin/authuser account? @@ -580,6 +592,22 @@ and again - don't use administrator@domain.com - as that will never work because IMAP LOGIN is disabled for that account apparently under all circumstances. +Note from Noxyron +https://github.com/imapsync/imapsync/issues/136#issuecomment-543761463 + +Hi guys. For a long time I could not start synchronization, I use admin rights +and the --authuser2 switch when I migrated from Mdaemon to Exchange2016. +I always got the error: +"Host2 failure: Error login on [my.exchange.com] with user [mydomainuser] auth [PLAIN]: 2 NO AUTHENTICATE failed." +In order for ImapSync to login to the user’s mailbox using administrator rights, +you need to give for the administrator the permissions to the mailbox of this +user with the command: +“Add-MailboxPermission -Identity DomainUser -User DomainAdmin -AccessRights FullAccess -InheritanceType All -AutoMapping $false” +using Exchange Management Shell. +Without this, synchronization will not work. +Please, add this comment to the FAQ.Exchange.txt +(done!) + ====================================================================== Q. How to migrate from or to Office 365 with an admin/authuser account? @@ -690,7 +718,7 @@ It's often shorter to change one server than thousands clients so R1 might be easier to do. ====================================================================== -Q. How to sync from any to Exchange2007? +Q. How to sync from any to Exchange 2007? Several problems: - Big messages: increase the "send- and receive-connector" @@ -701,13 +729,22 @@ R. 2 solutions R1. With imapsync (only partial success) --skipheader 'Received' \ --regexmess 's{\A(.*?(?!^$))^Date:(.*?)$}{$1Date:$2\nReceived: From; $2}gxms' -Any user having time to spend to debug Exchange2007 with imapsync +Any user having time to spend to debug Exchange 2007 with imapsync is welcome. 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" + +R. Using another imap tool like Thunderbird or Outlook, change the + folder name to exclude the trailing space. + +See https://github.com/imapsync/imapsync/issues/154 + ====================================================================== Q. How to sync from Microsoft Exchange 2000 IMAP4rev1 server? diff --git a/FAQ.d/FAQ.Folders_Mapping.txt b/FAQ.d/FAQ.Folders_Mapping.txt index d33b6ba..e2db064 100644 --- a/FAQ.d/FAQ.Folders_Mapping.txt +++ b/FAQ.d/FAQ.Folders_Mapping.txt @@ -1,5 +1,5 @@ #!/bin/cat -$Id: FAQ.Folders_Mapping.txt,v 1.19 2019/03/04 21:21:18 gilles Exp gilles $ +$Id: FAQ.Folders_Mapping.txt,v 1.20 2019/07/27 20:04:57 gilles Exp gilles $ This documentation is also available online at https://imapsync.lamiral.info/FAQ.d/ @@ -11,10 +11,24 @@ https://imapsync.lamiral.info/FAQ.d/FAQ.Folders_Mapping.txt Imapsync tips about changing folders names. ======================================================================= -Folders names are by default reproduced identical except for -the prefix and the separator which are automatically adapted +By default, imapsync syncs all folders, one by one, in alphanumeric order. + +By default, folders names from host1 are reproduced identical on host2, +except for the prefix and the separator which are automatically adapted for host2. +The IMAP protocol has a specific way to code folders names, +especially when these names use non-ascii 7bit characters. +This encoding is called utf7imap. + +Imapsync uses the same encoding as IMAP: utf7imap. + +In order to well specify folders names on the command line, imapsync +prints the complete folder list of both sides at the beginning of each run. + +The left column is the encoding you have to use, without the first enclosing +square brackets [], the right column is the human utf8 view. + This document gives most examples with the powerful but complex option --regextrans2. Before using --regextrans2 you should consider using --automap and --f1f2 because they are simpler diff --git a/FAQ.d/FAQ.Folders_Selection.txt b/FAQ.d/FAQ.Folders_Selection.txt index 86e98d9..27f5826 100644 --- a/FAQ.d/FAQ.Folders_Selection.txt +++ b/FAQ.d/FAQ.Folders_Selection.txt @@ -1,5 +1,5 @@ #!/bin/cat -$Id: FAQ.Folders_Selection.txt,v 1.7 2018/05/24 11:34:30 gilles Exp gilles $ +$Id: FAQ.Folders_Selection.txt,v 1.8 2019/07/27 20:04:46 gilles Exp gilles $ This documentation is also available online at https://imapsync.lamiral.info/FAQ.d/ @@ -12,13 +12,17 @@ https://imapsync.lamiral.info/FAQ.d/FAQ.Folders_Selection.txt By default, Imapsync syncs all folders, one by one, in alphanumeric order. -The IMAP protocol has a specific way to code folder names, -when these names use non-ascii 7bit characters. -Imapsync uses the same code as IMAP. -In order to well specify them on the command line you will be -helped by the complete folder list printed by imapsync at each run. -The left column is what you have to use without the first enclosing -square brackets, the right column is the human utf8 view. +The IMAP protocol has a specific way to code folders names, +especially when these names use non-ascii 7bit characters. +This encoding is called utf7imap. + +Imapsync uses the same encoding as IMAP, utf7imap. + +In order to well specify folders names on the command line, imapsync +prints the complete folder list of both sides at the beginning of each run. + +The left column is the encoding you have to use, without the first enclosing +square brackets [], the right column is the human utf8 view. diff --git a/FAQ.d/FAQ.Folders_Sizes.txt b/FAQ.d/FAQ.Folders_Sizes.txt index da5ee44..311a462 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.2 2018/05/24 11:34:30 gilles Exp gilles $ +$Id: FAQ.Folders_Sizes.txt,v 1.3 2019/07/25 15:57:04 gilles Exp gilles $ This documentation is also available online at https://imapsync.lamiral.info/FAQ.d/ @@ -9,6 +9,15 @@ https://imapsync.lamiral.info/FAQ.d/FAQ.Folders_Sizes.txt Imapsync tips to know folders sizes. ======================================================================= +Questions answered in this FAQ are: + +Q. How can I know the size of all folders before launching a sync? + +Q. The folders sizes and the number of messages don't match between + the source mailbox and the destination mailbox. + Why and what can I do? + +Now the questions again with their answers. ======================================================================= @@ -16,11 +25,54 @@ Q. How can I know the size of all folders before launching a sync? R. Use --justfoldersizes option. -With --justfoldersizes option, imapsync displays the folder size -part of a run and then exits without doing any transfer: +With the --justfoldersizes option, imapsync evaluates and displays the +folders sizes on both sides and then exits without doing any transfer. +Example: imapsync ... --justfoldersizes +======================================================================= +Q. The folders sizes and the number of messages don't match between + the source mailbox on host1 and the destination mailbox on host2. + Why and what can I do? + +R. There are several reasons to explain the different counts between + source and destination after a sync. + +1) The sync ended prematurely, before syncing all wanted folders. + Solution: run new syncs until completion. + +2) There are messages on host2 that are not on host1, so host2 is + bigger than host1. Imapsync doesn't delete any message by default. + Solution: use --delete2 to have a strict sync by folder, ie, + delete messages on host2 that are not on host1. + +3) There are folders on host2 that are not on host1, so host2 is + bigger. Imapsync doesn't delete any folder by default. + Solution: use --delete2folders to have a strict sync, ie, + delete folders on host2 that are not on host1. + +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 + +5) There are duplicate messages on host2 so host2 is + bigger than host1. Solution: use --delete2duplicates to delete + the host2 duplicates. + +6) Cosmic rays... + +The important part to take into account is the last lines of imapsync +if you encounter the line: +"The sync looks good, all X identified messages in host1 are on host2." +and also no unidentified messages. + ======================================================================= ======================================================================= + + \ No newline at end of file diff --git a/FAQ.d/FAQ.GDPR.txt b/FAQ.d/FAQ.GDPR.txt new file mode 100644 index 0000000..4712701 --- /dev/null +++ b/FAQ.d/FAQ.GDPR.txt @@ -0,0 +1,65 @@ +$Id: FAQ.GDPR.txt,v 1.4 2019/09/12 10:07:27 gilles Exp gilles $ + +This document is also available online at +https://imapsync.lamiral.info/FAQ.d/ +https://imapsync.lamiral.info/FAQ.d/FAQ.GDPR.txt + +======================================================================= + Imapsync and the GDPR, General Data Protection Regulation UE 2016/679 +======================================================================= + +Questions answered in this FAQ are: + +Q. Can you explain the compliance of imapsync with GDPR? + [General Data Protection Regulation UE 2016/679] + + +Now the questions again with their answers. + +======================================================================= +Q. Can you explain the compliance of imapsync with GDPR? + [General Data Protection Regulation UE 2016/679] + +R. 1) To know whether a newer imapsync exists or not, + imapsync does a http GET to the file VERSION at + http://imapsync.lamiral.info/VERSION + + Via the HTTP User-agent header it also sends: + * the imapsync release + * the Perl version + * the Mail::IMAPClient version + * the Operating System + * the context ( Standard, CGI, or Docker ) + + You can remove this behavior by adding the option --noreleasecheck + on the command line or by setting $releasecheck = 0 in the source code. + Check also https://nvd.nist.gov/vuln/detail/CVE-2013-4279 + + See also https://imapsync.lamiral.info/#NUMBERS + +2) Each imapsync run generates a logfile that corresponds exactly + to the output printed on the console during the run. + This log file contains data from the mailboxes, + not the content messages, not the passwords but + it contains the folders names and the login names. + Remove the log or use the option --nolog to avoid logging. + +3) In case you purchase imapsync: + +3.1) the data collected during the purchase, + Name, Company Name, Postal Address, VAT number, Price, + will be used to edit the invoice. I (Gilles LAMIRAL) keep a copy + of the invoice for accounting. + +3.2) Once in a while, I send an email to the buyers announcing + a new imapsync is released and where to get it. + +3.3) If the customer is a professional inside the EU, + I also use his company VAT number and the amount to declare it + to the Customs each month, before the 10th of the month, at + https://pro.douane.gouv.fr/ + It's mandatory, it's the law inside EU and the fine is 750 EUR/month + when it is not done or not well done a month. + +======================================================================= +======================================================================= diff --git a/FAQ.d/FAQ.General.txt b/FAQ.d/FAQ.General.txt index 4417c6f..48604e0 100644 --- a/FAQ.d/FAQ.General.txt +++ b/FAQ.d/FAQ.General.txt @@ -1,5 +1,5 @@ #!/bin/cat -# $Id: FAQ.General.txt,v 1.240 2018/11/26 11:49:56 gilles Exp gilles $ +# $Id: FAQ.General.txt,v 1.242 2019/12/11 20:28:33 gilles Exp gilles $ ======================================================================= General FAQ for imapsync @@ -57,8 +57,8 @@ Q. How to verify imapsync.exe I got is the right file bit per bit? Q. Folders are not created on host2. What happens? -Q. I am interested in creating a local clone of the IMAP on a LAN - server for faster synchronizations, email will always be delivered +Q. I am interested in creating a local clone of the IMAP on a LAN + server for faster synchronizations, email will always be delivered to the remote server and so the synchronization will be one way - from remote to local. How suited is imapsync for continuous one-way synchronization of mailboxes? Is there a better solution? @@ -288,11 +288,11 @@ R. Add also --nofoldersizes since the default behavior is to compute useful to see what has to be done on each folder and guess when the transfer will end (ETA). -R. Add also --noexpungeaftereach if you use --delete. +R. Add also --noexpungeaftereach if you use --delete1. But be warn that an interrupted transfer can lose messages - on host2 in a second run if you use a (silly) combination like + on host2 in a second run if you use a (silly) combination like: - imapsync ... --delete --noexpunge --noexpungeaftereach --expunge2 + imapsync ... --delete1 --noexpunge1 --noexpungeaftereach --expunge2 Notes about --useuid diff --git a/FAQ.d/FAQ.Gmail.txt b/FAQ.d/FAQ.Gmail.txt index 7ecc725..771e3ec 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.58 2019/04/25 10:41:12 gilles Exp gilles $ +$Id: FAQ.Gmail.txt,v 1.65 2019/12/04 18:26:00 gilles Exp gilles $ This document is also available online at https://imapsync.lamiral.info/FAQ.d/ @@ -67,7 +67,18 @@ it has to be allowed in the Gmail configuration part: -> IMAP Access -> Enable IMAP - Also: +Also, there is the authentication issue to consider. +There are three different ways to authenticate to Gmail with Imapsync, +either: + +* "Access for less secure apps" +* "2-step verification" +* XOauth + +For the last one, XOauth, see the document +https://imapsync.lamiral.info/FAQ.d/FAQ.XOAUTH2.txt + +1) "Access for less secure apps" is turned ON -> Verify 2-step verification is OFF https://myaccount.google.com/security?hl=en&pli=1&nlr=1#signin @@ -75,6 +86,24 @@ it has to be allowed in the Gmail configuration part: https://www.google.com/settings/security/lesssecureapps https://support.google.com/accounts/answer/6010255?hl=en +Sometimes, with Gsuite, the login for the users are ok with imapsync +for a while then they become forbidden with +"failure: Error login on [imap.gmail.com] with user [xxx] auth [LOGIN]: +2 NO [AUTHENTICATIONFAILED] Invalid credentials (Failure)" + +In that case, use: +https://admin.google.com/AdminHome?hl=fr#ServiceSettings/notab=1&service=securitysetting&subtab=lesssecureappsaccess +to allow "Access for less secure apps to all users" +(Thanks to Sbastien R. for this input) + +2) "2-step verification" is turned ON + +Follow +https://support.google.com/accounts/answer/185833?hl=en +Even if Google says "Every App Password is only used once", +it's false and the password can be used many times. + + ======================================================================= Q. Even after several syncs the number of messages differs largely between imapsync and the Gmail web interface. @@ -91,7 +120,7 @@ multiple messages and it doesn't match what imapsync presents. Q. How many days does it take to transfer X GB? R. Basically it takes X days to transfer X GB per account. - Gmail has usage limits per day and use throttlers when + Gmail has usage limits per day and use throttles when they are overtaken http://support.google.com/a/bin/answer.py?hl=en&answer=1071518 From the previous link: @@ -124,25 +153,30 @@ imapsync \ --password2 gmailsecret2 \ --gmail1 --gmail2 -Or, replacing what does --gmail1 --gmail2 (values are from imapsync 1.882): +Or, replacing what does --gmail1 --gmail2 (values are from imapsync 1.970): imapsync \ --host1 imap.gmail.com \ + --ssl1 \ --user1 account1@gmail.com \ --password1 gmailsecret1 \ --host2 imap.gmail.com \ + --ssl2 \ --user2 account2@gmail.com \ --password2 gmailsecret2 \ --maxbytespersecond 20_000 \ --maxbytesafter 1_000_000_000 \ - --maxsleep 2 \ --automap \ - --exclude "\[Gmail\]$" + --maxsleep 2 \ + --synclabels \ + --resynclabels \ + --exclude "\[Gmail\]$" \ + --folderlast "[Gmail]/All Mail" With --gmail1 --gmail2 you can override the parameters that are activated by them, for example: -imapsync ... --gmail1 --gmail2 --maxbytespersecond 50_000 +imapsync ... --gmail1 --gmail2 --maxbytespersecond 50_000 --noautomap Explanations: @@ -197,48 +231,40 @@ R. Use the following example: imapsync --host1 mail.oldhost.com \ --user1 my_email@oldhost.com \ - --password1 password \ + --password1 passwordold \ --user2 my_email@gmail.com \ - --password2 password \ + --password2 gmailsecret \ --gmail2 -Or, replacing what does --gmail2 (values are from imapsync 1.921): +Or, replacing what does --gmail2 (values are from imapsync 1.970): +(For Linux only because of the quotes) imapsync --host1 mail.oldhost.com \ --user1 my_email@oldhost.com \ - --password1 password \ + --password1 passwordold \ --host2 imap.gmail.com \ + --ssl2 \ --user2 my_email@gmail.com \ - --password2 password \ + --password2 gmailsecret \ --maxbytespersecond 20_000 \ --maxbytesafter 1_000_000_000 \ + --automap \ + --expunge1 \ + --addheader \ --maxsleep 2 \ - --maxsize 35_651_584 \ - --automap \ - --expunge1 \ - --addheader \ --exclude "\[Gmail\]$" \ - --regextrans2 "s/['\^\"\\\\]/_/g" \ - --regextrans2 "s/[ ]+/_/g" + --regextrans2 's,\[Gmail\].,,' \ + --regextrans2 's,^ +| +$,,g' + --regextrans2 's,/ +| +/,/,g' + --regextrans2 's/['"'"'\\^"]/_/g' + --folderlast "[Gmail]/All Mail" -Starting from imapsync 1.926 the last --regextrans2 replacing -all blanks, which was: +Starting from imapsync 1.926 a --regextrans2 replacing +all blanks, was: --regextrans2 "s/[ ]+/_/g" -became - -on Winwows, like: - - imapsync.exe ... --regexflag "s,\\Seen,," --regexflag "s,,\\Seen ," - -on Linux, like: - - imapsync ... --regexflag 's,\\Seen,,' --regexflag 's,,\\Seen ,' - - - With --gmail2 you can override the parameters that are activated by them, for example: @@ -317,27 +343,30 @@ Q. How to synchronize from Gmail to XXX? R. Use this example: imapsync \ - --user1 gilles.lamiral@gmail.com \ + --user1 foo@gmail.com \ --password1 gmailsecret \ --host2 localhost \ --user2 tata \ --gmail1 -Or, replacing what does --gmail1 (values are from imapsync 1.882): +Or, replacing what does --gmail1 (values are from imapsync 1.970): imapsync \ --host1 imap.gmail.com \ - --user1 gilles.lamiral@gmail.com \ + --ssl1 \ + --user1 foo@gmail.com \ --password1 gmailsecret \ --host2 localhost \ --user2 tata \ --password2 tatasecret \ - --maxbytespersecond 20_000 \ + --maxbytespersecond 40_000 \ + --maxbytesafter 2_500_000_000 + --automap \ + --maxsleep 2 \ + --skipcrossduplicates \ --useheader="X-Gmail-Received" \ --useheader "Message-Id" \ - --automap \ --regextrans2 "s,\[Gmail\].,," \ - --skipcrossduplicates \ --folderlast "[Gmail]/All Mail" With --gmail1 you can override the parameters @@ -347,10 +376,10 @@ imapsync ... --gmail1 --maxbytespersecond 50_000 --noskipcrossduplicates --noaut Explanations: ---maxbytespersecond 20_000 ( 20 kBytes/s ) option is here to avoid +--maxbytespersecond 40_000 ( 40 kBytes/s ) option is here to avoid locking or errors when imap transfers exceed Gmail maximum limit. See http://support.google.com/a/bin/answer.py?hl=en&answer=1071518 ---maxbytespersecond 20_000 is not mandatory in the sense Gmail may +--maxbytespersecond 40_000 is not mandatory in the sense Gmail may allow you to use an upper value than 2 GBytes per 24h without disconnections. @@ -475,7 +504,7 @@ duplicate message as a new message, giving imapsync a new UID for this message, and throw it away because it already has it. Gmail will do this at each run so imapsync will always try to copy the message, and Gmail will always accept and throw away the new copy. It -ends up with no duplicates on Gmail but a waste of bandwith and time, +ends up with no duplicates on Gmail but a waste of bandwidth and time, which is the opposite goal of --usecache implied by --useuid. diff --git a/FAQ.d/FAQ.Kerio.txt b/FAQ.d/FAQ.Kerio.txt index be738c3..170bea3 100644 --- a/FAQ.d/FAQ.Kerio.txt +++ b/FAQ.d/FAQ.Kerio.txt @@ -1,5 +1,5 @@ #!/bin/cat -$Id: FAQ.Kerio.txt,v 1.1 2019/06/26 22:14:50 gilles Exp gilles $ +$Id: FAQ.Kerio.txt,v 1.2 2019/11/15 11:33:14 gilles Exp gilles $ This document is also available online at https://imapsync.lamiral.info/FAQ.d/ @@ -37,4 +37,10 @@ Kerio at host2 See also: https://github.com/imapsync/imapsync/pull/53 +If you get the error +"Host failure: Error login on ... auth [X-MASTERAUTH]: 2 BAD AUTHENTICATE Unknown authentication method" + +Then admin authentication may not be activated yet. See: +https://forums.gfi.com/index.php?t=msg&th=28458&goto=118447&#msg_118447 + ======================================================================= \ No newline at end of file diff --git a/FAQ.d/FAQ.Massive.txt b/FAQ.d/FAQ.Massive.txt index a456543..a227d32 100644 --- a/FAQ.d/FAQ.Massive.txt +++ b/FAQ.d/FAQ.Massive.txt @@ -1,5 +1,5 @@ #!/bin/cat -$Id: FAQ.Massive.txt,v 1.29 2019/06/18 16:38:06 gilles Exp gilles $ +$Id: FAQ.Massive.txt,v 1.30 2019/07/24 12:01:41 gilles Exp gilles $ This document is also available online at https://imapsync.lamiral.info/FAQ.d/ @@ -45,8 +45,8 @@ R1. First you have to consider several periods. There is the global the old accounts but nothing prevents you from starting to sync the old accounts, as they are, to the new accounts. With tons of gigabytes to transfer, this period may be the longest one. - There is nothing more to launch the presyncs and watch until - the round is finished. + There is nothing more than launching the presyncs and monitoring them + until the round is finished. The last period is the final sync period where only the last changes of the mailboxes need to be synced in order to switch @@ -54,9 +54,11 @@ R1. First you have to consider several periods. There is the global R2. To estimate the presync period, consider the mean imapsync transfer rate to be around 340 Kbytes/s, ie, 2.8 Mbps, no matter the local - link bandwidth. + link bandwidth. It's a mean, measured upon various different syncs, coming from - the online interface /X. + the online service /X where the network card flow rate is 100 Mbps + and the provider bandwidth is also 100 Mbps. Max seen is a transfer + at 21 Mbps. At 340 Kbytes/s, 1 TB to transfer and one sync at a time will end in 35 days (1024^3/340/3600/24). @@ -184,6 +186,9 @@ Here comes some measurements. During iftop, press the h to see the display commands available, every single feature is useful! Press h again and try each one. + My preferred display combination is by typing + t p > + meaning: one line per connection, show port numbers, sort by destination. On Windows 8.1 Windows 10 Windows 2012 R2 Windows 2016, diff --git a/FAQ.d/FAQ.Messages_Selection.txt b/FAQ.d/FAQ.Messages_Selection.txt index 9b59653..bfacd70 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.14 2018/05/24 11:34:30 gilles Exp gilles $ +$Id: FAQ.Messages_Selection.txt,v 1.15 2019/07/24 12:02:11 gilles Exp gilles $ This document is also available online at https://imapsync.lamiral.info/FAQ.d/ @@ -172,10 +172,34 @@ Q. What are the selection criteria available with --search option? R. The list of search criteria are listed below, an excerpt from RFC3501. -http://www.faqs.org/rfcs/rfc3501.html -6.4.4. SEARCH Command +https://tools.ietf.org/html/rfc3501#section-6.4.4 ... + The SEARCH command searches the mailbox for messages that match + the given searching criteria. Searching criteria consist of one + or more search keys. The untagged SEARCH response from the server + contains a listing of message sequence numbers corresponding to + those messages that match the searching criteria. + When multiple keys are specified, the result is the intersection + (AND function) of all the messages that match those keys. For + example, the criteria DELETED FROM "SMITH" SINCE 1-Feb-1994 refers + to all deleted messages from Smith that were placed in the mailbox + since February 1, 1994. A search key can also be a parenthesized + list of one or more search keys (e.g., for use with the OR and NOT + keys). + + In all search keys that use strings, a message matches the key if + the string is a substring of the field. The matching is + case-insensitive. + + The defined search keys are as follows. Refer to the Formal + Syntax section for the precise syntactic definitions of the + arguments. + + + Messages with message sequence numbers corresponding to the + specified message sequence number set. + ALL All messages in the mailbox; the default initial key for ANDing. @@ -306,6 +330,89 @@ http://www.faqs.org/rfcs/rfc3501.html UNSEEN Messages that do not have the \Seen flag set. +... + +search = "SEARCH" [SP "CHARSET" SP astring] 1*(SP search-key) + ; CHARSET argument to MUST be registered with IANA +... + +search-key = "ALL" / "ANSWERED" / "BCC" SP astring / + "BEFORE" SP date / "BODY" SP astring / + "CC" SP astring / "DELETED" / "FLAGGED" / + "FROM" SP astring / "KEYWORD" SP flag-keyword / + "NEW" / "OLD" / "ON" SP date / "RECENT" / "SEEN" / + "SINCE" SP date / "SUBJECT" SP astring / + "TEXT" SP astring / "TO" SP astring / + "UNANSWERED" / "UNDELETED" / "UNFLAGGED" / + "UNKEYWORD" SP flag-keyword / "UNSEEN" / + ; Above this line were in [IMAP2] + "DRAFT" / "HEADER" SP header-fld-name SP astring / + "LARGER" SP number / "NOT" SP search-key / + "OR" SP search-key SP search-key / + "SENTBEFORE" SP date / "SENTON" SP date / + "SENTSINCE" SP date / "SMALLER" SP number / + "UID" SP sequence-set / "UNDRAFT" / sequence-set / + "(" search-key *(SP search-key) ")" + +seq-number = nz-number / "*" + ; message sequence number (COPY, FETCH, STORE + ; commands) or unique identifier (UID COPY, + ; UID FETCH, UID STORE commands). + ; * represents the largest number in use. In + ; the case of message sequence numbers, it is + ; the number of messages in a non-empty mailbox. + ; In the case of unique identifiers, it is the + ; unique identifier of the last message in the + ; mailbox or, if the mailbox is empty, the + ; mailbox's current UIDNEXT value. + ; The server should respond with a tagged BAD + ; response to a command that uses a message + ; sequence number greater than the number of + ; messages in the selected mailbox. This + ; includes "*" if the selected mailbox is empty. + +seq-range = seq-number ":" seq-number + ; two seq-number values and all values between + ; these two regardless of order. + ; Example: 2:4 and 4:2 are equivalent and indicate + ; values 2, 3, and 4. + ; Example: a unique identifier sequence range of + ; 3291:* includes the UID of the last message in + ; the mailbox, even if that value is less than 3291. + +sequence-set = (seq-number / seq-range) *("," sequence-set) + ; set of seq-number values, regardless of order. + ; Servers MAY coalesce overlaps and/or execute the + ; sequence in any order. + ; Example: a message sequence number set of + ; 2,4:7,9,12:* for a mailbox with 15 messages is + ; equivalent to 2,4,5,6,7,9,12,13,14,15 + ; Example: a message sequence number set of *:4,5:7 + ; for a mailbox with 10 messages is equivalent to + ; 10,9,8,7,6,5,4,5,6,7 and MAY be reordered and + ; overlap coalesced to be 4,5,6,7,8,9,10. + + +See also the excellent "Introduction to IMAP" by Nick Babcock +https://nbsoftsolutions.com/blog/introduction-to-imap + + + +See also "WITHIN Search Extension to the IMAP Protocol" +https://tools.ietf.org/html/rfc5032 + +... + search-key =/ ( "OLDER" / "YOUNGER" ) SP nz-number + ; search-key defined in RFC 3501 + +4. Example + + C: a1 SEARCH UNSEEN YOUNGER 259200 + S: a1 * SEARCH 4 8 15 16 23 42 + + Search for all unseen messages within the past 3 days, or 259200 + seconds, according to the server's current time. + ======================================================================= ======================================================================= diff --git a/FAQ.d/FAQ.Old_Style_Web_Design.txt b/FAQ.d/FAQ.Old_Style_Web_Design.txt new file mode 100644 index 0000000..081f84b --- /dev/null +++ b/FAQ.d/FAQ.Old_Style_Web_Design.txt @@ -0,0 +1,56 @@ +#!/bin/cat +$Id: FAQ.Old_Style_Web_Design.txt,v 1.4 2019/11/25 13:08:31 gilles Exp gilles $ + +This document is also available online at +https://imapsync.lamiral.info/FAQ.d/ +https://imapsync.lamiral.info/FAQ.d/FAQ.Old_Style_Web_Design.txt + +======================================================================= + Imapsync tips for Gmail accounts. +======================================================================= + +Questions answered in this FAQ are: + +Q. Why the imapsync website looks so old fashion? + +Now the questions again with their answers. + +======================================================================= +Q. Why the imapsync website looks so old fashion? + +R. Once in a while I receive messages from people complaining about +the website style, not that much about the content by the way, +as people don't read. + +I know the imapsync website has a grandmother style, +I'm not offended by complaints about it. + +Here are several reasons it stays like that for now: + +* I like to do things myself + +* I like static web + +* I'm proud to be w3c compliant + https://validator.w3.org/check?uri=https%3A%2F%2Fimapsync.lamiral.info + Very very few sites are w3c compliant, it's because all CMS frameworks aren't. + +* I prefer to spend more time on the product itself than the showcase + +* The product is a command line, a fancy website to sell a command line + makes more disappointed buyers + + +I agree I could do some sort of A/B experiment and see whether during +a month I sell more imapsync on a brand new style B site than +the current A one. + + +Besides, don't misunderstand buyers. The surprising thing about complainers +is that all are web designers, none is a user not in the webdesign branch. +I even received some phone call from a buyer saying: "I saw your website +and I told to myself: this can't be a fake one, the product must be a good one". + +Another folk like me: +http://keyhut.com/pos.htm +(well, not w3c compliant, since only mad people try to be w3c compliant) diff --git a/FAQ.d/FAQ.OnlineUI.txt b/FAQ.d/FAQ.OnlineUI.txt index 44125c5..a08bb2a 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.19 2019/01/28 10:59:16 gilles Exp gilles $ +$Id: FAQ.OnlineUI.txt,v 1.20 2019/12/06 14:51:03 gilles Exp gilles $ This document is also available online at https://imapsync.lamiral.info/FAQ.d/ @@ -30,17 +30,17 @@ R0. Well, I don't know if asking the provider whether his online R1. Some figures -Date of this report: 26 December 2018. +Date of this report: 6 December 2019. The online imapsync service /X started 9 January 2017 -(716 days of service). +(1061 days of service). -In average, /X has 20 users per day lunching in mean 6 -different migrations, from one launch to many (hundreds). +In average, /X has 50 users per day lunching in mean 6 +different migrations, from just one launch to many (hundreds). -The total volume /X transferred is around 45 TiB in more -than 111 thousands email imap migrations, -157 millions email messages. +The total volume /X transferred is around 101 TiB in more +than 219 thousands email imap migrations, +340 millions email messages. R2. Pros & Cons @@ -54,23 +54,24 @@ the imap logins and passwords, can't be eavesdropped on the network. Imapsync itself takes care about encryption for the imap sessions, if possible: It tries SSL first on port 993, then TLS on port 143 if the servers announces TLS, then no encryption at all. -What is done with the source imap server host1 is independent -of what is done with the destination imap server host2. +Concerning encryption, what is done with the source imap server host1 +is independent of what is done with the destination imap server host2. -At the date of 26 December 2018, there is no security problem +At the date of 6 December 2019, 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 -from the server side. +from the server side and take measure if the service suffers from +your acts. -As the owner of the service, it could have been 48 000 pairs of -credentials collected and nearly 17 terabytes of email messages. +As the owner of the service, it could have been 219 000 pairs of +credentials collected and nearly 101 terabytes of email messages. 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 (by default) -because too many imap servers are crappy configured regarding -certificates. +The imap server certificates are not checked for authenticity +(by default) because too many imap servers are crappy configured +regarding certified certificates. This default behavior is chosen like this because users of /X want their emails transferred, instead of being not transferred @@ -90,7 +91,7 @@ imapsync is just one of them. Last point, who could be sure that no cracker cracked the online hosts and that he isn't currently sniffing the credentials? -No one, I'm not sure myself, even if I do take care of that +No one, I'm not sure myself, even if I do take care of that possibility. So changing the imap accounts passwords after a sync is a safe and recommended practice! @@ -109,8 +110,8 @@ connections (imapsync stuff). If the Browser/WebServer connection is timeout or ended, the imapsync sync is also ended immediately by the remote -Apache https server. Technically, Apache sends a TERM signal, -to the imapsync process then wait some seconds before +Apache https server. Technically, Apache sends a TERM signal +to the imapsync process, then wait some seconds before sending a KILL signal if it is still alive. You can relaunch a sync again with "Sync!" button, at any time. @@ -126,8 +127,9 @@ parameters, same credentials, or imapsync will ignore the demand. In other words, you can try safely to launch several parallel runs between the same mailboxes. Open a new tab/windows with /X, -and start a same sync, it's safe, the /X will say, if any, that -there is already a current sync running. +and start the exact same sync. It's safe, the /X will say, if any, that +there is already a current sync running on them and it will present +the logfile running the sync like a "tail -f" command (isn't that magic?). ===================================================================== diff --git a/FAQ.d/FAQ.POP3.txt b/FAQ.d/FAQ.POP3.txt index d7af159..e557392 100644 --- a/FAQ.d/FAQ.POP3.txt +++ b/FAQ.d/FAQ.POP3.txt @@ -1,5 +1,5 @@ #!/bin/cat -$Id: FAQ.POP3.txt,v 1.3 2018/05/24 11:34:30 gilles Exp gilles $ +$Id: FAQ.POP3.txt,v 1.5 2019/07/27 20:18:37 gilles Exp gilles $ This document is also available online at https://imapsync.lamiral.info/FAQ.d/ @@ -25,11 +25,12 @@ Q. Can I use imapsync to migrate emails from pop3 server to imap server? R1. No, but you can migrate emails from a pop3 server to an imap server with the command line tool pop2imap: http://www.linux-france.org/prj/pop2imap/ +http://www.linux-france.org/prj/pop2imap/README R2. Yes, sometimes, because many pop3 servers runs in parallel with an imap server on exactly the same mailboxes. They serve -the same INBOX (imap serves INBOX and several other folders, -pop3 serves only INBOX). +the same INBOX, ie, imap serves INBOX and several other folders, +pop3 serves only INBOX. So have a try with imapsync on the same host1. ======================================================================= @@ -38,25 +39,80 @@ Q. How can I handle those terrible POP-leaving-a-copy users? their emails after a migration, which is a big pain and causes hundreds of support calls. +R1. Context and condition: you have access to the POP email client tool +and the user WILL STAY using POP. -R. A discussion about this issue +POP email client tools can leave or delete the messages after pulling +them. It's very often a configurable behavior. Configure the email client +tool to delete the messages already pulled and then they won't never +be pulled again from the server to the client. + +If you can't access to the POP email client tool, see R2 below. + +Problem in the future: INBOX will be seen as empty when the email client +go to IMAP (unless the email client tool allows then an upload +synchronization, but don't count on that...) + + +R2. Context and condition: you know which users use POP. + +If the pop mailboxes are known then all the INBOX messages can be moved +in an subfolder called INBOX_backup for example. Ti help you do this, +the tool pop2imap transfers messages from POP to IMAP, without duplicates, +without deleting the messages transferred, by default, and can put them +in any subfolder you want to. It can also delete them and, that way, +do what the email client tool don't or can't do, for any reason. +We're here to do a good job with what we have, do we? + +In case of Dovecot for example, the magic can be there since already +fetched messages via POP are seen as \Seen in IMAP but the new messages are +seen as new messages, thanks to the Dovecot developper Timo's cleverness!. +So it is possible to sync back only the new messages to INBOX, +with "imapsync ... --search UNSEEN ...", and then POP users won't see the old +messages come back but they will see the new messages and fetch them via POP. + + +R3. Context and condition: you know nothing + +Do R2 without the sync back of UNSEEN messages. It can't hurt to have a backup +of INBOX in a subfolder for IMAP or POP users. + +R4. Here are some points, an analyse that made me purpose the not +to bad but not very good R2 answer. + +There was a discussion about this issue on the imapsync mailing-list: http://www.linux-france.org/prj/imapsync_list/msg02622.html http://www.linux-france.org/prj/imapsync_list/msg02623.html My reply was not very good http://www.linux-france.org/prj/imapsync_list/msg02624.html It's because I wrote pop2imap and it uses a stateless -mechanism to avoid duplicates, I wasn't aware of UIDL. - -Here is a better response to handle and fix this problem, I hope: -If the pop mailboxes are known and known to be regularly fetched, then -all the INBOX messages, or at least the "old" ones, can be moved in an -subfolder INBOX_back. It requires to have "access" to the POP -sessions. The POP server log file is usually enough to know which -account opened a pop connection, and when. +mechanism to avoid duplicates, I wasn't aware of UIDL when I wrote pop2imap, +and later when I entered the discussion. See also Rick Sanders discussion about this issue: https://www.emailquestions.com/threads/how-to-prevent-duplicate-emails-after-server-migration-for-pop3-users-with-leave-mail-on-server.8109/ +Quoting Timo Sirainen on +https://wiki2.dovecot.org/Migration + +"If a client already saw changed UIDLs and decided to start +re-downloading mails, it's unlikely there is anything you can do to +stop it. Even going back to your old server is unlikely to help at +that point." + +"Some (many?) POP3 clients also require that the message ordering is +preserved." + +"Some clients re-download all mails if you change the hostname in the +client configuration. Be aware of this when testing." + +Quoting +https://wiki.dovecot.org/POP3Server + +"Flag changes +By default when a message is RETRed, \Seen flag is added to it. +POP3 itself doesn't support flags, but if the mailbox is opened +with IMAP (eg. from webmail) it's shown as seen." ======================================================================= ======================================================================= diff --git a/FAQ.d/FAQ.Principles.txt b/FAQ.d/FAQ.Principles.txt new file mode 100644 index 0000000..fa2a2ed --- /dev/null +++ b/FAQ.d/FAQ.Principles.txt @@ -0,0 +1,41 @@ + +$Id: FAQ.Principles.txt,v 1.5 2019/09/05 13:33:46 gilles Exp gilles $ + +This documentation is also available online at +https://imapsync.lamiral.info/FAQ.d/ +https://imapsync.lamiral.info/FAQ.d/FAQ.Principles.txt + + +======================================================================= + Imapsync principles and design ideas +======================================================================= + + +Questions answered in this FAQ are: + +Q. What is the bandwidth used by imapsync? + + +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. + + 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. + + If the host2 is already filled with the messages, imapsync doesn't + transfer them and then the volume transferred is small, just the IMAP + commands 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 temporarly saved locally. + + +======================================================================= +======================================================================= \ No newline at end of file diff --git a/FAQ.d/FAQ.Release_Checklist.txt b/FAQ.d/FAQ.Release_Checklist.txt index e33cdc5..62fdfdc 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.11 2019/05/27 14:26:57 gilles Exp gilles $ +$Id: FAQ.Release_Checklist.txt,v 1.16 2020/01/04 09:35:36 gilles Exp gilles $ This documentation is also available online at https://imapsync.lamiral.info/FAQ.d/ @@ -13,6 +13,7 @@ https://imapsync.lamiral.info/FAQ.d/FAQ.Release_Checklist.txt Checklist before release a new release: - Add a new section in S/news.shtml reading "rlog imapsync" +- In case of a new dependency, add it to all the INSTALL/* files. - Generate the README - Run a spell checker on the README - Read the README again slowly. Fix all issues, all. @@ -20,15 +21,24 @@ Checklist before release a new release: - Read slowly README_Windows.txt - Read slowly the TUTORIAL_Unix file in html - Review the newsletter by running: - m4 -P W/ml_announce.in + m4 -P W/ml_announce.in.txt +- 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 - /X verify direct cgi - /X verify under noscript with firefox - /X verify under private with chrome +- Check the binaries imapsync.exe imapsync_64bit.exe with + https://www.virustotal.com/ + https://www.metadefender.com/ + + - make dist +- verify on Windows the zip extraction and simple execution of imapsync_example.bat - make publish - verify VERSION is uploaded diff --git a/FAQ.d/FAQ.SSL_errors.txt b/FAQ.d/FAQ.SSL_errors.txt index 33739dd..e17d2ce 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.7 2019/04/05 20:04:38 gilles Exp gilles $ +$Id: FAQ.SSL_errors.txt,v 1.9 2019/12/11 15:38:37 gilles Exp gilles $ This document is also available online at https://imapsync.lamiral.info/FAQ.d/ @@ -22,6 +22,9 @@ Q. What can I do to avoid those "SSL read/write errors"? Q. SSL connect attempt failed SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure + +Now the questions again with their answers. + ======================================================================= Q. What are the errors DEBUG: .../IO/Socket/SSL.pm:1165: local error: SSL write error @@ -76,7 +79,7 @@ R1. Use: depending on where the error occurs, host1 or host2 or both. R2. If it doesn't work, I let you try other things, - I quote the § "SSL_version" section of + I quote the "SSL_version" section of https://metacpan.org/pod/IO::Socket::SSL (Module version: 2.066) imapsync ... --sslargs1 SSL_version=SSLv2 diff --git a/FAQ.d/FAQ.SmarterMail.txt b/FAQ.d/FAQ.SmarterMail.txt index 3544282..9d59a4e 100644 --- a/FAQ.d/FAQ.SmarterMail.txt +++ b/FAQ.d/FAQ.SmarterMail.txt @@ -1,5 +1,5 @@ #!/bin/cat -$Id: FAQ.SmarterMail.txt,v 1.13 2019/06/20 10:11:21 gilles Exp gilles $ +$Id: FAQ.SmarterMail.txt,v 1.14 2019/10/15 14:57:19 gilles Exp gilles $ This document is also available online at https://imapsync.lamiral.info/FAQ.d/ @@ -17,12 +17,12 @@ Q. Synchronizing from SmarterMail to XXX On Unix: imapsync --host1 imap.d1.org --user1 joe --password1 secret1 \ --host2 imap.d2.org --user2 joe --password2 secret2 \ - --sep1 "/" --prefix1 "" --useheader Message-Id --noabletosearch1 + --sep1 "/" --prefix1 "" --useheader Message-Id --noabletosearch On Windows: imapsync.exe --host1 imap.d1.org --user1 joe --password1 secret1 ^ --host2 imap.d2.org --user2 joe --password2 secret2 ^ - --sep1 "/" --prefix1 "" --useheader Message-Id --noabletosearch1 + --sep1 "/" --prefix1 "" --useheader Message-Id --noabletosearch ======================================================================= @@ -31,12 +31,12 @@ Q. Synchronizing from XXX to SmarterMail On Unix: imapsync --host1 imap.d1.org --user1 joe --password1 secret1 \ --host2 imap.d2.org --user2 joe --password2 secret2 \ - --sep2 "/" --prefix2 "" --useheader Message-Id --noabletosearch2 + --sep2 "/" --prefix2 "" --useheader Message-Id --noabletosearch On Windows: imapsync.exe --host1 imap.d1.org --user1 joe --password1 secret1 ^ --host2 imap.d2.org --user2 joe --password2 secret2 ^ - --sep2 "/" --prefix2 "" --useheader Message-Id --noabletosearch2 + --sep2 "/" --prefix2 "" --useheader Message-Id --noabletosearch ======================================================================= diff --git a/FAQ.d/FAQ.Use_cache.txt b/FAQ.d/FAQ.Use_cache.txt index 64c029d..2365027 100644 --- a/FAQ.d/FAQ.Use_cache.txt +++ b/FAQ.d/FAQ.Use_cache.txt @@ -1,5 +1,5 @@ -$Id: FAQ.Use_cache.txt,v 1.8 2018/10/22 17:30:45 gilles Exp gilles $ +$Id: FAQ.Use_cache.txt,v 1.9 2019/09/13 10:43:06 gilles Exp gilles $ This document is also available online at https://imapsync.lamiral.info/FAQ.d/ @@ -12,6 +12,10 @@ https://imapsync.lamiral.info/FAQ.d/FAQ.Use_cache.txt Questions answered in this FAQ are: +Q. What is --usecache good for? + +Q. What is the technical principle of --usecache? + Q. On Windows, with --useuid or --usecache a problem occurs with long nested folder names. The error message is: "No such file or directory; The filename or extension is too long" @@ -19,8 +23,33 @@ Q. On Windows, with --useuid or --usecache a problem occurs with long Q. Inode problem with --usecache or --useuid on Linux -Questions and their answers: +Now the questions again and their answers +======================================================================= +Q. What is --usecache good for? + +R. The option --usecache is useful to speed up next syncs with --usecache. + The first sync with --usecache between two imap accounts is as low + as the first sync without --usecache. + +======================================================================= +Q. What is the technical principle of --usecache? + +R. Option --usecache creates a empty file per email message + in order to keep the UIDs mapping between account1 and account2. + + The cache is maintened at each run. Messages UIDs enregistred + in the cache are not fetched again to be identified. It really + speeds up the process of syncing. + + The cache directory is + + /imapsync_cache/ + + where is the temporary directory given by the --tmpdir option + or the one by default, /tmp on Unix, variable on Windows. + + ======================================================================= Q. On Windows, with --useuid or --usecache a problem occurs with long nested folder names. The error message is: diff --git a/FAQ.d/FAQ.Various_Software_Servers.txt b/FAQ.d/FAQ.Various_Software_Servers.txt index 6e7b622..af15885 100644 --- a/FAQ.d/FAQ.Various_Software_Servers.txt +++ b/FAQ.d/FAQ.Various_Software_Servers.txt @@ -1,5 +1,5 @@ #!/bin/cat -$Id: FAQ.Various_Software_Servers.txt,v 1.12 2019/06/26 22:17:03 gilles Exp gilles $ +$Id: FAQ.Various_Software_Servers.txt,v 1.13 2019/07/04 09:26:28 gilles Exp gilles $ This document is also available online at https://imapsync.lamiral.info/FAQ.d/ @@ -85,16 +85,6 @@ R. By Jamie Neil: I eventually managed to get the mail to migrate without errors using the following options: ---sep1 / - - doesn't report separator so has to be set explicitly. - ---nosyncacls - - doesn't support ACLs. - ---skipheader '^Content-Type' - - MIME separator IDs seem to change every time a mail is accessed so - this is required to stop duplicates. - --maxage 3650 - some messages just don't seem to want to transfer and produce the perl errors I mentioned before. This prevents the errors, but the @@ -112,16 +102,10 @@ something funny about the reported dates/sizes). It think this problem has been rectified in GW6.5. -2) The "skipheader '^Content-Type'" directive is required to stop -duplicate messages being created. GW seems to generate this field on -the fly for messages that have MIME separators and so it's different -every time. - -3) Version 6.0.1 of the Groupwise Internet Connector sucks. I was +2) Version 6.0.1 of the Groupwise Internet Connector sucks. I was getting server aborts when I pushed it a bit hard! I eventually had to upgrade to 6.0.4 which seems to be a lot more stable. - ======================================================================= Q. Migrating from iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) to Groupwise 7.0 diff --git a/FAQ.d/FAQ.Virus.txt b/FAQ.d/FAQ.Virus.txt index ece627d..549a7a0 100644 --- a/FAQ.d/FAQ.Virus.txt +++ b/FAQ.d/FAQ.Virus.txt @@ -1,5 +1,5 @@ -$Id: FAQ.Virus.txt,v 1.5 2018/05/24 11:34:30 gilles Exp gilles $ +$Id: FAQ.Virus.txt,v 1.6 2019/12/06 09:43:52 gilles Exp gilles $ This document is also available online at https://imapsync.lamiral.info/FAQ.d/ @@ -14,9 +14,9 @@ https://imapsync.lamiral.info/FAQ.d/FAQ.Virus.txt Q. My virus scanner claims imapsync.exe is a virus/malware/trojan etc. What the hell? -R1. Yes, I found the same. Two antivirus, Baidu and Jiangmin, report that - imapsync might have a trojan in it. - All others virus scanner say imapsync.exe is ok. +R1. Yes, I find the same sometimes with few antivirus, some report that + imapsync might have a trojan in it. + Most virus scanners say imapsync.exe and is ok. I've done this test on imapsync.exe release 1.727 on the two following meta-virus-scanners: https://www.virustotal.com/ @@ -35,12 +35,25 @@ R3. There is no virus alerts reported for the Perl script imapsync itself. The binary imapsync.exe is just a compiled version of the script imapsync, with perl interpreter itself and all modules needed by imapsync in order to make imapsync.exe a standalone software. - -R4. imapsync.exe release 1.836 is reported as totally clean by both + +R4. Using online meta-virus-scanners https://www.virustotal.com/ + https://www.metadefender.com/ + + Release 1.945 + + imapsync.exe release 1.945 is reported as totally clean: + * https://www.virustotal.com/gui/file/c122fd3bc82c9c784e8b27504e1843f95b1dfd9beba05f50a2893853ad4a6c59/details + * https://metadefender.opswat.com/results#!/file/bzE5MTIwNVN5ZXNDa2NMVEhCeWJpQTFjVVRT/regular/overview + + imapsync_64bit.exe release 1.945 is reported as totally clean: + * https://www.virustotal.com/gui/file/f561c6e457c3173f7b0379ee8cc267347feff1bc1991cf47fea7c513c81ccb0a/detection + * https://metadefender.opswat.com/results#!/file/bzE5MDkzMHJ5dk9qb2gxZEhIMXVkaWloeV9C/regular/multiscan + + + Release 1.836 + + imapsync.exe release 1.836 is reported as totally clean: https://www.virustotal.com/#/file/2a33eb93198da77677a4013a5dfb4868cb6aa8f4513e2102a55884b258d19043/detection - - and https://metadefender.opswat.com/ https://metadefender.opswat.com/results#!/file/ZTE4MDMxN1MxZTk4aGhxdEdCSlpxVTJoOVlN/regular/information - - \ No newline at end of file + diff --git a/FAQ.d/FAQ.XOAUTH2.txt b/FAQ.d/FAQ.XOAUTH2.txt index 300415b..0d26a88 100644 --- a/FAQ.d/FAQ.XOAUTH2.txt +++ b/FAQ.d/FAQ.XOAUTH2.txt @@ -1,5 +1,5 @@ #!/bin/cat -$Id: FAQ.XOAUTH2.txt,v 1.15 2018/08/28 21:48:53 gilles Exp gilles $ +$Id: FAQ.XOAUTH2.txt,v 1.16 2019/07/31 22:58:36 gilles Exp gilles $ This document is also available online at https://imapsync.lamiral.info/FAQ.d/ @@ -154,7 +154,8 @@ imapsync \ Use your own xoauth2 values. - +See also +http://www.notearthday.org/nedtech/2016/05/creating-creating-oauth2-credentials-with-google-apps/ ======================================================================= Q. How to use a proxy with XOAUTH2 authentication? diff --git a/FAQ.d/FAQ.Yandex.txt b/FAQ.d/FAQ.Yandex.txt new file mode 100644 index 0000000..a745ba0 --- /dev/null +++ b/FAQ.d/FAQ.Yandex.txt @@ -0,0 +1,26 @@ +#!/bin/cat +$Id: FAQ.Yandex.txt,v 1.1 2019/09/12 10:08:05 gilles Exp gilles $ + +This document is also available online at +https://imapsync.lamiral.info/FAQ.d/ +https://imapsync.lamiral.info/FAQ.d/FAQ.Kerio.txt + +======================================================================= + Imapsync tips for Yandex accounts. +======================================================================= + + + + +======================================================================= +Q. How to migrate from or to Yandex + + +R. Use: + + imapsync ... --useheader Message-Id --noabletosearch + +The option --noabletosearch is needed only if options --maxage or --minage +are used. I don't know which --search commands could work, maybe none. + +The imap server for --host1 or --host2 is usually imap.yandex.ru diff --git a/FAQ.d/htaccess.txt b/FAQ.d/htaccess.txt index aa4f041..d467dbf 100644 --- a/FAQ.d/htaccess.txt +++ b/FAQ.d/htaccess.txt @@ -1,55 +1,62 @@ -# $Id: htaccess.txt,v 1.25 2019/05/17 10:16:00 gilles Exp gilles $ +# $Id: htaccess.txt,v 1.27 2019/12/08 16:05:27 gilles Exp gilles $ -AddDescription "Back to Imapsync main page." .. -AddDescription "APPEND errors." FAQ.Admin_Authentication.txt -AddDescription "Authenticate via an admin account." FAQ.APPEND_errors.txt -AddDescription "Authentication failures." FAQ.Authentication_failure.txt -AddDescription "Archiving tips." FAQ.Archiving.txt -AddDescription "Big mailboxes tips." FAQ.Big_Mailbox.txt -AddDescription "Connection issues." FAQ.Connection.txt -AddDescription "Contacts & Calendars & Chat issues." FAQ.Contacts_Calendars.txt -AddDescription "Dates issues." FAQ.Dates.txt -AddDescription "David Tobit." FAQ.David_Tobit.txt -AddDescription "Domino." FAQ.Domino.txt -AddDescription "Dovecot." FAQ.Dovecot.txt -AddDescription "Duplicated messages issues." FAQ.Duplicates.txt -AddDescription "Emptying an account." FAQ.Emptying.txt -AddDescription "Exchange 20xx and Office365." FAQ.Exchange.txt -AddDescription "Changing folders names." FAQ.Folders_Mapping.txt -AddDescription "Selecting folders." FAQ.Folders_Selection.txt -AddDescription "Folders sizes with Imapsync." FAQ.Folders_Sizes.txt +AddDescription "Back to Imapsync main page." .. +AddDescription "Where this Description column comes from." htaccess.txt + +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 "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 "Dates issues." FAQ.Dates.txt +AddDescription "David Tobit accounts." FAQ.David_Tobit.txt +AddDescription "Domino accounts." FAQ.Domino.txt +AddDescription "Dovecot accounts." FAQ.Dovecot.txt +AddDescription "Duplicated messages issues." FAQ.Duplicates.txt +AddDescription "Emptying an account." FAQ.Emptying.txt +AddDescription "Exchange 20xx and Office365 accounts." FAQ.Exchange.txt +AddDescription "Selecting folders." FAQ.Folders_Selection.txt +AddDescription "Folders sizes with Imapsync." FAQ.Folders_Sizes.txt -AddDescription "Flags." FAQ.Flags.txt -AddDescription "General and pot-pourri issues" FAQ.General.txt -AddDescription "Gmail accounts." FAQ.Gmail.txt -AddDescription "ISP tips." FAQ.ISP.txt -AddDescription "Massive/bulk migrations." FAQ.Massive.txt -AddDescription "Memory issues." FAQ.Memory.txt -AddDescription "Migration Plan." FAQ.Migration_Plan.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 -AddDescription "POP3 issues." FAQ.POP3.txt -AddDescription "Selecting messages." FAQ.Messages_Selection.txt -AddDescription "How to transfer too big messages." FAQ.Messages_Too_Big.txt -AddDescription "Oracle-UCS." FAQ.Oracle-UCS.txt -AddDescription "Checklist before release a new release." FAQ.Release_Checklist.txt -AddDescription "Guidelines to report bugs." FAQ.Reporting_Bugs.txt -AddDescription "Security." FAQ.Security.txt -AddDescription "SSL errors." FAQ.SSL_errors.txt -AddDescription "SmarterMail." FAQ.SmarterMail.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 "ISP tips." FAQ.ISP.txt +AddDescription "Kerio accounts." FAQ.Kerio.txt +AddDescription "Massive/bulk migrations." FAQ.Massive.txt +AddDescription "Memory issues." FAQ.Memory.txt +AddDescription "Migration Plan." FAQ.Migration_Plan.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 +AddDescription "POP3 issues." FAQ.POP3.txt +AddDescription "Principles & design decisions." FAQ.Principles.txt +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 "TTL (Time To Live) delay in DNS configuration." FAQ.TTL.txt -AddDescription "Option --usecache and inodes." FAQ.Use_cache.txt -AddDescription "User concurrent access." FAQ.User_Concurrent_Access.txt -AddDescription "Virus scanners on Imapsync." FAQ.Virus.txt -AddDescription "Why use --addheader?." FAQ.Use_addheader.txt -AddDescription "Various imap software servers." FAQ.Various_Software_Servers.txt -AddDescription "XOAUTH2 (Gmail)." FAQ.XOAUTH2.txt -AddDescription "Yahoo." FAQ.Yahoo.txt -AddDescription "Zimbra." FAQ.Zimbra.txt -AddDescription "Where this Description column comes from." htaccess.txt +AddDescription "Checklist before release a new release." FAQ.Release_Checklist.txt +AddDescription "Guidelines to report bugs." FAQ.Reporting_Bugs.txt +AddDescription "Security." FAQ.Security.txt +AddDescription "SSL errors." FAQ.SSL_errors.txt +AddDescription "SmarterMail accounts." FAQ.SmarterMail.txt + +AddDescription "TTL (Time To Live) delay in DNS configuration." FAQ.TTL.txt +AddDescription "Option --usecache and inodes." FAQ.Use_cache.txt +AddDescription "User concurrent access." FAQ.User_Concurrent_Access.txt +AddDescription "Virus scanners on Imapsync." FAQ.Virus.txt +AddDescription "Why use --addheader?." FAQ.Use_addheader.txt +AddDescription "Various imap software servers." FAQ.Various_Software_Servers.txt +AddDescription "XOAUTH2 (Gmail)." FAQ.XOAUTH2.txt +AddDescription "Yahoo accounts." FAQ.Yahoo.txt +AddDescription "Yandex accounts." FAQ.Yandex.txt +AddDescription "Zimbra accounts." FAQ.Zimbra.txt diff --git a/INSTALL.d/Dockerfile b/INSTALL.d/Dockerfile index 87027c7..675c32e 100644 --- a/INSTALL.d/Dockerfile +++ b/INSTALL.d/Dockerfile @@ -1,6 +1,6 @@ ## Dockerfile for building a docker imapsync image -# $Id: Dockerfile,v 1.15 2019/02/26 11:39:31 gilles Exp gilles $ +# $Id: Dockerfile,v 1.28 2019/12/02 13:19:41 gilles Exp gilles $ # I use the following command to build the image: # # docker build -t gilleslamiral/imapsync . @@ -10,27 +10,40 @@ # I like thanks # I like stars # I also like (and need) money -# I thank you very much in advance +# I thank you very much + +# Number of imapsync images pulled so far (2019_12_02): 32732 +# Command used: +# curl -s https://hub.docker.com/v2/repositories/gilleslamiral/imapsync/ | jq '.pull_count' -FROM debian:stretch +FROM debian:buster -LABEL maintainer "gilles@lamiral.info" +LABEL maintainer="Gilles LAMIRAL " \ + description="Imapsync" \ + documentation="https://imapsync.lamiral.info/#doc" # Put a copy of the Dockerfile in the image itself # It can help future maintenance, isn't it? -# Also put my last imapsync on / for testing purpose -COPY Dockerfile imapsync / +COPY Dockerfile / -RUN apt-get update \ +# 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 \ - libjson-webtoken-perl \ 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 \ @@ -53,17 +66,25 @@ RUN apt-get update \ wget \ make \ cpanminus \ + lsof \ && rm -rf /var/lib/apt/lists/* -RUN wget -N https://imapsync.lamiral.info/imapsync \ - https://imapsync.lamiral.info/prerequisites_imapsync \ - && cp imapsync /usr/bin/imapsync \ - && chmod +x /usr/bin/imapsync # just_a_comment_to_force_update 2018_09_13_14_44_03 +RUN set -xe \ + && pwd \ + && wget -N https://imapsync.lamiral.info/imapsync \ + https://imapsync.lamiral.info/prerequisites_imapsync \ + && mv imapsync /usr/bin/imapsync \ + && chmod +x /usr/bin/imapsync /usr/bin/imapsync_local # just_a_comment_to_force_update 2019_11_26_12_58_34 -USER nobody + +USER nobody:nogroup ENV HOME /var/tmp/ +WORKDIR /var/tmp/ + +STOPSIGNAL SIGINT + CMD ["/usr/bin/imapsync"] # diff --git a/INSTALL.d/INSTALL.ANY.txt b/INSTALL.d/INSTALL.ANY.txt index 2cd4841..f12cf02 100644 --- a/INSTALL.d/INSTALL.ANY.txt +++ b/INSTALL.d/INSTALL.ANY.txt @@ -1,4 +1,4 @@ -# $Id: INSTALL.ANY.txt,v 1.58 2018/05/24 11:43:31 gilles Exp gilles $ +# $Id: INSTALL.ANY.txt,v 1.60 2019/11/28 14:37:40 gilles Exp gilles $ # # This is the main INSTALL file for imapsync. # imapsync : IMAP sync and migrate tool. @@ -13,7 +13,8 @@ https://imapsync.lamiral.info/INSTALL.d/INSTALL.ANY.txt imapsync works fine under any operating system with Perl and Perl modules (listed below). imapsync.exe works fine standalone under Windows XP, Vista, Seven, 20XX, either 32 or 64bit. - + imapsync_64bit.exe works fine standalone under Seven, 20XX, but only 64bit. + ======================================================================= Installing imapsync on WINDOWS ======================================================================= @@ -37,9 +38,11 @@ Those documents are also available at https://imapsync.lamiral.info/INSTALL.d/ - Debian - Ubuntu - AWS EC2 +- Arch Linux +- Docker - Online UI like /X -If you are not on one of these systems then read the section +If you are not on one of these systems then read the last section below called "Installing imapsync on other Unixes". ======================================================================= @@ -108,6 +111,15 @@ 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 +======================================================================= + Installing imapsync on ArchLinux +======================================================================= + +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 + ======================================================================= Installing imapsync online like /X ======================================================================= @@ -163,7 +175,8 @@ Install make in case it is not already installed. Run the "cpanm" command with the missing Perl modules as arguments. For example it can be: - cpanm Authen::NTLM Data::Uniqid File::Copy::Recursive IO::Tee Mail::IMAPClient Unicode::String + cpanm Authen::NTLM Data::Uniqid File::Copy::Recursive IO::Tee \ + Mail::IMAPClient Unicode::String Encode::IMAPUTF7 Once you've run the "cpanm" command, you can rerun "sh prerequisites_imapsync" to verify everything is ok: diff --git a/INSTALL.d/INSTALL.AWS_EC2.txt b/INSTALL.d/INSTALL.AWS_EC2.txt index 6304dd3..d0c47fe 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.5 2018/05/24 11:43:31 gilles Exp gilles $ +# $Id: INSTALL.AWS_EC2.txt,v 1.7 2019/11/28 14:37:23 gilles Exp gilles $ This documentation is also located online at https://imapsync.lamiral.info/INSTALL.d/ @@ -16,41 +16,45 @@ Amazon Linux AMI release 2017.03 sudo yum install \ -perl-Class-Load \ -perl-IO-Compress \ -perl-Crypt-OpenSSL-RSA \ -perl-Data-Dumper \ +perl-Class-Load \ +perl-IO-Compress \ +perl-Crypt-OpenSSL-RSA \ +perl-Data-Dumper \ perl-Dist-CheckConflicts \ +perl-ExtUtils-Embed \ perl-File-Copy-Recursive \ +perl-File-Tail \ perl-IO-Socket-INET6 \ -perl-IO-Socket-SSL \ -perl-JSON \ -perl-HTML-Parser \ -perl-libwww-perl \ +perl-IO-Socket-SSL \ +perl-JSON \ +perl-HTML-Parser \ +perl-libwww-perl \ perl-Mail-IMAPClient \ perl-Module-Implementation \ -perl-Module-Runtime \ -perl-Module-ScanDeps \ -perl-Net-SSLeay \ -perl-Package-Stash \ +perl-Module-Runtime \ +perl-Module-ScanDeps \ +perl-Net-SSLeay \ +perl-Package-Stash \ perl-Package-Stash-XS \ perl-Parse-RecDescent \ -perl-Readonly \ -perl-Regexp-Common \ -perl-Sys-MemInfo \ -perl-TermReadKey \ -perl-Test-Fatal \ -perl-Test-MockObject \ -perl-Test-Simple \ -perl-Test-Pod \ -perl-Test-Requires \ -perl-Try-Tiny \ -perl-Unicode-String \ -perl-URI \ -perl-ExtUtils-Embed \ +perl-Readonly \ +perl-Regexp-Common \ +perl-Sys-MemInfo \ +perl-TermReadKey \ +perl-Test-Fatal \ +perl-Test-MockObject \ +perl-Test-Simple \ +perl-Test-Pod \ +perl-Test-Requires \ +perl-Try-Tiny \ +perl-Unicode-String \ +perl-URI \ cpanminus -sudo cpanm Authen::NTLM Data::Uniqid IO::Tee JSON::WebToken JSON::WebToken::Crypt::RSA Test::Mock::Guard +sudo cpanm Authen::NTLM Data::Uniqid IO::Tee \ + JSON::WebToken JSON::WebToken::Crypt::RSA \ + Test::Mock::Guard \ + Encode::IMAPUTF7 wget -N https://imapsync.lamiral.info/imapsync diff --git a/INSTALL.d/INSTALL.ArchLinux.txt b/INSTALL.d/INSTALL.ArchLinux.txt index 4e303b6..261b03f 100644 --- a/INSTALL.d/INSTALL.ArchLinux.txt +++ b/INSTALL.d/INSTALL.ArchLinux.txt @@ -1,5 +1,5 @@ #!/bin/cat -# $Id: INSTALL.ArchLinux.txt,v 1.3 2018/09/03 02:00:22 gilles Exp gilles $ +# $Id: INSTALL.ArchLinux.txt,v 1.5 2019/11/28 14:37:59 gilles Exp gilles $ This documentation is also located online at https://imapsync.lamiral.info/INSTALL.d/ @@ -71,13 +71,15 @@ Commands to run: community/perl-test-nowarnings \ community/perl-test-deep \ extra/perl-try-tiny \ - extra/perl-uri + extra/perl-uri \ + community/perl-file-tail Mandatory Perl modules via cpanm: cpanm Mail::IMAPClient \ Unicode::String \ Sys::MemInfo \ + Encode::IMAPUTF7 Other Perl modules, needed sometimes: diff --git a/INSTALL.d/INSTALL.CPanel.txt b/INSTALL.d/INSTALL.CPanel.txt index 6dbfa09..6fd3296 100644 --- a/INSTALL.d/INSTALL.CPanel.txt +++ b/INSTALL.d/INSTALL.CPanel.txt @@ -1,5 +1,5 @@ #!/bin/cat -# $Id: INSTALL.CPanel.txt,v 1.6 2018/05/24 11:43:31 gilles Exp gilles $ +# $Id: INSTALL.CPanel.txt,v 1.7 2019/11/28 14:38:18 gilles Exp gilles $ This documentation is also located online at https://imapsync.lamiral.info/INSTALL.d/ @@ -26,5 +26,12 @@ A good test that shows also the basic example: imapsync + +If you want to update to the latest imapsync, then look at +the Centos installation document called INSTALL.Centos.txt +and also INSTALL.ANY.txt + +You're on your own, I don't have access to a CPanel system. + ======================================================================= ======================================================================= diff --git a/INSTALL.d/INSTALL.Centos.txt b/INSTALL.d/INSTALL.Centos.txt index 3c5c83b..165ee2a 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.12 2019/05/02 12:41:07 gilles Exp gilles $ +# $Id: INSTALL.Centos.txt,v 1.14 2019/11/28 14:37:02 gilles Exp gilles $ This documentation is also located online at https://imapsync.lamiral.info/INSTALL.d/ @@ -66,15 +66,18 @@ Then: perl-Test-Mock-Guard \ perl-Test-Requires \ perl-Test-Deep \ - perl-File-Tail + perl-File-Tail \ + perl-Unicode-String + cpanm Encode::IMAPUTF7 # this module is not available as a rpm package + wget -N https://imapsync.lamiral.info/imapsync chmod +x imapsync ./imapsync --testslive Now you should shave the latest imapsync locally working on Centos 7. -If you want to install it and replace the olf one: +If you want to install it and replace the old one: mv /usr/bin/imapsync /usr/bin/imapsync_old cp ./imapsync /usr/bin/imapsync @@ -82,7 +85,7 @@ If you want to install it and replace the olf one: imapsync --version should give the latest release number instead of 1.727 -(1.937 at the time of this writing) +(It is 1.964 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, @@ -145,7 +148,8 @@ Then: perl-Test-Mock-Guard \ perl-Test-Requires \ perl-Test-Deep \ - perl-File-Tail + perl-File-Tail \ + perl-Unicode-String wget https://imapsync.lamiral.info/imapsync diff --git a/INSTALL.d/INSTALL.Darwin.txt b/INSTALL.d/INSTALL.Darwin.txt index c92912d..3c3119d 100644 --- a/INSTALL.d/INSTALL.Darwin.txt +++ b/INSTALL.d/INSTALL.Darwin.txt @@ -1,5 +1,5 @@ #!/bin/cat -# $Id: INSTALL.Darwin.txt,v 1.19 2018/12/06 10:07:58 gilles Exp gilles $ +# $Id: INSTALL.Darwin.txt,v 1.24 2019/11/28 14:42:52 gilles Exp gilles $ This documentation is also located online at https://imapsync.lamiral.info/INSTALL.d/ @@ -9,6 +9,21 @@ https://imapsync.lamiral.info/INSTALL.d/INSTALL.Darwin.txt 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 @@ -42,8 +57,8 @@ real IMAP server accounts: If this sync works fine then imapsync_bin_Darwin is ready for any imap account synchronization. -When reading the documentation with imapsync command lines -examples, you have to replace the command "imapsync" by "imapsync_bin_Darwin" +When reading the documentation with imapsync command lines examples, +you have to replace the command "imapsync" by "imapsync_bin_Darwin" For example, instead of the command: ./imapsync \ @@ -56,6 +71,33 @@ 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 + +or + + cp examples/sync_loop_darwin.sh mysync.sh + sh mysync.sh + +Now read on the tutorial +https://imapsync.lamiral.info/doc/TUTORIAL_Unix.html + ======================================================================= Installing imapsync script on Darwin / Mac OS X with brew ======================================================================= diff --git a/INSTALL.d/INSTALL.Debian.txt b/INSTALL.d/INSTALL.Debian.txt index 6bf7035..e2cc501 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.25 2018/11/20 10:28:33 gilles Exp gilles $ +# $Id: INSTALL.Debian.txt,v 1.30 2019/11/28 14:36:18 gilles Exp gilles $ This documentation is also located online at https://imapsync.lamiral.info/INSTALL.d/ @@ -7,7 +7,7 @@ https://imapsync.lamiral.info/INSTALL.d/INSTALL.Debian.txt There is three install sections in this document, -one for Debian 9 Stretch +one for Debian 9 Stretch and Debian 10 Buster one for Debian 8 Jessie one for Debian 7 Wheezy @@ -24,23 +24,31 @@ https://lists.debian.org/debian-user/2016/11/msg00849.html ======================================================================= - Installing imapsync on Debian 9 Stretch + Installing imapsync on Debian 9 Stretch or Debian 10 Buster ======================================================================= -Here is the command to install imapsync dependencies. +How to install imapsync dependencies on a Debian system? + The repositories are the classical ones, ie, a /etc/apt/sources.list file with: +# Debian 9 Stretch deb http://deb.debian.org/debian stretch main contrib +or + +# Debian 10 Buster +deb http://deb.debian.org/debian buster main contrib + + You need root privilege to run it, be root or use sudo. apt install -y \ - libjson-webtoken-perl \ 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 \ @@ -75,8 +83,9 @@ go to the section "After installing the dependencies" below. Installing imapsync on Debian 8 Jessie ======================================================================= -Here are the commands to install imapsync dependencies. -You need root priviledge to run them. +How to install imapsync dependencies on a Debian system? + +You need root priviledge. The first command installs standard Debian packages: apt install \ @@ -84,7 +93,9 @@ apt install \ 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 \ @@ -144,38 +155,41 @@ go to the section "After installing the dependencies" below. Installing imapsync on Debian 7 Wheezy ======================================================================= -Here are the two commands to install imapsync dependencies. -You need root priviledge to run them. +How to install imapsync dependencies on a Debian system? + +You need root priviledge to run the commands. The first command installs standard Debian packages: - apt-get install \ -libauthen-ntlm-perl \ -libclass-load-perl \ -libcrypt-openssl-rsa-perl \ -libdigest-hmac-perl \ -libfile-copy-recursive-perl \ -libio-compress-perl \ -libio-socket-inet6-perl \ -libio-socket-ssl-perl \ -libio-tee-perl \ -libmail-imapclient-perl \ -libmodule-implementation-perl \ -libmodule-runtime-perl \ -libmodule-scandeps-perl \ -libpackage-stash-perl \ -libpackage-stash-xs-perl \ -libpar-packer-perl \ -libreadonly-perl \ -libterm-readkey-perl \ -libtest-fatal-perl \ -libtest-pod-perl \ -libtest-requires-perl \ -libtest-simple-perl \ -libunicode-string-perl \ -liburi-perl \ -make \ -cpanminus +apt-get install \ + libauthen-ntlm-perl \ + libclass-load-perl \ + libcrypt-openssl-rsa-perl \ + libdigest-hmac-perl \ + libencode-imaputf7-perl \ + libfile-copy-recursive-perl \ + libfile-tail-perl \ + libio-compress-perl \ + libio-socket-inet6-perl \ + libio-socket-ssl-perl \ + libio-tee-perl \ + libmail-imapclient-perl \ + libmodule-implementation-perl \ + libmodule-runtime-perl \ + libmodule-scandeps-perl \ + libpackage-stash-perl \ + libpackage-stash-xs-perl \ + libpar-packer-perl \ + libreadonly-perl \ + libterm-readkey-perl \ + libtest-fatal-perl \ + libtest-pod-perl \ + libtest-requires-perl \ + libtest-simple-perl \ + libunicode-string-perl \ + liburi-perl \ + make \ + cpanminus The following second command installs "manually" the Perl modules diff --git a/INSTALL.d/INSTALL.Docker.txt b/INSTALL.d/INSTALL.Docker.txt deleted file mode 100644 index 2b2d59e..0000000 --- a/INSTALL.d/INSTALL.Docker.txt +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/cat -# $Id: INSTALL.Docker.txt,v 1.4 2018/09/13 17:50:06 gilles Exp gilles $ - -This documentation is also located online at -https://imapsync.lamiral.info/INSTALL.d/ -https://imapsync.lamiral.info/INSTALL.d/INSTALL.Docker.txt - -======================================================================= - Installing imapsync docker image -======================================================================= - -========================== -== Installation & usage == -========================== - -That's all you have to run: - - docker run gilleslamiral/imapsync imapsync - -========================= -== Installation alone == -========================== - -To install or update the imapsync image, run: - - docker pull gilleslamiral/imapsync - -== Docker hub location == - -https://hub.docker.com/r/gilleslamiral/imapsync/ - - -======================================================================= -======================================================================= diff --git a/INSTALL.d/INSTALL.Docker_build.txt b/INSTALL.d/INSTALL.Docker_build.txt index 981edb7..93ba37f 100644 --- a/INSTALL.d/INSTALL.Docker_build.txt +++ b/INSTALL.d/INSTALL.Docker_build.txt @@ -1,5 +1,5 @@ #!/bin/cat -# $Id: INSTALL.Docker_build.txt,v 1.8 2018/05/24 11:43:31 gilles Exp gilles $ +# $Id: INSTALL.Docker_build.txt,v 1.12 2019/11/28 14:43:48 gilles Exp gilles $ This documentation is also located online at https://imapsync.lamiral.info/INSTALL.d/ @@ -9,22 +9,53 @@ https://imapsync.lamiral.info/INSTALL.d/INSTALL.Docker_build.txt Building an imapsync docker image from Debian ======================================================================= +Nearly verbatim copy from https://imapsync.lamiral.info/INSTALL.d/Dockerfile +(nearly but the Dockerfile rcs tag Id: removed, that would conflict) -# Dockerfile for building a docker imapsync image +## Dockerfile for building a docker imapsync image -FROM debian:stretch +# Dockerfile,v 1.26 2019/11/27 15:49:13 gilles Exp gilles $ +# I use the following command to build the image: +# +# docker build -t gilleslamiral/imapsync . +# +# where this Dockerfile is in the current directory +# +# I like thanks +# I like stars +# I also like (and need) money +# I thank you very much in advance -LABEL maintainer "gilles@lamiral.info" -RUN apt-get update \ +FROM debian:buster + +LABEL maintainer="Gilles LAMIRAL " \ + description="Imapsync" \ + documentation="https://imapsync.lamiral.info/#doc" + +# 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 \ - libjson-webtoken-perl \ 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 \ @@ -41,20 +72,36 @@ RUN apt-get update \ libunicode-string-perl \ liburi-perl \ libwww-perl \ - libio-socket-inet6-perl \ procps \ wget \ + make \ + cpanminus \ + lsof \ && rm -rf /var/lib/apt/lists/* -RUN wget -N https://imapsync.lamiral.info/imapsync \ - && cp imapsync /usr/bin/imapsync \ - && chmod +x /usr/bin/imapsync +RUN set -xe \ + && pwd \ + && wget -N https://imapsync.lamiral.info/imapsync \ + https://imapsync.lamiral.info/prerequisites_imapsync \ + && mv imapsync /usr/bin/imapsync \ + && chmod +x /usr/bin/imapsync /usr/bin/imapsync_local # just_a_comment_to_force_update 2019_11_26_12_58_34 -USER nobody + +USER nobody:nogroup + +ENV HOME /var/tmp/ + +WORKDIR /var/tmp/ + +STOPSIGNAL SIGINT CMD ["/usr/bin/imapsync"] -# End of Dockerfile +# +# End of imapsync Dockerfile + + + ======================================================================= ======================================================================= diff --git a/INSTALL.d/INSTALL.FreeBSD.txt b/INSTALL.d/INSTALL.FreeBSD.txt index 67e9796..6c89190 100644 --- a/INSTALL.d/INSTALL.FreeBSD.txt +++ b/INSTALL.d/INSTALL.FreeBSD.txt @@ -1,5 +1,5 @@ #!/bin/cat -# $Id: INSTALL.FreeBSD.txt,v 1.10 2018/07/03 04:29:11 gilles Exp gilles $ +# $Id: INSTALL.FreeBSD.txt,v 1.11 2019/11/28 14:38:42 gilles Exp gilles $ This documentation is also located online at https://imapsync.lamiral.info/INSTALL.d/ @@ -30,6 +30,7 @@ install also: p5-Regexp-Common p5-Test-MockObject p5-CGI +p5-Encode-IMAPUTF7 Call to FreeBSD developer: It's also the new dependencies to add for next the imapsync package 1.882 diff --git a/INSTALL.d/INSTALL.OnlineUI.txt b/INSTALL.d/INSTALL.OnlineUI.txt index 61b05ca..921e640 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.30 2019/03/06 17:36:50 gilles Exp gilles $ +# $Id: INSTALL.OnlineUI.txt,v 1.32 2019/11/28 14:42:17 gilles Exp gilles $ This documentation is also located online at https://imapsync.lamiral.info/INSTALL.d/ @@ -9,13 +9,12 @@ https://imapsync.lamiral.info/INSTALL.d/INSTALL.OnlineUI.txt Installing imapsync online ======================================================================= -Please consider this as relatively new and experimental. +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. ======================================================================= Hardware consideration - RAM used per imapsync process, mean value: 230 MB. Average_bandwidth_rate: 345 KiB/s ~ 2.8 Mbps. @@ -23,24 +22,30 @@ 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. +preferred platform (I run /X service on Linux and FreeBSD). -I haven't tested yet this visual interface on Windows nor Mac, -feedback is welcome from successes or failures on those platforms. -Like imapsync is written, it should fail on Windows because of -some hard coded Unix paths. +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 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). + +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 a logo image: -* https://i005.lamiral.info/X/imapsync_form.html +* 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 @@ -54,11 +59,11 @@ with wget. Those four files can be put anywhere on a web server, as long as they stand in the same directory. If you want to put them in different directories, just change -the content of imapsync_form.html to reflect the change, +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.html) - src="imapsync_form.js" (near the end of imapsync_form.html) -I let you changing the image logo as an exercise. + 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. The actual imap syncing work is done by imapsync acting as a CGI, the visual interface is only there to give imapsync the parameters @@ -78,7 +83,7 @@ If it is under release 4.08 (2014-10-18) then upgrade it with cpanm CGI It is a good thing to remove the old one if it was installed -by a distribution package, I let you this part as an exercise. +by a distribution package, I let you this part as an exercise too. To check and fix the Perl modules dependencies, run: @@ -88,20 +93,21 @@ To check and fix the Perl modules dependencies, run: In order to make imapsync work as a cgi, there is 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. -Second, imapsync has to work by itself on the web host using -the Unix user running the web server. -Detailed examples to verify that will be provided further -in this document. -The imapsync_form.html file in action calls the CGI location +Second, imapsync has to work by itself on the web host using +the Unix user running the web server. Detailed examples to +verify that will be provided further in this document. + +The imapsync_form_extra.html file in action calls the CGI location /cgi-bin/imapsync 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 -It is the program file used verbatim for the service given at +This file is the program file used verbatim for the service given at https://i005.lamiral.info/X/ Copy the three files imapsync_form.* on a directory that is exported @@ -111,9 +117,14 @@ allowing CGIs and you'll have your own imapsync visual interface and service. The cgi-bin/ directory is usually outside the hierarchy exported to anybody by the HTTP server. +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. - -Concrete example on a Debian server with Apache: +============================================================================= +A) Concrete example on a Debian server with Apache: Imapsync script place on the server disk: /usr/lib/cgi-bin/imapsync @@ -165,18 +176,18 @@ ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ The UI front-end file place on the server disk in this example is -/var/www/html/X/imapsync_form.html +/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. mkdir /var/www/html/X/ cd /var/www/html/X/ wget -N \ - https://i005.lamiral.info/X/imapsync_form.html \ + 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 - ln -s imapsync_form.html index.html + ln -s imapsync_form_extra.html index.html The imapsync process working directory in cgi mode is /var/tmp/imapsync_cgi/ @@ -186,23 +197,23 @@ In this directory will go the log files and the pid files. Check - http://yourhost/X/imapsync_form.html + http://yourhost/X/imapsync_form_extra.html or the safer - https://yourhost/X/imapsync_form.html + https://yourhost/X/imapsync_form_extra.html That's all for installing a /X service on Debian. - -Example on a Centos 7 server with httpd Apache: +============================================================================= +B) Concrete example on a Centos 7 server with httpd Apache: mkdir /var/www/html/X/ cd /var/www/html/X/ wget -N \ - https://i005.lamiral.info/X/imapsync_form.html \ + 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 - ln -s imapsync_form.html index.html + ln -s imapsync_form_extra.html index.html cd wget -N https://imapsync.lamiral.info/imapsync @@ -217,9 +228,9 @@ Example on a Centos 7 server with httpd Apache: Check - http://yourhost/X/imapsync_form.html + http://yourhost/X/imapsync_form_extra.html or the safer - https://yourhost/X/imapsync_form.html + https://yourhost/X/imapsync_form_extra.html That's all for installing a /X service on Centos 7. diff --git a/INSTALL.d/INSTALL.Ubuntu.txt b/INSTALL.d/INSTALL.Ubuntu.txt index b0ceed4..6fa6ac0 100644 --- a/INSTALL.d/INSTALL.Ubuntu.txt +++ b/INSTALL.d/INSTALL.Ubuntu.txt @@ -1,5 +1,5 @@ #!/bin/cat -# $Id: INSTALL.Ubuntu.txt,v 1.15 2018/11/20 10:28:05 gilles Exp gilles $ +# $Id: INSTALL.Ubuntu.txt,v 1.17 2019/11/28 14:35:43 gilles Exp gilles $ This documentation is also located online at https://imapsync.lamiral.info/INSTALL.d/ @@ -21,7 +21,9 @@ libcrypt-ssleay-perl \ libdata-uniqid-perl \ libdigest-hmac-perl \ libdist-checkconflicts-perl \ +libencode-imaputf7-perl \ libfile-copy-recursive-perl \ +libfile-tail-perl \ libio-compress-perl \ libio-socket-inet6-perl \ libio-socket-ssl-perl \ diff --git a/INSTALL.d/memo_docker b/INSTALL.d/memo_docker index 4643413..81ee8d6 100644 --- a/INSTALL.d/memo_docker +++ b/INSTALL.d/memo_docker @@ -10,26 +10,42 @@ imapsync_docker_timestamp_dockerfile() { echo imapsync_docker_build imapsync_docker_build() { - docker build -t gilleslamiral/imapsync . - docker images - echo + docker build -t gilleslamiral/imapsync . \ + && imapsync_docker_add_tag_version && echo Build SUCCEEDED || echo Build FAILED + + echo #docker run gilleslamiral/imapsync imapsync --testslive #docker run gilleslamiral/imapsync imapsync --testslive6 # docker run gilleslamiral/imapsync imapsync --testslive6 --nossl2 } +echo imapsync_docker_add_tag_version +imapsync_docker_add_tag_version() { + docker images gilleslamiral/imapsync + echo + version=`docker run gilleslamiral/imapsync imapsync --version` + echo $version + docker tag gilleslamiral/imapsync:latest gilleslamiral/imapsync:$version + docker images gilleslamiral/imapsync +} + + + echo 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() { + echo docker run gilleslamiral/imapsync imapsync --testslive6 --ssl1 --ssl2 docker run gilleslamiral/imapsync imapsync --testslive6 --ssl1 --ssl2 } echo imapsync_docker_tests imapsync_docker_tests() { + echo docker run gilleslamiral/imapsync imapsync --tests docker run gilleslamiral/imapsync imapsync --tests } @@ -39,6 +55,12 @@ docker_delete_all_images() { docker rmi `docker images -q` } +echo docker_system_prune +docker_system_prune() +{ + docker system prune +} + echo docker_delete_dandling_images docker_delete_dandling_images() { docker images @@ -59,8 +81,15 @@ imapsync_docker_rebuild_from_scratch() { echo imapsync_docker_upload imapsync_docker_upload() { - docker login --username=gilleslamiral --password=`cat $HOME/var/pass/secret.docker` \ - && docker push gilleslamiral/imapsync + # 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 } diff --git a/INSTALL.d/prerequisites_imapsync b/INSTALL.d/prerequisites_imapsync index c06fef3..bbac1f4 100755 --- a/INSTALL.d/prerequisites_imapsync +++ b/INSTALL.d/prerequisites_imapsync @@ -1,9 +1,8 @@ #!/bin/sh -# $Id: prerequisites_imapsync,v 1.32 2019/05/27 18:52:23 gilles Exp gilles $ +# $Id: prerequisites_imapsync,v 1.35 2019/11/27 15:58:46 gilles Exp gilles $ MODULES_MANDATORY=' -File::Tail App::cpanminus Authen::NTLM CGI @@ -15,8 +14,11 @@ Digest::HMAC Digest::HMAC_MD5 Digest::MD5 Dist::CheckConflicts +Encode Encode::Byte +Encode::IMAPUTF7 File::Copy::Recursive +File::Tail IO::Socket::INET IO::Socket::INET6 IO::Socket::SSL @@ -27,6 +29,7 @@ JSON::WebToken::Crypt::RSA HTML::Entities LWP::UserAgent Mail::IMAPClient +MIME::Base64 Module::Implementation Module::Runtime Module::ScanDeps @@ -47,6 +50,7 @@ Test::More Test::Pod Test::Requires Test::Deep +Text::ParseWords Try::Tiny Unicode::String URI::Escape @@ -128,7 +132,7 @@ search_modules_any() { } # Debian, Ubuntu & Co - apt-file -h > /dev/null 2>&1 && { + apt-cache -h > /dev/null 2>&1 && { search_modules_apt "$@" return } @@ -212,7 +216,12 @@ search_modules_apt() { echo "==== Searching deb package name for $M with: apt-file search /$F" #echo apt-file search /$F echo - apt-file search /$F + if apt-file -h > /dev/null 2>&1 + then + apt-file search /$F + else + echo "apt-file is not installed. Suggestion: apt-get install apt-file; apt-file update" + fi echo echo "==== Searching deb package name for $M with: apt-cache search $M" #apt-cache search "$M" @@ -259,7 +268,7 @@ test_unix() { test_unix #exit -test_perl || exit +test_perl || exit 1 test_make || exit test_mandatory_modules list_to_install @@ -268,6 +277,13 @@ EXIT=$? # Help the user to install missing modules search_modules_any $LIST_TO_INSTALL -test "$1" = "MODULES_MANDATORY" && search_modules_any $MODULES_MANDATORY +if test "$1" = "MODULES_MANDATORY" +then + search_modules_any $MODULES_MANDATORY +elif test -n "$1" +then + search_modules_any "$@" +fi + test_cpanm exit $EXIT diff --git a/Makefile b/Makefile index 79e4298..94dcaeb 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ -# $Id: Makefile,v 1.301 2019/05/28 14:25:35 gilles Exp gilles $ +# $Id: Makefile,v 1.320 2020/01/03 22:50:27 gilles Exp gilles $ .PHONY: help usage all doc @@ -61,7 +61,6 @@ PREFIX ?= /usr 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) -VERSION_EXE := $(shell cat ./VERSION_EXE) IMAPClient_3xx := ./W/Mail-IMAPClient-3.42/lib IMAPClient := $(IMAPClient_3xx) @@ -83,19 +82,18 @@ DISTRO_CODE := $(shell lsb_release -c -s || echo Unknown) DISTRO := $(DISTRO_NAME)_$(DISTRO_RELEASE)_$(DISTRO_CODE) hello: - @echo "$(VERSION)" - @echo "$(DIST_NAME)" - @echo "$(VERSION_PREVIOUS)" - @echo "$(VERSION_EXE)" - @echo "$(IMAPClient)" - @echo "$(HOSTNAME)" - @echo "$(ARCH)" - @echo "$(KERNEL)" - @echo "$(BIN_NAME)" - @echo "$(DISTRO)" + @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)" + @echo "BIN_NAME $(BIN_NAME)" + @echo "DISTRO $(DISTRO)" -all: doc VERSION biz prereq allcritic bin VERSION_EXE +all: doc VERSION biz prereq allcritic bin testp : sh INSTALL.d/prerequisites_imapsync @@ -106,16 +104,14 @@ ChangeLog: imapsync README: imapsync pod2text --loose imapsync > README + chmod -x README VERSION: imapsync rcsdiff imapsync perl -I./$(IMAPClient) ./imapsync --version > ./VERSION touch -r ./imapsync ./VERSION -VERSION_EXE: imapsync - ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/imapsync.exe --version' > ./VERSION_EXE - dos2unix ./VERSION_EXE - touch -r ./imapsync ./VERSION_EXE + doc/GOOD_PRACTICES.html: doc/GOOD_PRACTICES.t2t @@ -184,7 +180,7 @@ install: testp W/imapsync.1 .PHONY: prereq test tests unitests testp testf test3xx testv3 perlcritic allcritic crit compok dev cover tidy nytprof -dev: test crit cover nytprof bin +dev: test functree crit cover nytprof bin docker: ssh ks3 'cd docker/imapsync && . memo_docker' @@ -193,11 +189,17 @@ docker: docker_copy_to_ks3: - rsync -av imapsync INSTALL.d/Dockerfile INSTALL.d/memo_docker ks3:docker/imapsync/ + 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_upload_docker_hub: ssh ks3 'cd docker/imapsync && . memo_docker && imapsync_docker_upload' +functree: + perl ./W/learn/function_calls_ppi ./imapsync > W/imapsync_functions_tree_ppi.txt + perl ./W/learn/function_calls ./imapsync > W/imapsync_functions_tree.txt + + nytprof: sh tests.sh ll_nytprof nytprofhtml @@ -315,6 +317,7 @@ W/test_testsdebug.bat: + .PHONY: W/*.bat examples/* @@ -409,31 +412,46 @@ W/uninstall_module_one.bat: scp W/uninstall_module_one.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/' ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/uninstall_module_one.bat' -imapsync.exe: imapsync +imapsync_32bit.exe: imapsync rcsdiff imapsync ssh Admin@c 'perl -V' - (date "+%s"| tr "\n" " "; echo -n "BEGIN " $(VERSION) ": "; date) >> W/.BUILD_EXE_TIME + (date "+%s"| tr "\n" " "; echo -n "BEGIN 32bit " $(VERSION) ": "; date) >> W/.BUILD_EXE_TIME unix2dos W/build_exe.bat W/test_exe.bat W/install_modules.bat scp imapsync W/build_exe.bat W/test_exe.bat W/install_modules.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/' ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/build_exe.bat' ./W/check_winerr build_exe.bat ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/test_exe.bat' ./W/check_winerr test_exe.bat - rm -f imapsync.exe - scp Admin@c:'C:/msys/1.0/home/Admin/imapsync/imapsync.exe' . - chmod a+r+x imapsync.exe - (date "+%s"| tr "\n" " "; echo -n "END " $(VERSION) ": "; date) >> W/.BUILD_EXE_TIME + rm -f imapsync_32bit.exe + scp Admin@c:'C:/msys/1.0/home/Admin/imapsync/imapsync_32bit.exe' . + chmod a+r+x imapsync_32bit.exe + (date "+%s"| tr "\n" " "; echo -n "END 32bit " $(VERSION) ": "; date) >> W/.BUILD_EXE_TIME -exe: imapsync - (date "+%s"| tr "\n" " "; echo -n "BEGIN " $(VERSION) ": "; date) >> W/.BUILD_EXE_TIME +32exe: imapsync + (date "+%s"| tr "\n" " "; echo -n "BEGIN 32bit " $(VERSION) ": "; date) >> W/.BUILD_EXE_TIME scp imapsync W/build_exe.bat W/install_modules.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/' ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/build_exe.bat' ./W/check_winerr build_exe.bat - ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/imapsync.exe --justbanner' - rm -f imapsync.exe - scp Admin@c:'C:/msys/1.0/home/Admin/imapsync/imapsync.exe' . - chmod a+r+x imapsync.exe - (date "+%s"| tr "\n" " "; echo -n "END " $(VERSION) ": "; date) >> W/.BUILD_EXE_TIME + ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/imapsync_32bit.exe --justbanner' + rm -f imapsync_32bit.exe + scp Admin@c:'C:/msys/1.0/home/Admin/imapsync/imapsync_32bit.exe' . + chmod a+r+x imapsync_32bit.exe + (date "+%s"| tr "\n" " "; echo -n "END 32bit " $(VERSION) ": "; date) >> W/.BUILD_EXE_TIME + + + +p24tests: + 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: + 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' + ./W/check_win64err test_testsdebug.bat + zzz: unix2dos W/build_exe.bat W/install_module_one.bat @@ -449,6 +467,11 @@ zzz2: ssh 'pc HP DV7'@p24 'Desktop/imapsync_build/test_exe_tests.bat' ./W/check_win64err test_exe_tests.bat +W/test_ipv6.bat: + unix2dos 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/test4.bat: unix2dos W/test4.bat scp W/test4.bat pc_HP_DV7_p24:'Desktop/imapsync_build' @@ -459,6 +482,43 @@ W/test5.bat: scp W/test5.bat pc_HP_DV7_p24:'Desktop/imapsync_build' ssh 'pc HP DV7'@p24 'Desktop/imapsync_build/test5.bat' +W/test6.bat: + unix2dos W/test6.bat + scp W/test6.bat imapsync pc_HP_DV7_p24:'Desktop/imapsync_build' + ssh 'pc HP DV7'@p24 'Desktop/imapsync_build/test6.bat' + +W/test_abort.bat: + unix2dos W/test_abort.bat + scp W/test_abort.bat imapsync pc_HP_DV7_p24:'Desktop/imapsync_build' + ssh 'pc HP DV7'@p24 'Desktop/imapsync_build/test_abort.bat' + +W/test_tail.bat: + unix2dos W/test_tail.bat + scp W/test_tail.bat imapsync pc_HP_DV7_p24:'Desktop/imapsync_build' + ssh 'pc HP DV7'@p24 'Desktop/imapsync_build/test_tail.bat' + +win64sshaccess: + ssh 'pc HP DV7'@p24 'perl -V' + + +win64prepa: + ssh 'pc HP DV7'@p24 'perl -V' + unix2dos W/build_exe.bat W/test_exe.bat W/install_modules.bat W/install_module_one.bat + scp imapsync W/build_exe.bat W/install_modules.bat W/install_module_one.bat \ + W/test_exe_tests.bat W/test_exe_testsdebug.bat W/test_exe.bat \ + pc_HP_DV7_p24:'Desktop/imapsync_build' + ssh 'pc HP DV7'@p24 'Desktop/imapsync_build/build_exe.bat' + ./W/check_win64err build_exe.bat + +win64build: + unix2dos W/build_exe.bat W/install_modules.bat + scp imapsync W/build_exe.bat W/install_modules.bat pc_HP_DV7_p24:'Desktop/imapsync_build' + ssh 'pc HP DV7'@p24 'Desktop/imapsync_build/build_exe.bat' + ./W/check_win64err build_exe.bat + +imapsync.exe: imapsync_64bit.exe + cp imapsync_64bit.exe imapsync.exe + imapsync_64bit.exe: imapsync (date "+%s"| tr "\n" " "; echo -n "BEGIN 64bit " $(VERSION) ": "; date) >> W/.BUILD_EXE_TIME @@ -472,24 +532,24 @@ imapsync_64bit.exe: imapsync ssh 'pc HP DV7'@p24 'Desktop/imapsync_build/test_exe.bat' ./W/check_win64err test_exe.bat rm -f imapsync_64bit.exe - scp pc_HP_DV7_p24:'Desktop/imapsync_build/imapsync.exe' imapsync_64bit.exe + scp pc_HP_DV7_p24:'Desktop/imapsync_build/imapsync_64bit.exe' . chmod a+r+x imapsync_64bit.exe - (date "+%s"| tr "\n" " "; echo -n "END 64bit " $(VERSION) ": "; date) >> W/.BUILD_EXE_TIME + (date "+%s"| tr "\n" " "; echo -n "END 64bit " $(VERSION) ": "; date) >> W/.BUILD_EXE_TIME zip: dosify_bat - rm -rfv ../prepa_zip/imapsync_$(VERSION_EXE)/ - mkdir -p ../prepa_zip/imapsync_$(VERSION_EXE)/FAQ.d/ ../prepa_zip/imapsync_$(VERSION_EXE)/Cook/ - cp -av examples/imapsync_example.bat examples/sync_loop_windows.bat examples/file.txt ../prepa_zip/imapsync_$(VERSION_EXE)/ - cp -av W/build_exe.bat W/install_modules.bat W/test_cook_exe.bat W/test_cook_src.bat imapsync ../prepa_zip/imapsync_$(VERSION_EXE)/Cook/ - for f in README ; do cp -av $$f ../prepa_zip/imapsync_$(VERSION_EXE)/$$f.txt ; done - cp -av FAQ.d/*.txt ../prepa_zip/imapsync_$(VERSION_EXE)/FAQ.d/ - cp -av imapsync.exe imapsync_64bit.exe README_Windows.txt ../prepa_zip/imapsync_$(VERSION_EXE)/ - unix2dos ../prepa_zip/imapsync_$(VERSION_EXE)/*.txt - cd ../prepa_zip/ && rm -f ./imapsync_$(VERSION_EXE).zip && zip -r ./imapsync_$(VERSION_EXE).zip ./imapsync_$(VERSION_EXE)/ - scp ../prepa_zip/imapsync_$(VERSION_EXE).zip Admin@c:'C:/msys/1.0/home/Admin/' - scp ../prepa_zip/imapsync_$(VERSION_EXE).zip pc_HP_DV7_p24:'Desktop/' - cp ../prepa_zip/imapsync_$(VERSION_EXE).zip /fe/imapsync/ + rm -rfv ../prepa_zip/imapsync_$(VERSION)/ + mkdir -p ../prepa_zip/imapsync_$(VERSION)/FAQ.d/ ../prepa_zip/imapsync_$(VERSION)/Cook/ + cp -av examples/imapsync_example.bat examples/sync_loop_windows.bat examples/file.txt ../prepa_zip/imapsync_$(VERSION)/ + cp -av W/build_exe.bat W/install_modules.bat W/test_cook_exe.bat W/test_cook_src.bat imapsync ../prepa_zip/imapsync_$(VERSION)/Cook/ + for f in README ; do cp -av $$f ../prepa_zip/imapsync_$(VERSION)/$$f.txt ; done + cp -av FAQ.d/*.txt ../prepa_zip/imapsync_$(VERSION)/FAQ.d/ + cp -av imapsync.exe imapsync_32bit.exe README_Windows.txt ../prepa_zip/imapsync_$(VERSION)/ + unix2dos ../prepa_zip/imapsync_$(VERSION)/*.txt + cd ../prepa_zip/ && rm -f ./imapsync_$(VERSION).zip && zip -r ./imapsync_$(VERSION).zip ./imapsync_$(VERSION)/ + scp ../prepa_zip/imapsync_$(VERSION).zip Admin@c:'C:/msys/1.0/home/Admin/' + scp ../prepa_zip/imapsync_$(VERSION).zip pc_HP_DV7_p24:'Desktop/' + cp ../prepa_zip/imapsync_$(VERSION).zip /fe/imapsync/ # C:\Users\mansour\Desktop\imapsync @@ -498,6 +558,16 @@ zip: dosify_bat 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: + rsync -av -p -e 'ssh -4 -p 995' X/ gilleslamira@gate.polarhome.com:X/ + + +macforce: maccopy + ssh -4 -p 995 gilleslamira@gate.polarhome.com 'sh -x build_mac.sh' + + imapsync_bin_Darwin: imapsync W/build_mac.sh INSTALL.d/prerequisites_imapsync rcsdiff imapsync rsync -p -e 'ssh -4 -p 995' imapsync W/build_mac.sh INSTALL.d/prerequisites_imapsync gilleslamira@gate.polarhome.com: @@ -521,23 +591,28 @@ mactestslive6: ssh -4 -p 995 gilleslamira@gate.polarhome.com '. .bash_profile; perl imapsync --testslive6' -bin: lin mac win win64 +bin: mac win64 win32 lin: $(BIN_NAME) -win: imapsync.exe +win: win64 win32 imapsync.exe win64: imapsync_64bit.exe +win32: imapsync_32bit.exe + + $(BIN_NAME): imapsync rcsdiff imapsync - { pp -o $(BIN_NAME) -I $(IMAPClient_3xx) \ + { pp -x -o $(BIN_NAME) -I $(IMAPClient_3xx) \ -M 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 \ imapsync ; \ - } || : + } + # Maybe add -M Test2::Event::Info \ + #-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 \ + #-M Test2::Event -M Test2::Formatter -M Test2::Formatter::TAP \ ./$(BIN_NAME) ./$(BIN_NAME) --tests ./$(BIN_NAME) --testslive @@ -560,9 +635,8 @@ tarball: cidone ci: cidone -cidone: - rcsdiff RCS/* - rcsdiff X/cgi_memo X/stat_patterns.txt X/imapsync_form.html X/imapsync_form.js X/imapsync_form.css X/noscript.css +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 cd W && rcsdiff RCS/* rcsdiff doc/*.t2t @@ -572,6 +646,7 @@ cidone: cd examples && rcsdiff RCS/* rcsdiff W/tools/backup_old_dist W/tools/gen_README_dist W/tools/validate_html4 W/tools/validate_xml_html5 W/tools/fix_email_for_exchange.py rcsdiff S/*.txt S/*.shtml S/*.html + rcsdiff RCS/* dist: cidone test clean all perlcritic dist_prepa dist_zip README_dist @@ -583,7 +658,7 @@ md5: sha: cd $(DIST_PATH)/ && sha512sum * -.PHONY: moveoldrelease ks2testsdebug ks2tests README_dist +.PHONY: moveoldrelease ks2testsdebug ks2tests README_dist docker_pull_count moveoldrelease: ./W/tools/backup_old_dist $(DIST_PATH) @@ -600,22 +675,27 @@ dist_prepa: tarball moveoldrelease dist_zip: zip - cp -a ../prepa_zip/imapsync_$(VERSION_EXE).zip $(DIST_PATH)/ + cp -a ../prepa_zip/imapsync_$(VERSION).zip $(DIST_PATH)/ 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 +.PHONY: publish upload_ks ks valid_index biz ks2tests_gilles ks2tests_root auto_ci -biz: S/imapsync_sold_by_country.txt +biz: S/imapsync_sold_by_country.txt docker_pull_count + +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 cd S/ && /g/bin/imapsync_by_country && echo | ci -l imapsync_sold_by_country.txt - + ks: - rsync -avHz --delete --exclude imapsync.exe \ + rsync -avHz --delete --exclude '*.exe' \ . gilles@ks.lamiral.info:public_html/imapsync/ ssh root@ks.lamiral.info 'apachectl configtest && /etc/init.d/apache2 reload' @@ -653,6 +733,11 @@ 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' + + ks2testslive: rsync -aP imapsync gilles@ks.lamiral.info:public_html/imapsync/imapsync ssh gilles@ks.lamiral.info 'public_html/imapsync/imapsync --testslive' @@ -672,13 +757,13 @@ centos: PUBLIC = ./ChangeLog ./NOLIMIT ./LICENSE ./CREDITS ./FAQ \ ./index.shtml ./INSTALL ./README_Windows.txt \ -./VERSION ./VERSION_EXE ./imapsync \ +./VERSION ./imapsync \ ./README ./TODO ./vnstat ml: - rcsdiff W/ml_announce.in - m4 -P W/ml_announce.in | mutt -H- + rcsdiff W/ml_announce.in.txt + m4 -P W/ml_announce.in.txt | mutt -H- mailq @@ -716,9 +801,6 @@ W/.valid.index.shtml: index.shtml .PHONY: upload_index upload_FAQ ci_imapsync upload_bin -upload_bin: - rsync -a imapsync.exe imapsync_64bit.exe imapsync_bin_Darwin imapsync_bin_Linux_i686 imapsync ../imapsync_website/ - rsync -aHvz --delete ../imapsync_website/ root@ks.lamiral.info:/var/www/imapsync/ upload_index: W/.valid.index.shtml 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 @@ -737,24 +819,25 @@ ci_imapsync: rcsdiff imapsync upload_latest: unitests ci_imapsync bin - rsync -a imapsync imapsync_bin_Linux_i686 imapsync_bin_Darwin imapsync.exe imapsync_64bit.exe ./INSTALL.d/prerequisites_imapsync ../imapsync_website/ + 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/ - ssh root@ks.lamiral.info 'apachectl configtest && /etc/init.d/apache2 reload' + upload_cgi: unitests ks2tests i005tests_root ci_imapsync - rsync -a imapsync ../imapsync_website/ + 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 upload_cgi_memo: - rsync -av X/cgi_memo X/stat_patterns.txt root@ks2:/var/tmp/imapsync_cgi/ - rsync -av X/cgi_memo X/stat_patterns.txt root@i005:/var/tmp/imapsync_cgi/ + 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/ upload_X: - ./W/tools/validate_xml_html5 X/imapsync_form.html - rcsdiff X/imapsync_form.html - rcsdiff X/imapsync_form.js + ./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 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/ @@ -784,3 +867,9 @@ upload_ks: ci tarball ssh root@ks.lamiral.info 'apachectl configtest && /etc/init.d/apache2 reload' +upload_ks5: + rsync -aHvz --delete ../imapsync_website/ root@ks5.lamiral.info:/usr/local/www/apache24/data/imapsync/ + + + + diff --git a/README b/README index 4eb395b..510ca35 100644 --- a/README +++ b/README @@ -1,11 +1,12 @@ NAME - imapsync - Email IMAP tool for syncing, copying and migrating email - mailboxes between two imap servers, one way, and without duplicates. + 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.945 $ + This documentation refers to Imapsync $Revision: 1.977 $ USAGE @@ -52,15 +53,15 @@ DESCRIPTION servers. A classical scenario is synchronizing a mailbox B from another mailbox A - in case 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. + 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). + 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 @@ -88,11 +89,11 @@ OPTIONS usage: imapsync [options] - Standard options are the six values forming the credentials, three on - each sides, needed to log in into the IMAP servers, ie, a host, a - username, and a password, two times. + 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: + Conventions used in the following descriptions of the options: str means string int means integer @@ -106,8 +107,8 @@ OPTIONS --host1 str : Source or "from" imap server. --port1 int : Port to connect on host1. - Optional since default ports are the - well known ports 143 or 993. + 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. @@ -117,10 +118,10 @@ OPTIONS --password2 str : Password for the user2. --showpasswords : Shows passwords on output instead of "MASKED". - Useful to restart a complete run by just reading + 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. + 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 @@ -184,14 +185,14 @@ OPTIONS --folderrec str : Sync this folder recursively. --folderrec str : and this one, etc. - --folderfirst str : Sync this folder first. --folderfirst "Work" + --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 + similar folder is synced (example: with folders "Sent", "SENT" and "sent" on host1 only "Sent" will be synced to host2). @@ -218,14 +219,14 @@ OPTIONS --regextrans2 options before all others. Add --debug to see what's really going on. - --subfolder1 str : Syncs the host1 folders hierarchy under str - to the root hierarchy of host2. + --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. + 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 + on host2. Then use --subfolder1 str for restoring + from the folder str, after inverting host1/host2 user1/user2 values. @@ -239,25 +240,26 @@ OPTIONS 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. + 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, + --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. + --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, remove --justfolders. - Have in mind that --regextrans2 is applied after - the automatic prefix and separator inversion. + 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 @@ -288,6 +290,18 @@ OPTIONS --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. @@ -295,13 +309,22 @@ OPTIONS --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. + --pipemess cmd : and this one, etc. With several --pipemess, the output of each cmd - command (STDOUT) is given to the input (STDIN) + command (STDOUT) is given to the input (STDIN) of the next command. - For example, + For example, --pipemess cmd1 --pipemess cmd2 --pipemess cmd3 is like a Unix pipe: "cat message | cmd1 | cmd2 | cmd3" @@ -312,6 +335,23 @@ OPTIONS 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: @@ -336,7 +376,7 @@ OPTIONS 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 + 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. @@ -362,12 +402,15 @@ OPTIONS --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 : Deleted only folders matching regex. + --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 regex. + --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 @@ -393,7 +436,7 @@ OPTIONS see also --minage --minage int : Skip messages newer than int days. final stats (skipped) don't count newer messages - You can do (+ are the messages selected): + You can do (+ zone are the messages selected): past|----maxage+++++++++++++++>now past|+++++++++++++++minage---->now past|----maxage+++++minage---->now (intersection) @@ -401,22 +444,23 @@ OPTIONS --search str : Selects only messages returned by this IMAP SEARCH command. Applied on both sides. - For a complete of what can be search see + 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. - --search CRIT equals --search1 CRIT --search2 CRIT + 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. + 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 the sync. + --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 @@ -426,10 +470,10 @@ OPTIONS OPTIONS/miscellaneous --syncacls : Synchronizes acls (Access Control Lists). - --nosyncacls : Does not synchronize acls. This is the default. 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, @@ -457,17 +501,17 @@ OPTIONS OPTIONS/specific - --gmail1 : sets --host1 to Gmail and options from FAQ.Gmail.txt - --gmail2 : sets --host2 to Gmail and options from FAQ.Gmail.txt + --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 options from FAQ.Exchange.txt - --office2 : sets --host2 to Office365 options from FAQ.Exchange.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 from FAQ.Exchange.txt, account1 part - --exchange2 : sets options from FAQ.Exchange.txt, account2 part + --exchange1 : sets options for Exchange. See FAQ.Exchange.txt + --exchange2 : sets options for Exchange. See FAQ.Exchange.txt - --domino1 : sets options from FAQ.Domino.txt, account1 part - --domino2 : sets options from FAQ.Domino.txt, account2 part + --domino1 : sets options for Domino. See FAQ.Domino.txt + --domino2 : sets options for Domino. See FAQ.Domino.txt OPTIONS/behavior @@ -483,11 +527,11 @@ OPTIONS --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 + --exitwhenover int : Stop syncing and exits when int total bytes transferred is reached. --version : Print only software version. - --noreleasecheck : Do not check for new imapsync release + --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 @@ -498,7 +542,7 @@ OPTIONS 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. @@ -534,8 +578,9 @@ SECURITY CAPABILITY list of the servers. If TLS is supported then imapsync goes to encryption. - If the automatic ssl/tls detection fails then imapsync will not protect - against sniffing activities on the network, especially for passwords. + 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 @@ -545,9 +590,9 @@ SECURITY EXIT STATUS Imapsync will exit with a 0 status (return code) if everything went - good. Otherwise, it exits with a non-zero status. Here is the list of - the exit code values (an integer between 0 and 255), the names reflects - their meaning: + 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 */ @@ -568,9 +613,9 @@ EXIT STATUS LICENSE AND COPYRIGHT Imapsync is free, open, public but not always gratis software cover by - the NOLIMIT Public License. See the LICENSE file included in the - distribution or just read this simple sentence as it IS the licence - text: + 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." @@ -584,8 +629,7 @@ AUTHOR Gilles LAMIRAL - Good feedback good is always welcome. Bad feedback is very often - welcome. + 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 @@ -642,8 +686,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. - + 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 @@ -677,48 +721,46 @@ SIMILAR SOFTWARE See also https://imapsync.lamiral.info/S/external.shtml for a better up to date list. - Last updated and verified on Thu Apr 11, 2019. + 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 : http://www.washington.edu/imap/ part of the UW IMAP tookit. - 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) + 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, - basystemes, paid me to install a new imap server without losing huge old + 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 design was made with the beautiful rsync command in mind. + 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 diff --git a/README.md b/README.md index 8281c41..8a6fe04 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,8 @@ 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, +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: @@ -17,12 +17,13 @@ If it's too much, then consider a smaller donation: ```` NAME - imapsync - Email IMAP tool for syncing, copying and migrating email - mailboxes between two imap servers, one way, and without duplicates. + 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.945 $ + This documentation refers to Imapsync $Revision: 1.977 $ USAGE @@ -69,15 +70,15 @@ DESCRIPTION servers. A classical scenario is synchronizing a mailbox B from another mailbox A - in case 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. + 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). + 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 @@ -105,11 +106,11 @@ OPTIONS usage: imapsync [options] - Standard options are the six values forming the credentials, three on - each sides, needed to log in into the IMAP servers, ie, a host, a - username, and a password, two times. + 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: + Conventions used in the following descriptions of the options: str means string int means integer @@ -123,8 +124,8 @@ OPTIONS --host1 str : Source or "from" imap server. --port1 int : Port to connect on host1. - Optional since default ports are the - well known ports 143 or 993. + 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. @@ -134,10 +135,10 @@ OPTIONS --password2 str : Password for the user2. --showpasswords : Shows passwords on output instead of "MASKED". - Useful to restart a complete run by just reading + 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. + 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 @@ -201,14 +202,14 @@ OPTIONS --folderrec str : Sync this folder recursively. --folderrec str : and this one, etc. - --folderfirst str : Sync this folder first. --folderfirst "Work" + --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 + similar folder is synced (example: with folders "Sent", "SENT" and "sent" on host1 only "Sent" will be synced to host2). @@ -235,14 +236,14 @@ OPTIONS --regextrans2 options before all others. Add --debug to see what's really going on. - --subfolder1 str : Syncs the host1 folders hierarchy under str - to the root hierarchy of host2. + --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. + 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 + on host2. Then use --subfolder1 str for restoring + from the folder str, after inverting host1/host2 user1/user2 values. @@ -256,25 +257,26 @@ OPTIONS 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. + 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, + --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. + --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, remove --justfolders. - Have in mind that --regextrans2 is applied after - the automatic prefix and separator inversion. + 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 @@ -305,6 +307,18 @@ OPTIONS --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. @@ -312,13 +326,22 @@ OPTIONS --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. + --pipemess cmd : and this one, etc. With several --pipemess, the output of each cmd - command (STDOUT) is given to the input (STDIN) + command (STDOUT) is given to the input (STDIN) of the next command. - For example, + For example, --pipemess cmd1 --pipemess cmd2 --pipemess cmd3 is like a Unix pipe: "cat message | cmd1 | cmd2 | cmd3" @@ -329,6 +352,23 @@ OPTIONS 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: @@ -353,7 +393,7 @@ OPTIONS 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 + 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. @@ -379,12 +419,15 @@ OPTIONS --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 : Deleted only folders matching regex. + --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 regex. + --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 @@ -410,7 +453,7 @@ OPTIONS see also --minage --minage int : Skip messages newer than int days. final stats (skipped) don't count newer messages - You can do (+ are the messages selected): + You can do (+ zone are the messages selected): past|----maxage+++++++++++++++>now past|+++++++++++++++minage---->now past|----maxage+++++minage---->now (intersection) @@ -418,22 +461,23 @@ OPTIONS --search str : Selects only messages returned by this IMAP SEARCH command. Applied on both sides. - For a complete of what can be search see + 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. - --search CRIT equals --search1 CRIT --search2 CRIT + 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. + 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 the sync. + --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 @@ -443,10 +487,10 @@ OPTIONS OPTIONS/miscellaneous --syncacls : Synchronizes acls (Access Control Lists). - --nosyncacls : Does not synchronize acls. This is the default. 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, @@ -474,17 +518,17 @@ OPTIONS OPTIONS/specific - --gmail1 : sets --host1 to Gmail and options from FAQ.Gmail.txt - --gmail2 : sets --host2 to Gmail and options from FAQ.Gmail.txt + --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 options from FAQ.Exchange.txt - --office2 : sets --host2 to Office365 options from FAQ.Exchange.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 from FAQ.Exchange.txt, account1 part - --exchange2 : sets options from FAQ.Exchange.txt, account2 part + --exchange1 : sets options for Exchange. See FAQ.Exchange.txt + --exchange2 : sets options for Exchange. See FAQ.Exchange.txt - --domino1 : sets options from FAQ.Domino.txt, account1 part - --domino2 : sets options from FAQ.Domino.txt, account2 part + --domino1 : sets options for Domino. See FAQ.Domino.txt + --domino2 : sets options for Domino. See FAQ.Domino.txt OPTIONS/behavior @@ -500,11 +544,11 @@ OPTIONS --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 + --exitwhenover int : Stop syncing and exits when int total bytes transferred is reached. --version : Print only software version. - --noreleasecheck : Do not check for new imapsync release + --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 @@ -515,7 +559,7 @@ OPTIONS 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. @@ -551,8 +595,9 @@ SECURITY CAPABILITY list of the servers. If TLS is supported then imapsync goes to encryption. - If the automatic ssl/tls detection fails then imapsync will not protect - against sniffing activities on the network, especially for passwords. + 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 @@ -562,9 +607,9 @@ SECURITY EXIT STATUS Imapsync will exit with a 0 status (return code) if everything went - good. Otherwise, it exits with a non-zero status. Here is the list of - the exit code values (an integer between 0 and 255), the names reflects - their meaning: + 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 */ @@ -585,9 +630,9 @@ EXIT STATUS LICENSE AND COPYRIGHT Imapsync is free, open, public but not always gratis software cover by - the NOLIMIT Public License. See the LICENSE file included in the - distribution or just read this simple sentence as it IS the licence - text: + 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." @@ -601,8 +646,7 @@ AUTHOR Gilles LAMIRAL - Good feedback good is always welcome. Bad feedback is very often - welcome. + 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 @@ -659,8 +703,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. - + 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 @@ -694,48 +738,46 @@ SIMILAR SOFTWARE See also https://imapsync.lamiral.info/S/external.shtml for a better up to date list. - Last updated and verified on Thu Apr 11, 2019. + 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 : http://www.washington.edu/imap/ part of the UW IMAP tookit. - 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) + 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, - basystemes, paid me to install a new imap server without losing huge old + 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 design was made with the beautiful rsync command in mind. + 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 diff --git a/README_Windows.txt b/README_Windows.txt index 5f27de1..6d89489 100644 --- a/README_Windows.txt +++ b/README_Windows.txt @@ -1,113 +1,157 @@ -# $Id: README_Windows.txt,v 1.14 2019/06/26 22:32:28 gilles Exp gilles $ +# $Id: README_Windows.txt,v 1.18 2019/12/11 18:52:16 gilles Exp gilles $ # # This is the README_Windows.txt file for imapsync -# imapsync : IMAP sync and migrate tool. +# imapsync : IMAP syncing and migration tool. -WINDOWS -======= +===================== + Imapsync on Windows +===================== -There is two ways to install and use imapsync on Windows systems: A) or B). + There is two ways to install and use imapsync on Windows systems: A) or B). -Standard users should take the A) way, the simplest way. + Standard users should take the A) way, the simplest way. -Developers, or powerful users that want to build their own imapsync.exe -or modify it, have to consider the B) way, the complex but powerful way. + Developers, or powerful 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. + 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. + 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. 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). + 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.3) Check the folder -In the folder extracted imapsync_1.xxx you see 6 files and 2 directories: + In the folder extracted imapsync_1.xxx you see 6 files and 2 directories: -* README_Windows.txt is the current file you are reading. -* 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 32bit binary. You don't have to run it directly. -* imapsync_64bit.exe is the imapsync 64bit binary. You don't have to run it directly. -* Cook/ is the directory to build imapsync.exe from its source, + * README_Windows.txt is the current file you are reading. + * 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. -You can copy or rename the file imapsync_example.bat as you wish, -as long as its extension remains ".bat". + You can copy or rename the file imapsync_example.bat as you wish, + as long as its extension remains ".bat", for example mysync.bat -On Windows systems .bat extension means "I'm a batch script". -It's the same for sync_loop_windows.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. -The batch scripts have to stay in the same directory than -imapsync.exe because of the way they call imapsync.exe. -They use ".\imapsync.exe", so let them be in the same directory. + The batch scripts have to stay in the same directory than + imapsync.exe because of the way they call imapsync.exe. + They use ".\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 are doing (you have to use a pathname from the script point of view). + Or 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 imapsync_stuff.bat + + If you don't know how to copy and rename a file then + use imapsync_example.bat itself. A.4) Edit the batch file -Edit 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" -in the list presented in the small window menu. -Notepad or Notepadd++ are very good editors to modify it. -Office Word or any powerful text processor are not good for that job, -don't use them! + 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" + in the list presented in the small window menu. -Files FAQ.txt and FAQ.d/* contain many tips and special options sometimes -needed by specific imap server softwares like Exchange or Gmail. + Notepad or Notepadd++ are very good editors to modify 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! + + Files FAQ.txt and FAQ.d/* contain many tips and special options sometimes + needed by specific imap server softwares like Exchange or Gmail. + Those files are also available online at + https://imapsync.lamiral.info/FAQ.d/ 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 imapsync_stuff.bat -There is no need to have administrator privileges to run imapsync. + There is no need to have administrator privileges to run imapsync. -A.6) Loop on A.4) A.5) edit, run, edit, run etc. + The run happens in a DOS window. -Loop the process of editing and running imapsync until -you solve all issues and all values suit your needs. +A.6) Look the sync running. -A.7) Look the sync running. You can abort it at any time with a - quick double ctrl-c, hit ctrl-c twice within one second. - (a single ctrl-c will reconnect to both imap servers). + You can abort it at any time with a quick double ctrl-c, + 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. -A.8) 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 and the user2 parameter. + What you see in this DOS terminal is also put in a logfile located + in the subdirectory LOG_imapsync/ -There is one logfile per run. +A.7) Control what happened. -The logfile name is printed at the end of the imapsync run. -If you do not want logging to a file then use option --nolog + 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 + 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. + + When there is a problem, the problem is very often described + at the end of the logfile. -B) Hard way. It is the hard way because it installs all software - dependencies. This is the way for modifying imapsync.exe if needed. +A.8) Loop on A.4 through A.7 + + * A.4) edit + * A.5) run + * A.6) look + * A.7) control + + Loop on the process of editing, running and controlling imapsync + until you solve all issues and the sync is over. + + Congratulations! + + +------------ +B) Hard way +------------ + +It is the hard way because it installs all software dependencies. +This is the way for modifying imapsync.exe if needed. B.1) Install Perl if it isn't already installed. Strawberry Perl is a very good candidate http://strawberryperl.com/ - I use 5.26.0.1 (31 may 2017) but previous and later releases - should work (5.18 and 5.20 do) as well. + I use 5.30.1.1 (released 2019-11-22) but previous and later releases + 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 diff --git a/S/bc-payment.html b/S/bc-payment.html deleted file mode 100644 index 2e1ac98..0000000 --- a/S/bc-payment.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - -Pay with Bitcoins - - - diff --git a/S/paypal.shtml b/S/donate.shtml similarity index 88% rename from S/paypal.shtml rename to S/donate.shtml index 1b2bc58..45416a6 100644 --- a/S/paypal.shtml +++ b/S/donate.shtml @@ -29,9 +29,12 @@ -

imapsync donation

+

Imapsync donation

Help the author to maintain imapsync and its online services:

+ +

Donate via Paypal

+

@@ -43,11 +46,27 @@ value="-----BEGIN PKCS7-----MIIHRwYJKoZIhvcNAQcEoIIHODCCBzQCAQExggEwMIIBLAIBADCB

+

Donate with Crypto

+

+This donate button will ask your email address and your name but don't hesitate +to give fake ones, like "Smith" and smith@example.com if you prefer to be anonymous. +

+ + +

Thanks in advance!


+ Valid XHTML 1.0 Strict @@ -64,7 +83,7 @@ value="-----BEGIN PKCS7-----MIIHRwYJKoZIhvcNAQcEoIIHODCCBzQCAQExggEwMIIBLAIBADCB This document last modified on -($Id: paypal.shtml,v 1.13 2018/08/21 12:07:50 gilles Exp gilles $) +($Id: donate.shtml,v 1.16 2019/07/31 22:49:12 gilles Exp gilles $)

diff --git a/S/external.shtml b/S/external.shtml index 4837386..f1113fb 100644 --- a/S/external.shtml +++ b/S/external.shtml @@ -30,7 +30,7 @@ - + +
  • 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. +
  • + +

    External online IMAP migration services (back to menu)

    @@ -74,21 +81,23 @@ Prices are given par mailbox and may be outdated (Last checked on Thu Apr 11, 2019).

    - +
    @@ -117,7 +126,7 @@ alt="Viewable With Any Browser" /> This document last modified on -($Id: external.shtml,v 1.34 2019/05/27 16:18:54 gilles Exp gilles $)
    +($Id: external.shtml,v 1.45 2019/12/23 12:38:41 gilles Exp gilles $)
    Top of the page

    diff --git a/S/imapservers.shtml b/S/imapservers.shtml index faf56ba..c51aca4 100644 --- a/S/imapservers.shtml +++ b/S/imapservers.shtml @@ -4,7 +4,7 @@ -Imapsync list of the 79 imap server software applications supported +Imapsync list of the 81 imap server software applications supported @@ -27,12 +27,12 @@ -

    Imapsync list of the 79 imap server software applications supported (and the broken ones) (back to menu) +

    Imapsync list of the 81 imap server software applications supported (and the broken ones) (back to menu)

    To know whether your IMAP server is a widespread choice, -take a look at http://openemailsurvey.org/. -The quick answer is: if you're not using Dovecot then you're in a niche! +take a look at http://openemailsurvey.org/
    +The short answer is that if you're not using the famous Dovecot then you're in a niche!

    Let's start with the long reported success stories list: @@ -55,10 +55,12 @@ Example: Host2 banner:* OK Courier-IMAP ready -

    You can use option --justconnect to get those lines. -Example:

    +

    You can use the following command to get those lines +Examples:

    -imapsync --host1 test1.lamiral.info --host2 test2.lamiral.info --justconnect
    +imapsync --host1 test1.lamiral.info
    +
    +imapsync --host1 imap.gmail.com
     
    @@ -74,6 +76,9 @@ imapsync --host1 test1.lamiral.info --host2 test2.lamiral.info --justconnect
  • ArGoSoft IMAP Module Version 1.8 (1.8.8.2) http://www.argosoft.com/
  • Atmail 6.x [host1] https://www.atmail.com/
  • Axigen Mail Server Version 8.0.0 (https://www.axigen.com/)
  • + +
  • BigFoot 1.0 (Derek Snider)
  • +
  • BincImap 1.2.3 (GPL) (http://www.bincimap.org/)
  • BlueMind https://www.bluemind.net/
  • ClearOS https://www.clearos.com/ uses Cyrus as IMAP backend server.
  • @@ -88,7 +93,7 @@ imapsync --host1 test1.lamiral.info --host2 test2.lamiral.info --justconnect 2.3-alpha (OSI Approved), 2.3.1, 2.3.7, 2.3.16, v2.4.16 [host1] (https://www.cyrusimap.org/) -
  • David Tobit V8. (http://de.tobit.com/)
  • +
  • David Tobit V8. (https://tobit.software/)
  • David.fx Mail Access Server MA-12.00a (0188) [host1]
  • DBMail 1.2.1, 2.0.4, 2.0.9, 2.2rc1 (GPL). 2.0.7 seems buggy. (http://www.dbmail.org/)
  • @@ -100,6 +105,9 @@ imapsync --host1 test1.lamiral.info --host2 test2.lamiral.info --justconnect (http://www-03.ibm.com/software/products/en/ibmnotes)
  • Dovecot 0.99.10.4, 0.99.14, 0.99.14-8.fc4, 1.0-0.beta2.7, 1.0.0 [dest/source] (LGPL) (http://www.dovecot.org/) (http://www.dovecot.org/)
  • + +
  • Earthlink webhosting (https://www.earthlink.net/) uses BigFoot imap server.
  • +
  • Eudora WorldMail v2 (http://www.eudora.com/worldmail/)
  • Exchange Server 5.5, 6.0.6249.0[host1], 6.0.6487.0[host1], 6.5.7638.1 [host2], 6.5 [host1], Exchange 2007 SP1 (with Update Rollup 2), @@ -116,7 +124,7 @@ imapsync --host1 test1.lamiral.info --host2 test2.lamiral.info --justconnect
  • Gimap (Gmail imap) [host1] [host2] (http://mail.google.com/)
  • GMX IMAP4 StreamProxy. (http://www.gmx.com/)
  • Godaddy IMAP (since Godaddy runs Courier) (https://www.godaddy.com/)
  • -
  • Groupwise IMAP (Novell) 6.x and 7.0. Buggy so see the FAQ. +
  • Groupwise IMAP (Novell) 6.x and 7.0. Buggy so see the FAQ item about Groupwise (http://www.novell.com/products/groupwise/)
  • hMailServer 5.40-B1950 [host12], 5.3.3 [host2], 4.4.1 [host1], 5.3.2-B1769 [host2], 5.6 [host2] (https://www.hmailserver.com/)
  • @@ -152,7 +160,7 @@ imapsync --host1 test1.lamiral.info --host2 test2.lamiral.info --justconnect
  • Pegasus Mail (by David Harris) [host1] (http://www.pmail.com/
  • -
  • Perdition (http://horms.net/projects/perdition/
  • +
  • Perdition (https://projects.horms.net/projects/perdition/
  • ProtoMail [host1] (https://protonmail.com/
  • @@ -192,7 +200,7 @@ I will help you and make efforts to switch them to the success list, that's my job.

    -
      +
      1. DBMail 0.9, 2.0.7 (GPL). But most other DBMail releases are supported (see below).
      2. Imail 7.04 (maybe).
      3. MailEnable 1.54 (Proprietary) but MailEnable 4.23 is supported.
      4. @@ -200,7 +208,7 @@ that's my job. but MDaemon is supported as host1. MDaemon is simply buggy with the APPEND IMAP command with any IMAP email client. -
    + @@ -230,7 +238,7 @@ alt="Viewable With Any Browser" /> This document last modified on -($Id: imapservers.shtml,v 1.41 2019/05/27 18:53:01 gilles Exp gilles $)
    +($Id: imapservers.shtml,v 1.44 2019/12/02 23:51:12 gilles Exp gilles $)
    Top of the page

    diff --git a/S/imapsync_sold_by_country.txt b/S/imapsync_sold_by_country.txt index 60ec973..5a12c03 100644 --- a/S/imapsync_sold_by_country.txt +++ b/S/imapsync_sold_by_country.txt @@ -1,45 +1,45 @@ -1 Albanie_________________ 0.01 % 100 % 0 % 98 -1 Arabie_Saoudite_________ 0.01 % 100 % 0 % 97 -1 Bahrein_________________ 0.01 % 100 % 0 % 96 -1 Bolivie_________________ 0.01 % 100 % 0 % 95 -1 Bosnie-Herzegovine______ 0.01 % 100 % 0 % 94 -1 Burkina_Faso____________ 0.01 % 100 % 0 % 93 -1 Cameroun________________ 0.01 % 100 % 0 % 92 -1 Coree_du_Sud____________ 0.01 % 100 % 0 % 91 -1 Grenade_________________ 0.01 % 100 % 0 % 90 -1 Ile_Maurice_____________ 0.01 % 100 % 0 % 89 -1 Iles_Feroe______________ 0.01 % 100 % 0 % 88 -1 Iles_Vierges_britanniques__ 0.01 % 100 % 0 % 87 -1 Jamaique________________ 0.01 % 100 % 0 % 86 -1 Jordanie________________ 0.01 % 100 % 0 % 85 -1 Koweit__________________ 0.01 % 100 % 0 % 84 -1 Maldives________________ 0.01 % 100 % 0 % 83 -1 Maroc___________________ 0.01 % 100 % 0 % 82 -1 Moldavie________________ 0.01 % 100 % 0 % 81 -1 Monaco__________________ 0.01 % 100 % 0 % 80 -1 Mongolie________________ 0.01 % 100 % 0 % 79 -1 Namibie_________________ 0.01 % 100 % 0 % 78 -1 Panama__________________ 0.01 % 100 % 0 % 77 -1 Qatar___________________ 0.01 % 100 % 0 % 76 -1 Republique_d'Azerbaidjan__ 0.01 % 100 % 0 % 75 -1 Saint_Christophe-Nevis-Anguilla__ 0.01 % 100 % 0 % 74 -1 Senegal_________________ 0.01 % 100 % 0 % 73 -1 Tanzanie________________ 0.01 % 100 % 0 % 72 -1 Trinite-et-Tobago_______ 0.01 % 100 % 0 % 71 -2 Antilles_neerlandaises__ 0.03 % 100 % 0 % 70 -2 Colombie________________ 0.03 % 100 % 0 % 69 -2 Costa_Rica______________ 0.03 % 100 % 0 % 68 -2 Isra 0.03 % 100 % 0 % 67 +1 Arabie_Saoudite_________ 0.01 % 100 % 0 % 98 +1 Bahrein_________________ 0.01 % 100 % 0 % 97 +1 Bolivie_________________ 0.01 % 100 % 0 % 96 +1 Bosnie-Herzegovine______ 0.01 % 100 % 0 % 95 +1 Burkina_Faso____________ 0.01 % 100 % 0 % 94 +1 Cameroun________________ 0.01 % 100 % 0 % 93 +1 Coree_du_Sud____________ 0.01 % 100 % 0 % 92 +1 Grenade_________________ 0.01 % 100 % 0 % 91 +1 Ile_Maurice_____________ 0.01 % 100 % 0 % 90 +1 Iles_Feroe______________ 0.01 % 100 % 0 % 89 +1 Iles_Vierges_britanniques__ 0.01 % 100 % 0 % 88 +1 Jamaique________________ 0.01 % 100 % 0 % 87 +1 Jordanie________________ 0.01 % 100 % 0 % 86 +1 Koweit__________________ 0.01 % 100 % 0 % 85 +1 Maldives________________ 0.01 % 100 % 0 % 84 +1 Moldavie________________ 0.01 % 100 % 0 % 83 +1 Monaco__________________ 0.01 % 100 % 0 % 82 +1 Mongolie________________ 0.01 % 100 % 0 % 81 +1 Namibie_________________ 0.01 % 100 % 0 % 80 +1 Panama__________________ 0.01 % 100 % 0 % 79 +1 Qatar___________________ 0.01 % 100 % 0 % 78 +1 Republique_d'Azerbaidjan__ 0.01 % 100 % 0 % 77 +1 Saint_Christophe-Nevis-Anguilla__ 0.01 % 100 % 0 % 76 +1 Senegal_________________ 0.01 % 100 % 0 % 75 +1 Tanzanie________________ 0.01 % 100 % 0 % 74 +1 Trinite-et-Tobago_______ 0.01 % 100 % 0 % 73 +2 Albanie_________________ 0.03 % 100 % 0 % 72 +2 Antilles_neerlandaises__ 0.03 % 100 % 0 % 71 +2 Colombie________________ 0.03 % 100 % 0 % 70 +2 Costa_Rica______________ 0.03 % 100 % 0 % 69 +2 Isra 0.03 % 100 % 0 % 68 +2 Maroc___________________ 0.03 % 100 % 0 % 67 2 Nouvelle-Caledonie______ 0.03 % 99 % 1 % 66 2 Perou___________________ 0.03 % 99 % 1 % 65 2 Taiwan__________________ 0.03 % 99 % 1 % 64 2 Ukraine_________________ 0.03 % 99 % 1 % 63 3 Nigeria_________________ 0.04 % 99 % 1 % 62 -3 Russie,_Federation______ 0.04 % 99 % 1 % 61 -3 Uruguay_________________ 0.04 % 99 % 1 % 60 -3 Venezuela_______________ 0.04 % 99 % 1 % 59 -4 Indonesie_______________ 0.06 % 99 % 1 % 58 -4 Philippines_____________ 0.06 % 99 % 1 % 57 +3 Uruguay_________________ 0.04 % 99 % 1 % 61 +3 Venezuela_______________ 0.04 % 99 % 1 % 60 +4 Indonesie_______________ 0.06 % 99 % 1 % 59 +4 Philippines_____________ 0.06 % 99 % 1 % 58 +4 Russie,_Federation______ 0.06 % 99 % 1 % 57 4 Serbie__________________ 0.06 % 99 % 1 % 56 4 Turquie_________________ 0.06 % 99 % 1 % 55 4 Vietnam_________________ 0.06 % 99 % 1 % 54 @@ -47,53 +47,53 @@ 5 Egypte__________________ 0.07 % 99 % 1 % 52 5 Ireland_________________ 0.07 % 99 % 1 % 51 5 Lituanie________________ 0.07 % 99 % 1 % 50 -6 Malte___________________ 0.09 % 99 % 1 % 49 +6 Malte___________________ 0.08 % 99 % 1 % 49 7 Chypre__________________ 0.10 % 99 % 1 % 48 7 Estonie_________________ 0.10 % 98 % 2 % 47 7 Islande_________________ 0.10 % 98 % 2 % 46 -8 Croatie_________________ 0.11 % 98 % 2 % 45 -8 Thailande_______________ 0.11 % 98 % 2 % 44 -10 Emirats_Arabes_Unis_____ 0.14 % 98 % 2 % 43 -10 Lettonie________________ 0.14 % 98 % 2 % 42 -13 Israel__________________ 0.19 % 98 % 2 % 41 -15 Chine___________________ 0.21 % 98 % 2 % 40 -15 Luxembourg______________ 0.21 % 97 % 3 % 39 -16 Malaisie________________ 0.23 % 97 % 3 % 38 -16 Singapour_______________ 0.23 % 97 % 3 % 37 -17 Argentine_______________ 0.24 % 97 % 3 % 36 -17 Chili___________________ 0.24 % 96 % 4 % 35 -18 Slovenie________________ 0.26 % 96 % 4 % 34 -19 Mexique_________________ 0.27 % 96 % 4 % 33 -19 Slovaquie_______________ 0.27 % 96 % 4 % 32 -21 Inde____________________ 0.30 % 95 % 5 % 31 -23 Roumanie________________ 0.33 % 95 % 5 % 30 -24 Hong-Kong_______________ 0.34 % 95 % 5 % 29 -24 Irlande_________________ 0.34 % 94 % 6 % 28 -25 Afrique_du_Sud__________ 0.36 % 94 % 6 % 27 -25 Grece___________________ 0.36 % 94 % 6 % 26 -31 Japon___________________ 0.44 % 93 % 7 % 25 -31 Portugal________________ 0.44 % 93 % 7 % 24 -31 Russie__________________ 0.44 % 92 % 8 % 23 -32 Nouvelle-Zelande________ 0.46 % 92 % 8 % 22 -35 Hongrie_________________ 0.50 % 92 % 8 % 21 -37 ________________________ 0.53 % 91 % 9 % 20 -48 Finlande________________ 0.69 % 91 % 9 % 19 -50 Norvege_________________ 0.71 % 90 % 10 % 18 -53 Republique_tcheque______ 0.76 % 89 % 11 % 17 -66 Bresil__________________ 0.94 % 88 % 12 % 16 -78 Pologne_________________ 1.11 % 87 % 13 % 15 -96 Danemark________________ 1.37 % 86 % 14 % 14 -108 Suede___________________ 1.54 % 85 % 15 % 13 -115 Belgique________________ 1.64 % 83 % 17 % 12 -149 Espagne_________________ 2.13 % 82 % 18 % 11 -171 Autriche________________ 2.44 % 80 % 20 % 10 -227 Australie_______________ 3.24 % 77 % 23 % 9 -272 Suisse__________________ 3.89 % 74 % 26 % 8 -287 Canada__________________ 4.10 % 70 % 30 % 7 -299 Pays-Bas________________ 4.27 % 66 % 34 % 6 -345 France__________________ 4.93 % 62 % 38 % 5 -420 Italie__________________ 6.00 % 57 % 43 % 4 -631 Royaume-Uni_____________ 9.02 % 51 % 49 % 3 -1366 Allemagne_______________ 19.52 % 42 % 58 % 2 -1553 Etats-Unis______________ 22.20 % 22 % 78 % 1 -TOTAL = 6997 sales 342245 EUR over 98 countries on Thu Jun 27 01:16:49 CEST 2019 +10 Croatie_________________ 0.14 % 98 % 2 % 45 +10 Emirats_Arabes_Unis_____ 0.14 % 98 % 2 % 44 +10 Lettonie________________ 0.14 % 98 % 2 % 43 +10 Thailande_______________ 0.14 % 98 % 2 % 42 +13 Israel__________________ 0.18 % 98 % 2 % 41 +16 Chine___________________ 0.22 % 98 % 2 % 40 +16 Luxembourg______________ 0.22 % 97 % 3 % 39 +17 Argentine_______________ 0.23 % 97 % 3 % 38 +17 Malaisie________________ 0.23 % 97 % 3 % 37 +17 Singapour_______________ 0.23 % 97 % 3 % 36 +18 Chili___________________ 0.25 % 96 % 4 % 35 +19 Mexique_________________ 0.26 % 96 % 4 % 34 +19 Slovenie________________ 0.26 % 96 % 4 % 33 +21 Slovaquie_______________ 0.29 % 96 % 4 % 32 +23 Inde____________________ 0.32 % 95 % 5 % 31 +24 Irlande_________________ 0.33 % 95 % 5 % 30 +24 Roumanie________________ 0.33 % 95 % 5 % 29 +25 Grece___________________ 0.34 % 94 % 6 % 28 +25 Hong-Kong_______________ 0.34 % 94 % 6 % 27 +27 Afrique_du_Sud__________ 0.37 % 94 % 6 % 26 +31 Russie__________________ 0.43 % 93 % 7 % 25 +32 Japon___________________ 0.44 % 93 % 7 % 24 +33 Nouvelle-Zelande________ 0.45 % 92 % 8 % 23 +34 Portugal________________ 0.47 % 92 % 8 % 22 +37 Hongrie_________________ 0.51 % 92 % 8 % 21 +40 ________________________ 0.55 % 91 % 9 % 20 +51 Finlande________________ 0.70 % 90 % 10 % 19 +52 Norvege_________________ 0.72 % 90 % 10 % 18 +54 Republique_tcheque______ 0.74 % 89 % 11 % 17 +67 Bresil__________________ 0.92 % 88 % 12 % 16 +86 Pologne_________________ 1.18 % 87 % 13 % 15 +96 Danemark________________ 1.32 % 86 % 14 % 14 +115 Suede___________________ 1.58 % 85 % 15 % 13 +117 Belgique________________ 1.61 % 83 % 17 % 12 +155 Espagne_________________ 2.13 % 82 % 18 % 11 +175 Autriche________________ 2.41 % 80 % 20 % 10 +233 Australie_______________ 3.21 % 77 % 23 % 9 +280 Suisse__________________ 3.85 % 74 % 26 % 8 +296 Canada__________________ 4.07 % 70 % 30 % 7 +316 Pays-Bas________________ 4.35 % 66 % 34 % 6 +362 France__________________ 4.98 % 62 % 38 % 5 +445 Italie__________________ 6.12 % 57 % 43 % 4 +654 Royaume-Uni_____________ 9.00 % 51 % 49 % 3 +1427 Allemagne_______________ 19.63 % 42 % 58 % 2 +1594 Etats-Unis______________ 21.93 % 22 % 78 % 1 +TOTAL = 7269 sales 360271 EUR over 98 countries on Fri Jan 3 23:44:21 CET 2020 diff --git a/S/news.shtml b/S/news.shtml index 5e52803..2d49966 100644 --- a/S/news.shtml +++ b/S/news.shtml @@ -39,44 +39,47 @@ next and previous releases (back to menu) @@ -84,11 +87,65 @@ next and previous releases (back to menu)
    • Roadmap: Build a docker image including everything, to have a complete online /X in a single command.
    • +
    • Roadmap: Or better: Include a webserver in imapsync to have an online /X integrated.
    • +
    • Roadmap: Add the sync of multiple accounts inside imapsync itself instead of via an external shell script doing the loop from a csv file.
    +
      +
    • 1.977
    • +
    • Dependencies removed: None.
    • +
    • Dependencies added: Perl modules Encode::IMAPUTF7
    • + +
    • Enhancement: Folders sizes are now presented per folder for host1 and host2, + as well as the differrences between them. + Comparing folders is now easier
    • + +
    • Enhancement: cgidir is . when used by Net::Server::HTTP
    • +
    • Enhancement: Added context in --releasecheck user_agent. CGI or Docker or Standard.
    • + + +
    • Usability: Added ETA at the beginning of a folder process (it is also to improve the /X progress bar accuracy).
    • + +
    • Usability: Added the number of errors and the max number of errors allowed at the final line. + Example: "Exiting with return value 0 (EX_OK: successful termination) 0/50 nb_errors/max_errors"
    • + + +
    • Bug fix: Folders names with + characters must keep their + as they are when prensenting them in uft8 (in folders listings [] = [], right part)
    • +
    • Bug fix: PIDs can be negative under Windows.
    • +
    • Bug fix: --resynclabels was not on with --gmail1 --gmail2
    • +
    • Bug fix: Count a fatal error as a error before presenting the count errors when exiting.
    • + +
    • Bug fix: Docker context. Killing myself in docker context doesn't seem to work well, + as well as sending signals several times. + So just install catch_exit with INT (ctr-c on terminals) + and exits if still alive after killing myself.
    • + +
    • Bug fix: Option --justconnect did not show the line "IP address:"
    • +
    • Bug fix: Reviewed all exit_clean to include a final CR on the error message.
    • +
    • Bug fix: Added SSL_cipher_list => 'DEFAULT:!DH' to tests with ssl.
    • +
    • Bug fix: When using --subfolder2 SUB and --delete2folders, do not delete the folder SUB (even it is not on host1).
    • + +
    • Bug fix: CGI context. charset was charset=ISO-8859-1 in header (CGI.pm default). Now "text/plain; charset=UTF-8"
    • +
    • Bug fix:
    • + + + +
    • Refactoring: Moved main instructions into sub single_sync(). The goal is to prepare multiple different syncs in imapsync.
    • +
    • Refactoring: Cgi context is now set on with env variables SERVER_SOFTWARE and SERVER_PORT (was only SERVER_SOFTWARE). + It is because Net::Server::HTTP does not set SERVER_SOFTWARE but SERVER_PORT. + It is a preparation to a homemade web server to serve on imapsync as a cgi and + get free from Apache or a complicated web server stuff configuration. +
    • + + + +
      -
    • 1.944 (2019/06/25)
    • +
    • 1.945 (2019/06/25)
    • + +
    • Dependency added: Perl modules Text::ParseWords and File::Tail
    • +
    • Enhancement: A new /X including:
    • +
    • Usability: Added the error message text after "Exiting with return value xx". + Example: Exiting with return value 16 (EXIT_AUTHENTICATION_FAILURE)
    • -
    • Usability: Now "imapsync --host1 imap.lamiral.info" or "imapsync --host2 127.0.0.1" is ok and do like a --justconnect on servers. - Useful to check rapidely an imap server. +
    • Usability: Now "imapsync --host1 imap.lamiral.info" or "imapsync --host2 127.0.0.1" or both do like a --justconnect on servers. + Useful to check rapidely an imap server. Caveat: no longer a command line error.
    • Usability: Added some error message texts explaining the exit numbers. Example: "Exiting with return value 16 (EXIT_AUTHENTICATION_FAILURE)"
    • @@ -192,9 +251,6 @@ next and previous releases
      (back to menu)
    • Portability: Upgraded Mac binary to handle TLSv1.2
    • -
    • Dependency added: Perl modules Text::ParseWords and File::Tail - -
    • Roadmap: Will add --subfolder1 and --subfolder2 parameters to /X in order to make backup/restore syncs.
    • @@ -821,7 +877,7 @@ by ignoring PERMANENTFLAGS (Exchange tests) This document last modified on -($Id: news.shtml,v 1.67 2019/06/25 21:33:09 gilles Exp gilles $)
      +($Id: news.shtml,v 1.74 2020/01/01 21:07:13 gilles Exp gilles $)
      Top of the page

      diff --git a/S/paypal.shtml_ b/S/paypal.shtml_ new file mode 120000 index 0000000..41a3cac --- /dev/null +++ b/S/paypal.shtml_ @@ -0,0 +1 @@ +donate.shtml \ No newline at end of file diff --git a/S/privacy_policy.shtml b/S/privacy_policy.shtml new file mode 100644 index 0000000..a65d26f --- /dev/null +++ b/S/privacy_policy.shtml @@ -0,0 +1,341 @@ + + + + + + +Imapsync Privacy Policy + + + + + + + + + + + + + + + + + + + +
      + + +

      +Privacy Policy +(back to menu) +

      + + +

      Effective date: November 1, 2010

      + + +

      +Gilles LAMIRAL (I) operates the + +Imapsync Online Service (the "Service"). +

      + +

      +This page informs you of our policies regarding the collection, use, +and disclosure of personal data when you use our Service +and the choices you have associated with that data. + +

      + +

      +We use your data to provide and improve the Service. +By using the Service, you agree to the collection +and use of information in accordance with this policy. + +Unless otherwise defined in this Privacy Policy, +terms used in this Privacy Policy have the same meanings +as in our Terms and Conditions, +accessible from https://imapsync.lamiral.info

      + + +

      Information Collection And Use

      + +

      We collect several different types of information +for various purposes to provide and improve our Service to you.

      + +

      Types of Data Collected

      + +

      Personal Data

      + +

      While using our Service, we may ask you to provide us with +certain personally identifiable information that can be used to +contact or identify you ("Personal Data"). +Personally identifiable information may include, but is not limited to:

      + +
        +
      • Email address
      • +
      • Cookies and Usage Data
      • +
      + +

      Usage Data

      + +

      +We may also collect information how the Service is +accessed and used ("Usage Data"). +This Usage Data may include information such as your +computer's Internet Protocol address (e.g. IP address), +browser type, browser version, +the pages of our Service that you visit, the time and date of your visit, +the time spent on those pages, unique device identifiers +and other diagnostic data.

      + +

      Tracking & Cookies Data

      + +

      +We use cookies and similar tracking technologies to track the activity +on our Service and hold certain information. +

      + +

      +Cookies are files with small amount of data which may include an +anonymous unique identifier. +Cookies are sent to your browser from a website and stored on your device. +Tracking technologies also used are beacons, tags, and scripts to collect +and track information and to improve and analyze our Service. +

      + +

      +You can instruct your browser to refuse all cookies or to indicate +when a cookie is being sent. +If you do not accept cookies, it should be ok to use our Service. +

      + +

      Examples of Cookies we use:

      +
        +
      • Session Cookies. We use Session Cookies to operate our Service.
      • +
      • Preference Cookies. We use Preference Cookies to remember your preferences and various settings.
      • +
      • Security Cookies. We use Security Cookies for security purposes.
      • +
      + +

      Use of Data

      + +

      imapsync uses the collected data for various purposes: +

      +
        +
      • To provide and maintain the Service
      • +
      • To notify you about changes to our Service
      • +
      • To allow you to participate in interactive features of our Service when you choose to do so
      • +
      • To provide customer care and support
      • +
      • To provide analysis or valuable information so that we can improve the Service
      • +
      • To monitor the usage of the Service
      • +
      • To detect, prevent and address technical issues
      • +
      + +

      Transfer Of Data

      + +

      +Your information, including Personal Data, may be transferred to +— and maintained on — computers located outside of your state, +province, country or other governmental jurisdiction where the +data protection laws may differ than those from your jurisdiction. +

      + +

      +If you are located outside France and choose to provide information to us, +please note that we transfer the data, including Personal Data, +to France and process it there. +

      + +

      +Your consent to this Privacy Policy followed by your submission of +such information represents your agreement to that transfer. +

      + +

      +imapsync will take all steps reasonably necessary to ensure that your +data is treated securely and in accordance with this Privacy Policy and +no transfer of your Personal Data will take place to an organization or +a country unless there are adequate controls in place including the +security of your data and other personal information. +

      + +

      Disclosure Of Data

      + +

      Legal Requirements

      + +

      imapsync may disclose your Personal Data in the +good faith belief that such action is necessary to: +

      + +
        +
      • To comply with a legal obligation
      • + +
      • To protect and defend the rights or property of imapsync
      • + +
      • + To prevent or investigate possible wrongdoing in + connection with the Service +
      • + +
      • + To protect the personal safety of users of + the Service or the public +
      • + +
      • To protect against legal liability
      • +
      + +

      Security Of Data

      + +

      The security of your data is important to us, but remember that +no method of transmission over the Internet, +or method of electronic storage is 100% secure. + +While we strive to use commercially acceptable means +to protect your Personal Data, we cannot guarantee +its absolute security. +

      + +

      Service Providers

      + +

      We may employ third party companies and individuals +to facilitate our Service ("Service Providers"), +to provide the Service on our behalf, +to perform Service-related services +or to assist us in analyzing how our Service is used. +

      + +

      +These third parties have access to your Personal Data only +to perform these tasks on our behalf and are obligated +not to disclose or use it for any other purpose. +

      + + + +

      Links To Other Sites

      + +

      +Our Service may contain links to other sites that are not operated by us. +If you click on a third party link, you will be directed to +that third party's site. +We strongly advise you to review the Privacy Policy of every site you visit. +

      + +

      +We have no control over and assume no responsibility for the content, +privacy policies or practices of any third party sites or services. +

      + + +

      Children's Privacy

      + +

      Our Service does not address anyone under the age of 18 ("Children"). +

      + +

      +We do not knowingly collect personally identifiable information +from anyone under the age of 18. +If you are a parent or guardian and you are aware +that your Children has provided us with Personal Data, +please contact us. + +If we become aware that we have collected Personal Data +from children without verification of parental consent, +we take steps to remove that information from our servers. +

      + + +

      Changes To This Privacy Policy

      + +

      +We may update our Privacy Policy from time to time. +We will notify you of any changes by posting the +new Privacy Policy on this page. +

      + + +

      +We will let you know via email and/or a prominent notice +on our Service, prior to the change becoming effective and +update the "effective date" at the top of this Privacy Policy. +

      + +

      +You are advised to review this Privacy Policy periodically +for any changes. +Changes to this Privacy Policy are effective when +they are posted on this page. +

      + + +

      Contact Us

      + +

      If you have any questions about this Privacy Policy, please contact us: +

      + +
        +
      • By email: gilles@lamiral.info
      • + +
      • By visiting this page on our website: + https://imapsync.lamiral.info + +
      • + +
      • By phone number: +33619220354
      • + +
      • By mail: Gilles LAMIRAL, 22 La Billais, 35580 Baulon, France
      • +
      + + +

      +Our Privacy Policy for imapsync was created with the help of the + +Free Privacy Policy Generator. +

      + + +
      + +
      +
      + + + Valid HTML5 + + + + CSS Valide ! + + + + + + +
      +

      + + +This document was last modified on +($Id: privacy_policy.shtml,v 1.3 2019/12/23 15:57:00 gilles Exp gilles $)
      +Top of the page +

      +
      + + + diff --git a/S/terms_and_conditions.shtml b/S/terms_and_conditions.shtml new file mode 100644 index 0000000..9f68f52 --- /dev/null +++ b/S/terms_and_conditions.shtml @@ -0,0 +1,409 @@ + + + + + + +Imapsync Terms and Conditions + + + + + + + + + + + + + + + + + + + +
      + + +

      Imapsync Terms and Conditions +(back to menu) +

      + + +

      Please read these terms and conditions carefully before using Our Service. +

      + +

      Interpretation and Definitions

      + +

      Interpretation

      + +

      +The words of which the initial letter is capitalized +have meanings defined under the following conditions. +

      + +

      +The following definitions shall have the same meaning +regardless of whether they appear in singular or in plural. +

      + +

      Definitions

      + +

      For the purposes of these Terms and Conditions: +

      + +
        +
      • Affiliate means an entity that controls, + is controlled by or is under common control with a party, + where "control" means ownership of 50% or more of the shares, + equity interest or other securities entitled to vote for election + of directors or other managing authority. +
      • + +
      • Company (referred to as either "the Company", + "We", "Us" or "Our" in this Agreement) refers to Gilles LAMIRAL. +
      • + +
      • Country refers to: France
      • + +
      • Service refers to the Website.
      • + +
      • Terms and Conditions (also referred as "Terms") + mean these Terms and Conditions that form the entire agreement + between You and the Company regarding the use of the Service. +
      • + +
      • Third-party Social Media Service means + any services or content + (including data, information, products or services) + provided by a third-party that may be displayed, + included or made available by the Service. +
      • + +
      • Website refers to Imapsync, + accessible from https://imapsync.lamiral.info +
      • + +
      • You means the individual + accessing or using the Service, or the company, + or other legal entity on behalf of which + such individual is accessing or using the Service, + as applicable.
      • +
      + +

      Acknowledgement

      + +

      +These are the Terms and Conditions governing the use of this Service +and the agreement that operates between You and the Company. +These Terms and Conditions set out the rights and obligations +of all users regarding the use of the Service. +

      + +

      Your access to and use of the Service is conditioned on +Your acceptance of and compliance with these Terms and Conditions. +These Terms and Conditions apply to all visitors, +users and others who access or use the Service. +

      + +

      +By accessing or using the Service +You agree to be bound by these Terms and Conditions. +If You disagree with any part of these Terms and Conditions then +You may not access the Service. +

      + +

      +Your access to and use of the Service is also conditioned on Your +acceptance of and compliance with the Privacy Policy of the Company. +Our Privacy Policy describes Our policies and procedures on the collection, +use and disclosure of Your personal information when You +use the Application or the Website and tells You +about Your privacy rights and how the law protects You. +Please read Our Privacy Policy +carefully before using Our Service. +

      + + + +

      Links to Other Websites

      + +

      +Our Service may contain links to third-party web sites or services +that are not owned or controlled by the Company. +

      + +

      +The Company has no control over, and assumes no responsibility for, +the content, privacy policies, or practices of any third +party web sites or services. +You further acknowledge and agree that the Company shall not +be responsible or liable, directly or indirectly, +for any damage or loss caused or alleged to be caused by or +in connection with the use of or reliance on any such content, +goods or services available on or through any such web sites or services. +

      + +

      +We strongly advise You to read the terms and conditions and +privacy policies of any third-party web sites or services that You visit. +

      + +

      Termination

      + +

      +We may terminate or suspend Your access immediately, +without prior notice or liability, +for any reason whatsoever, +including without limitation if You breach these Terms and Conditions. +

      + +

      +Upon termination, Your right to use the Service will cease immediately. +

      + +

      Limitation of Liability

      + +

      +Notwithstanding any damages that You might incur, +the entire liability of the Company and any of its suppliers under +any provision of this Terms and Your exclusive remedy for all of +the foregoing shall be limited to the amount actually paid by You through +the Service or nothing if You haven't purchased anything through the Service. +

      + +

      +To the maximum extent permitted by applicable law, +in no event shall the Company or its suppliers be liable for any +special, incidental, indirect, or consequential +damages whatsoever (including, but not limited to, +damages for loss of profits, loss of data or other information, +for business interruption, for personal injury, +loss of privacy arising out of or in any way related +to the use of or inability to use the Service, +third-party software and/or third-party hardware used with +the Service, or otherwise in connection with any +provision of this Terms), even if the Company or any supplier has been +advised of the possibility of such damages and +even if the remedy fails of its essential purpose. +

      + +

      +Some states do not allow the exclusion of implied warranties or +limitation of liability for incidental or consequential damages, which +means that some of the above limitations may not apply. +In these states, each party's liability will be limited to +the greatest extent permitted by law. +

      + +

      "AS IS" and "AS AVAILABLE" Disclaimer

      + +

      The Service is provided to You "AS IS" and "AS AVAILABLE" and with +all faults and defects without warranty of any kind. +To the maximum extent permitted under applicable law, the Company, on its +own behalf and on behalf of its Affiliates and its and their +respective licensors and service providers, expressly disclaims +all warranties, whether express, implied, statutory or otherwise, +with respect to the Service, including all implied warranties of +merchantability, fitness for a particular purpose, title and +non-infringement, and warranties that may arise out of course of +dealing, course of performance, usage or trade practice. + +Without limitation to the foregoing, the Company provides no +warranty or undertaking, and makes no representation of any +kind that the Service will meet Your requirements, achieve any +intended results, be compatible or work with any other +software, applications, systems or services, operate without +interruption, meet any performance or reliability standards or +be error free or that any errors or defects can or will be corrected. +

      + +

      +Without limiting the foregoing, neither the Company nor any of +the company's provider makes any representation or warranty of any +kind, express or implied: +(i) as to the operation or availability of the Service, +or the information, content, and materials +or products included thereon; +(ii) that the Service will be uninterrupted or error-free; +(iii) as to the accuracy, reliability, or currency of any information or +content provided through the Service; or +(iv) that the Service, its servers, the content, or e-mails sent from or +on behalf of the Company are free of viruses, scripts, trojan horses, +worms, malware, timebombs or other harmful components. +

      + +

      +Some jurisdictions do not allow the exclusion of certain types of +warranties or limitations on applicable statutory rights of +a consumer, so some or all of the above exclusions and +limitations may not apply to You. +But in such a case the exclusions and limitations set forth in +this section shall be applied to the greatest extent enforceable +under applicable law. +

      + +

      Governing Law

      + +

      +The laws of the Country, excluding its conflicts of law rules, shall +govern this Terms and Your use of the Service. +Your use of the Application may also be subject to other +local, state, national, or international laws. +

      + +

      Disputes Resolution

      + +

      +If You have any concern or dispute about the Service, You +agree to first try to resolve the dispute informally by +contacting the Company. +

      + + +

      For European Union (EU) Users

      + +

      +If You are a European Union consumer, you will benefit from +any mandatory provisions of the law of the country in which you +are resident in. +

      + + +

      United States Legal Compliance

      + +

      +You represent and warrant that +(i) You are not located in a country that is subject to the +United States government embargo, or that has been designated by +the United States government as a “terrorist supporting” country, and +(ii) You are not listed on any United States government list of +prohibited or restricted parties. +

      + +

      Severability and Waiver

      + +

      Severability

      + +

      +If any provision of these Terms is held to be unenforceable or invalid, +such provision will be changed and interpreted to accomplish the +objectives of such provision to the greatest extent possible under +applicable law and the remaining provisions will continue in full +force and effect. +

      + +

      Waiver

      + +

      +Except as provided herein, the failure to exercise a right or +to require performance of an obligation under this Terms shall not +effect a party's ability to exercise such right or require such +performance at any time thereafter nor shall be the waiver of +a breach constitute a waiver of any subsequent breach. +

      + + +

      Translation Interpretation

      + +

      +These Terms and Conditions may have been translated +if We have made them available to You on our Service. +

      + +

      +You agree that the original English text shall prevail +in the case of a dispute. +

      + +

      Changes to These Terms and Conditions

      + +

      +We reserve the right, at Our sole discretion, +to modify or replace these Terms at any time. +If a revision is material We will make reasonable efforts +to provide at least 30 days' notice prior to any new terms taking effect. +What constitutes a material change will be determined at Our sole discretion. +

      + +

      +By continuing to access or use Our Service +after those revisions become effective, +You agree to be bound by the revised terms. +If You do not agree to the new terms, +in whole or in part, +please stop using the website and the Service. +

      + + +

      Contact Us

      + +

      +If you have any questions about these Terms and Conditions, +You can contact us: +

      + +
        +
      • By email: gilles@lamiral.info
      • + +
      • By visiting this page on our website: + https://imapsync.lamiral.info +
      • + +
      • By phone number: +33619220354
      • + +
      • By mail: Gilles LAMIRAL, 22 La Billais, 35580 Baulon, France
      • +
      + +

      +Our Terms and Conditions agreement was created with the help of the + +Free Terms and Conditions Generator +. +

      + + +
      + +
      +
      + + + Valid HTML5 + + + + CSS Valide ! + + + + + + +
      +

      + + +This document was last modified on +($Id: terms_and_conditions.shtml,v 1.2 2019/12/23 15:57:00 gilles Exp gilles $)
      +Top of the page +

      +
      + + + diff --git a/S/testimonial.shtml b/S/testimonial.shtml index 4c3d623..6276e50 100644 --- a/S/testimonial.shtml +++ b/S/testimonial.shtml @@ -42,6 +42,19 @@ I'm not sure I deserve such great quotes for my work on Imapsync, anyway here th

      + +
      + + +

      + +
      + + +
      +
      + +

      + +
    @@ -64,28 +66,34 @@ imapsync logo -

    Welcome to the imapsync web site!

    +

    Time to copy all your emails and folders elsewhere!

    - + - -

    Is it time to copy all your emails and folders elsewhere?

    -Site last updated on +Site last updated on
    +Why this website looks so old fashion? +

    What is imapsync? (back to menu)

    +

    +
    +Imapsync presentation by Gilles +

    + +

    Imapsync is an IMAP transfers tool. The purpose of imapsync is to migrate IMAP accounts or to backup IMAP accounts. -IMAP is one of the three current standard protocols to access mailboxes, +IMAP is one of the three current standard protocols used to access mailboxes, the two other are POP3 and HTTP with webmails, webmails are often tied to an IMAP server.

    @@ -106,7 +114,7 @@ and restart it later efficiently, without generating duplicates. "Command line" means it's not a graphical tool, on Windows you have to run imapsync from a batch file. Anyway there is a visual online service, -you can try imapsync at https://i005.lamiral.info/X/ +you can try imapsync online at https://i005.lamiral.info/X/

    @@ -114,7 +122,8 @@ you can try imapsync at https://i005.lam Most email systems don't set or get Contacts or Calendars via the IMAP protocol. No way via IMAP, no way via imapsync but it can be done with other tools or via export/import of csv or ics files. -Also consider using caldavsynchronizer or asking experts at Sumatra company. +Also consider using caldavsynchronizer +or asking experts at Sumatra company.

    @@ -163,7 +172,8 @@ See detailed explanation and motivation here when LAMIRAL -

    +
    @@ -204,45 +214,75 @@ See detailed explanation and motivation here when

    Buy imapsync and support (back to menu)

    + + +

    + Read some other nice and true testimonials from users.
    +

    +

    - Buy complete and latest imapsync for €60 EUR.
    There is no trial version but I offer 30-day money back guarantee whatever the reason for a refund. Or drop me a gentle email and I will provide you the latest imapsync because, well, you made the effort to contact me.
    - After buying and downloading imapsync, go to the installation documentation. + After downloading imapsync, go to the installation documentation.

    +

    + +Special offer: it's only €120 EUR if you buy +imapsync + support at once + (instead of 60 + 120 = 180 EUR). +

    -

    For €60 EUR you will get: +

    For €120 EUR you will get:

      +
    • Imapsync full professional support (that costs also €120 EUR by itself, see why below).
    • +
    • Standalone imapsync.exe for win32, easy installation done by a zip extraction anywhere. See README_Windows.txt for details.
    • -
    • Standalone imapsync_bin_Darwin for Mac OS X.
    • -
    • Imapsync Perl source code for any operating system, Unix, Windows, OS X.
    • -
    • The online visual interface, like /X, to install the service on a Linux server (not working on Windows yet).
    • -
    • Lifetime of imapsync updates without extra payment.
    • -
    • 30-day money back guarantee! No question nor condition to get a refund, really, just request it and you'll sure get a refund!
    • -
    • No limit to do anything with imapsync and its license.
    • + +
    • Standalone imapsync_bin_Darwin for Mac OS X. (not Catalina ready because of the new signature mechanism)
    • +
    • Imapsync Perl source code for any operating system, Unix, Windows, OS X.
    • + +
    • The online visual interface, like /X, + to install the service on a Linux server (not working on Windows yet).
    • + +
    • Lifetime of imapsync updates without extra payment.
    • + +
    • 30-day money back guarantee! No question nor condition to get a refund, really, just request it and you'll sure get a refund!
    • + +
    • No limit to do anything with imapsync and its license.
    +

    For €60 EUR you will get all the above except imapsync full professional support (the first line). +

    +

    -For €60 EUR independently, you get imapsync full professional support, +For €120 EUR independently, you get imapsync full professional support, provided by the imapsync designer and developer, Gilles LAMIRAL, your servitor, who has been supporting imap migrations with imapsync for more than 18 years (I started in 2001). See a detailed support description below.

    - -Special offer: it's only €100 EUR if you buy -imapsync + support at once - (instead of 60 + 60 = 120 EUR). +You may wonder why the support alone is the same price as imapsync+support? it's +because when you buy both at once, I'm not sure I will have to spend some time +directly with you, it's possible that everything will go smoothly for you; +but when you buy the support alone, after buying the software, +then I will surely spend time (any amount of hours) to help you. +Does it seem fair enough?

    +

    @@ -251,9 +291,9 @@ See a detailed support description below. it is for accounting and customs declaration.
    -VAT is often 2 letters followed by 11 digits, for example mine is FR74429303332.
    +VAT is often 2 letters followed by several digits, for example mine is FR74429303332.
    Crypto payment
    .

    -At the end of the payment Paypal will proposed you to go back to the site, +Instantly at the end of the payment, Paypal will proposed you to go back to the site, via a link to gilles@lamiral.info (it's my paypal account name), this link brings you to imapsync download.
    You will also receive an email from gilles@lamiral.info a few minutes later -(can fall in the Spam folder sometimes).
    +(it can fall in the Spam folder sometimes).
    In order to get an accurate invoice, please make sure the delivery postal address you enter in Paypal suits your accounting department, since revised editing is not easy.
    Your invoice will be sent within a few days by email. My company is identified by VAT number FR74429303332 or French SIRET number 42930333200051, -French APE/NAF number 6201Z (programmation informatique, aka, computer programming). +French APE/NAF number 6201Z ("programmation informatique" in French, aka, computer programming).

    Support (back to menu) @@ -300,11 +340,12 @@ French APE/NAF number 6201Z (programmation informatique, aka, computer programmi

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

      -
    • Email address: gilles@lamiral.info.
    • -
    • Desk phone number: +33 9 51 84 42 42 located in France.
    • +
    • Email address: gilles@lamiral.info.
    • +
    • Desk phone number: +33 9 51 84 42 42 located in France.
    • Mobile phone number: +33 6 19 22 03 54 located in France (SFR operator).
    • -

      Refund for a bank transfer is far less easy than with Paypal so drop me an email to test imapsync and to be sure it will do what you need it to do, before any payment.
      The bank account references will be given upon request.

      +

      +It will surely add extra work editing manually the invoice, back and forth getting good coordinates, +so I will charge both software and support normal prices for a payment via bank transfer, +that is 120 EUR. +

      Payment with crypto currencies, Bitcoins, Ethereum etc. (back to menu) @@ -373,33 +416,54 @@ The bank account references will be given upon request.

        -
      • 6000 to 7000 users per month (45000 users a year).
      • -
      • 7 to 12 millions mailboxes transfers per month.
      • -
      • 108 millions transfers for 2018, -that is more than three whole mailboxes synced per second in average, -and an estimation of 38 Petabytes ( 1 PiB = 2^50 bytes = 1024^5 ~ 10^15) transferred in total, -taking a mean of 400 Mbytes per mailbox (a mean given by online /X stats). +
      • 6000 to 7000 users per month (48000 users a year).
      • +
      • 11 to 16 millions mailboxes transfers per month.
      • +
      • 159 millions transfers for 2019, +that is five whole mailboxes complitely synced per second in average (159*10^6/365/24/3600), +and an estimation of 71 Petabytes ( 1 PiB = 2^50 bytes = 1024^5 ~ 10^15) transferred in total in 2019, +taking a mean of 500 Mbytes per transfer (an estimated mean given by online /X real stats). +71 Petabytes = 500*10^6*159*10^6. The global internet traffic of 2019 was 2004 Exabytes so imapsync +is a very very tiny thing (35 per million). +
      • +
      • +159 millions transfers for 2019. +That's nearly 717 millions email messages transferred by imapsync every day (1600*164/366) +taking a mean of 1600 messages per transfer (an estimated mean given by online /X real stats). + +The internet global estimated number of messages sent every day is 300 billions in 2019 +(10% being non-spam but that's another story...). +So imapsync does 0.24% of all email trafic, not that bad for a command line tool!
      • -
      • Operating systems run by imapsync users (in 2018): +
      • Operating systems run by imapsync users (in 2019):
          -
        • Linux: 70%
        • -
        • Win32: 17%
        • -
        • Darwin: 12%
        • -
        • FreeBSD: 1%
        • -
        • Solaris: 0.04%
        • -
        • OpenBSD: 0.04%
        • -
        • Other: 0.01%
        • - +
        • Linux: 68%
        • +
        • Win32: 18%
        • +
        • Darwin: 13%
        • +
        • FreeBSD: 0.92%
        • +
        • OpenBSD: 0.05%
        • +
        • Solaris: 0.03%
        • +
        • Cygwin: 0%
        • +
        • Unknown: 0%
        • +
        • Other: 0%
      • Highest use rate: about 56 millions of IMAP mailbox transfers by just one host.
      • Biggest known account migrated: 2.4 millions folders (figure independently reported).
      • +
      +

      +The figures presented here do not include the github imapsync release usage. +It's because --noreleasecheck is on by default since release 1.592 (2014/05/22) +in the github release. + +Looking at the numbers before and after 2014, the figures showed here +could be doubled. +

      @@ -416,7 +480,7 @@ Via the User-agent parameter it also sends:

      You can remove this behavior by adding option --noreleasecheck on the command line (or by setting $releasecheck = 0 in the source code). -Check CVE-2013-4279. +Check CVE-2013-4279.

      @@ -481,7 +545,19 @@ All example scripts can be found in the examples/* dire

      Installation (back to menu)

      -

      Depending on the system where you'll run imapsync:

      +

      +Hardware system requirements: +

      +
        +
      • 500 MB of RAM is ok. The mean value RAM used per imapsync process is 230 MB.
      • +
      • Any CPU is ok.
      • +
      • 100 MB of disk space is far enough.
      • +
      • Any network link is ok. The average bandwidth rate is 345 KiB/s ~ 2.8 Mbps.
      • +
      + + +

      Depending on the system where you'll run imapsync:

      +

    @@ -587,6 +665,9 @@ to understand imapsync and succeed in your migration or backup.
  • Emptying an account.
  • XOAUTH2 (Gmail).
  • Online Visual Inferface (the web GUI /X).
  • +
  • Principles and design ideas.
  • +
  • GDPR (General Data Protection Regulation).
  • +
  • Using Docker.
  • @@ -604,7 +685,7 @@ lists what may be coded or done in the future.

    What you're allowed to do with imapsync is "No limits to do anything with this work and this license." -like repeated in the LICENSE file (the detour is worth it). +like written in the https://imapsync.lamiral.info/LICENSE file (the detour is worth it).

    @@ -638,7 +719,7 @@ like repeated in the LICENSE file (the detour is worth it This document last modified on -($Id: index.shtml,v 1.419 2019/06/26 22:25:17 gilles Exp gilles $)
    +($Id: index.shtml,v 1.443 2020/01/02 23:37:20 gilles Exp gilles $)
    Top of the page

    diff --git a/tests.sh b/tests.sh index e096172..b2b0309 100644 --- a/tests.sh +++ b/tests.sh @@ -1,6 +1,6 @@ #!/bin/sh -# $Id: tests.sh,v 1.340 2019/06/26 22:21:30 gilles Exp gilles $ +# $Id: tests.sh,v 1.353 2020/01/02 23:48:18 gilles Exp gilles $ # general tests start # general tests end @@ -147,9 +147,21 @@ sendtestmessage() { eval "$cmd" } +sendtestmessage_titi() { + email=${1:-"titi"} + rand=${2:-"`pwgen 16 1`"} + mess='test: '"$rand" + cmd="echo $mess""| mail -s '""$mess""' $email" + echo $cmd + eval "$cmd" +} + can_send() { + + # no send at all return 1 + test X`hostname` = X"petite" && return 0; test X`hostname` = X"plume" && return 0; test X`hostname` = X"vadrouille" && return 0; @@ -304,11 +316,12 @@ ll_justhost2() } - +# In mandatory_tests testslive() { $CMD_PERL ./imapsync --testslive } +# In mandatory_tests testslive6() { $CMD_PERL ./imapsync --testslive6 } @@ -349,6 +362,17 @@ ll_INBOX() { --folder INBOX } +ll_skipcrossduplicates() { + $CMD_PERL ./imapsync \ + --host1 $HOST1 --user1 tata \ + --passfile1 ../../var/pass/secret.tata \ + --host2 $HOST2 --user2 titi \ + --passfile2 ../../var/pass/secret.titi \ + --skipcrossduplicates --debugcrossduplicates +} + + + ll_append_debugimap() { sendtestmessage $CMD_PERL ./imapsync \ @@ -422,6 +446,7 @@ kk_simulong() { --testslive --simulong 30 } +# In mandatory_tests ll_sigreconnect_INT() { ( $CMD_PERL ./imapsync \ --host1 $HOST1 --user1 tata \ @@ -433,13 +458,13 @@ ll_sigreconnect_INT() { echo status code when killing itself: $? # status code when killing itself? ) & echo ; sleep 2; echo ; - kill -INT `cat /tmp/imapsync_tests_ll_sigreconnect_INT.pid` + kill -INT `head -1 /tmp/imapsync_tests_ll_sigreconnect_INT.pid` echo ; sleep 3; echo ; - kill -INT `cat /tmp/imapsync_tests_ll_sigreconnect_INT.pid` + kill -INT `head -1 /tmp/imapsync_tests_ll_sigreconnect_INT.pid` echo ; sleep 3; echo ; - kill -INT `cat /tmp/imapsync_tests_ll_sigreconnect_INT.pid` + kill -INT `head -1 /tmp/imapsync_tests_ll_sigreconnect_INT.pid` sleepenh 0.1 - kill -INT `cat /tmp/imapsync_tests_ll_sigreconnect_INT.pid` + kill -INT `head -1 /tmp/imapsync_tests_ll_sigreconnect_INT.pid` wait } @@ -479,8 +504,10 @@ ll_sigignore_TERM() { --sigignore 'TERM' --simulong 10 } +# ABORT tests -ll_abort_nopidfile() { +# In mandatory_tests +ll_abort_pidfile_no_exist() { $CMD_PERL ./imapsync \ --host1 $HOST1 --user1 tata \ --passfile1 ../../var/pass/secret.tata \ @@ -490,17 +517,19 @@ ll_abort_nopidfile() { | grep 'Can not read pidfile /noexist. Exiting.' } +# In mandatory_tests ll_abort_noprocess() { - echo 999999 > /tmp/imapsync_fake.pid + echo 999999 > /tmp/imapsync_fake.pid $CMD_PERL ./imapsync \ --host1 $HOST1 --user1 tata \ --passfile1 ../../var/pass/secret.tata \ --host2 $HOST2 --user2 titi \ --passfile2 ../../var/pass/secret.titi \ - --abort --pidfile /tmp/imapsync_fake.pid \ - | grep 'Can not send signal to PID 999999. Exiting.' + --abort --pidfile /tmp/imapsync_fake.pid \ + | grep 'Can not send signal kill ZERO to PID 999999.' } +# In mandatory_tests ll_abort() { # send QUIT signal rm -f LOG_imapsync/imapsync_abortme.log $CMD_PERL ./imapsync \ @@ -518,13 +547,19 @@ ll_abort() { # send QUIT signal --passfile1 ../../var/pass/secret.tata \ --host2 $HOST2 --user2 titi \ --passfile2 ../../var/pass/secret.titi \ - --abort --pidfile /tmp/imapsync_abortme.pid --tail \ - | egrep 'Process PID .* ended. Exiting.' || return 1 + --abort --pidfile /tmp/imapsync_abortme.pid \ + --logfile imapsync_aborter.log \ + | egrep 'Process PID .* ended.' \ + || { echo 'Look into LOG_imapsync/imapsync_aborter.log' ; return 1 ; } + grep 'Killing myself with signal QUIT' LOG_imapsync/imapsync_abortme.log } -ll_abort_cgi_context() { + + +# In mandatory_tests +ll_abort_cgi_context_tail() { rm -f LOG_imapsync/imapsync_abortme.log $CMD_PERL ./imapsync \ --host1 $HOST1 --user1 tata \ @@ -542,12 +577,43 @@ ll_abort_cgi_context() { --host2 $HOST2 --user2 titi \ --passfile2 ../../var/pass/secret.titi \ --abort --pidfile /tmp/imapsync_abortme_cgi_context.pid --pidfilelocking --tail \ - | egrep 'Process PID .* ended. Exiting.' || return 1 + | egrep 'Process PID .* ended.' || return 1 grep 'Killing myself with signal QUIT' LOG_imapsync/imapsync_abortme_cgi_context.log } +# In mandatory_tests +ll_abort_no_pidfile_option() { + rm -f LOG_imapsync/imapsync_abortme.log + $CMD_PERL ./imapsync \ + --host1 $HOST1 --user1 tata \ + --passfile1 ../../var/pass/secret.tata \ + --host2 $HOST2 --user2 titi \ + --passfile2 ../../var/pass/secret.titi \ + --logfile imapsync_abortme_no_pidfile_option.log --simulong 4 & + + sleep 2 + $CMD_PERL ./imapsync \ + --host1 $HOST1 --user1 tata \ + --passfile1 ../../var/pass/secret.tata \ + --host2 $HOST2 --user2 titi \ + --passfile2 ../../var/pass/secret.titi \ + --abort \ + | egrep 'Process PID .* ended.' || return 1 + + grep 'Killing myself with signal QUIT' LOG_imapsync/imapsync_abortme_no_pidfile_option.log +} + + +abort_tests() +{ + ll_abort_pidfile_no_exist \ + && ll_abort_noprocess \ + && ll_abort \ + && ll_abort_cgi_context_tail \ + && ll_abort_no_pidfile_option +} ll_nouid1() { can_send && sendtestmessage @@ -556,7 +622,7 @@ ll_nouid1() { --passfile1 ../../var/pass/secret.tata \ --host2 $HOST2 --user2 titi \ --passfile2 ../../var/pass/secret.titi \ - --nouid1 --folder INBOX --debugimap1 + --nouid1 --folder INBOX # --debugimap1 } @@ -607,13 +673,14 @@ ll_errors() { #--pipemess 'grep lalalala' --nopipemesscheck --dry --debugcontent --debugflags } -ll_debug() { +ll_debug() +{ $CMD_PERL ./imapsync \ - --host1 $HOST1 --user1 tata \ - --passfile1 ../../var/pass/secret.tata \ - --host2 $HOST2 --user2 titi \ - --passfile2 ../../var/pass/secret.titi \ - --debug --nofoldersizes + --host1 $HOST1 --user1 tata \ + --passfile1 ../../var/pass/secret.tata \ + --host2 $HOST2 --user2 titi \ + --passfile2 ../../var/pass/secret.titi \ + --debug } ll_debugcontent() { @@ -637,6 +704,17 @@ ll_debugmemory() { --debugmemory --nofoldersizes --folder INBOX } +ll_justfolderlists() +{ + $CMD_PERL ./imapsync \ + --host1 $HOST1 --user1 tata \ + --passfile1 ../../var/pass/secret.tata \ + --host2 $HOST2 --user2 titi \ + --passfile2 ../../var/pass/secret.titi \ + --checkselectable --justfolderlists +} + + ll_checkselectable() { $CMD_PERL ./imapsync \ @@ -666,11 +744,11 @@ ll_checkfoldersexist() --passfile1 ../../var/pass/secret.tata \ --host2 $HOST2 --user2 titi \ --passfile2 ../../var/pass/secret.titi \ - --checkfoldersexist --debugimap1 --justfolderlists \ - | grep -i 'checking wanted folders exist' + --checkfoldersexist --debug --justfolderlists \ + | grep -i 'checking' } -ll_nocheckfoldersexist() +ll_nocheckfoldersexist() { $CMD_PERL ./imapsync \ --host1 $HOST1 --user1 tata \ @@ -682,7 +760,10 @@ ll_nocheckfoldersexist() } -ll_nofoldersizes() + + + +ll_nofoldersizes() { $CMD_PERL ./imapsync \ --host1 $HOST1 --user1 tata \ @@ -718,7 +799,7 @@ pidfile_bad() { test "$?" = "$EXIT_PID_FILE_ERROR" } -tail() { +test_tail() { $CMD_PERL ./imapsync \ --justbanner --simulong 15 \ --pidfile /var/tmp/imapsync_tail_tests.pid \ @@ -964,6 +1045,7 @@ ksks_init_test1() --folder INBOX.init --f1f2 INBOX.init=INBOX } +# In mandatory_tests ksks_reset_test1() { ksks_empty_test1 @@ -1005,7 +1087,9 @@ ll_folder_mixfolders() { # Way to check it each time: # sh -x tests.sh ll_folder_create ll_delete2folders -ll_folder_create() { + +# In mandatory_tests +ll_folder_create() { $CMD_PERL ./imapsync \ --host1 $HOST1 --user1 tata \ --passfile1 ../../var/pass/secret.tata \ @@ -1015,6 +1099,7 @@ ll_folder_create() { --justfolders } +# In mandatory_tests ll_folder_create_INBOX_Inbox() { $CMD_PERL ./imapsync \ --host1 $HOST1 --user1 tata \ @@ -1060,6 +1145,7 @@ ll_folder_domino_sub() { --justfolders --dry --debug } +# In mandatory_tests ll_domino2() { $CMD_PERL ./imapsync \ --host1 $HOST1 --user1 tata \ @@ -1073,6 +1159,7 @@ ll_domino2() { } +# In mandatory_tests ll_domino1_domino2() { $CMD_PERL ./imapsync \ --host1 $HOST1 --user1 tata \ @@ -1194,6 +1281,7 @@ ll_size_null() { --folder INBOX.size_null } +# In mandatory_tests ll_noheader() { $CMD_PERL ./imapsync \ --host1 $HOST1 --user1 tata \ @@ -1203,6 +1291,7 @@ ll_noheader() { --folder INBOX.few_emails --useheader '' --debug } +# In mandatory_tests ll_noheader_force() { $CMD_PERL ./imapsync \ --host1 $HOST1 --user1 tata \ @@ -1313,6 +1402,16 @@ ll_automap() { --justautomap --automap } +ll_justautomap() { + $CMD_PERL ./imapsync \ + --host1 $HOST1 --user1 tata \ + --passfile1 ../../var/pass/secret.tata \ + --host2 $HOST2 --user2 titi \ + --passfile2 ../../var/pass/secret.titi \ + --justautomap +} + + l_ks_automap() { $CMD_PERL ./imapsync \ --host1 $HOST1 --user1 tata \ @@ -1366,9 +1465,11 @@ ll_justfolders_delete1emptyfolders() { --passfile1 ../../var/pass/secret.tata \ --host2 $HOST2 --user2 titi \ --passfile2 ../../var/pass/secret.titi \ - --justfolders --delete1emptyfolders --delete1 --include Empty --folder INBOX --folderfirst INBOX.Empty.Empty --foldersizes + --justfolders --delete1emptyfolders --include Empty --folder INBOX --folderfirst INBOX.Empty.Empty --foldersizes } + + ll_delete1_delete1emptyfolders() { ./W/learn/create_folder localhost tata `cat /g/var/pass/secret.tata` INBOX.Empty INBOX.Empty.Empty INBOX.Empty.Empty.Empty $CMD_PERL ./imapsync \ @@ -1388,9 +1489,7 @@ ll_justfolders_skipemptyfolders() { --host2 $HOST2 --user2 titi \ --passfile2 ../../var/pass/secret.titi \ --justfolders --skipemptyfolders \ - --folder INBOX.empty --folder INBOX.notempty --minage 3660 - - echo "sudo rm -rf /home/vmail/titi/.new_folder/" + --folder INBOX.empty --folder INBOX.notempty } @@ -1407,7 +1506,8 @@ ll_justfolders_folderfirst_noexist() { -ll_justfolders_foldersizes() { +ll_justfolders_foldersizes() +{ $CMD_PERL ./imapsync \ --host1 $HOST1 --user1 tata \ --passfile1 ../../var/pass/secret.tata \ @@ -1418,8 +1518,9 @@ ll_justfolders_foldersizes() { } - -ll_delete2foldersonly() { +# In mandatory_tests +ll_delete2foldersonly_dry() +{ $CMD_PERL ./imapsync \ --host1 $HOST1 --user1 tata \ --passfile1 ../../var/pass/secret.tata \ @@ -1429,7 +1530,10 @@ ll_delete2foldersonly() { --subfolder2 NEW --delete2foldersonly NEW --dry } -ll_delete2foldersonly_tmp() { +# In mandatory_tests +ll_delete2foldersonly_subfolder2() +{ +./W/learn/create_folder localhost titi `cat /g/var/pass/secret.titi` INBOX.NEW_2 $CMD_PERL ./imapsync \ --host1 $HOST1 --user1 tata \ --passfile1 ../../var/pass/secret.tata \ @@ -1437,10 +1541,14 @@ ll_delete2foldersonly_tmp() { --passfile2 ../../var/pass/secret.titi \ --justfolders --nofoldersizes \ --subfolder2 NEW_2 \ - --delete2foldersonly NEW_2 + --delete2foldersonly NEW_2 --folder INBOX --debug + # NEW_2 should be still there because of --subfolder2 NEW_2 + test -d /home/vmail/titi/.NEW_2/ || return 1 } -ll_delete2foldersbutnot() { +# In mandatory_tests +ll_delete2foldersbutnot() +{ $CMD_PERL ./imapsync \ --host1 $HOST1 --user1 tata \ --passfile1 ../../var/pass/secret.tata \ @@ -1451,7 +1559,9 @@ ll_delete2foldersbutnot() { --dry } -ll_delete2foldersonly_NEW_3() { +# In mandatory_tests +ll_delete2foldersonly_NEW_3() +{ $CMD_PERL ./imapsync \ --host1 $HOST1 --user1 tata \ --passfile1 ../../var/pass/secret.tata \ @@ -1491,8 +1601,9 @@ ll_delete2foldersonly_bug() { } - -ll_delete2folders() { +# In mandatory_tests +ll_delete2folders() +{ $CMD_PERL ./imapsync \ --host1 $HOST1 --user1 tata \ --passfile1 ../../var/pass/secret.tata \ @@ -1501,7 +1612,7 @@ ll_delete2folders() { --justfolders --nofoldersizes \ --delete2folders - ! test -d /home/vmail/titi/.NEW_3/ || return 1 + ! test -d /home/vmail/titi/.NEW_3/ || return 1 } @@ -1672,27 +1783,41 @@ ks_justconnect_ipv6_nossl() -ll_justfoldersizes() +ll_justfoldersizes() +{ + $CMD_PERL ./imapsync \ + --host1 $HOST1 --user1 tata \ + --passfile1 ../../var/pass/secret.tata \ + --host2 $HOST2 --user2 titi \ + --nocheckfoldersexist --nocheckselectable \ + --passfile2 ../../var/pass/secret.titi \ + --justfoldersizes # --folder INBOX +} + +ll_justfoldersizes_all_to_INBOX() +{ + $CMD_PERL ./imapsync \ + --host1 $HOST1 --user1 tata \ + --passfile1 ../../var/pass/secret.tata \ + --host2 $HOST2 --user2 titi \ + --nocheckfoldersexist --nocheckselectable \ + --passfile2 ../../var/pass/secret.titi \ + --justfoldersizes --regextrans2 's/.*/INBOX/' +} + + +ll_justfoldersizes_case_different() { $CMD_PERL ./imapsync \ --host1 $HOST1 --user1 tata \ --passfile1 ../../var/pass/secret.tata \ --host2 $HOST2 --user2 titi \ --passfile2 ../../var/pass/secret.titi \ - --justfoldersizes + --nocheckfoldersexist --nocheckselectable \ + --justfoldersizes --folder NoExist --folder INBOX --regextrans2 's,^INBOX$,iNbOx,' } -ll_justfoldersizes_case_different() -{ - $CMD_PERL ./imapsync \ - --host1 $HOST1 --user1 tata \ - --passfile1 ../../var/pass/secret.tata \ - --host2 $HOST2 --user2 titi \ - --passfile2 ../../var/pass/secret.titi \ - --justfoldersizes --folder INBOX --regextrans2 's,^INBOX$,iNbOx,' -} - -ll_justfoldersizes_case_different_2() +ll_justfoldersizes_case_different_2() { $CMD_PERL ./imapsync \ --host1 $HOST1 --user1 tata \ @@ -1711,7 +1836,8 @@ ll_justfoldersizes_noexist() --passfile1 ../../var/pass/secret.tata \ --host2 $HOST2 --user2 titi \ --passfile2 ../../var/pass/secret.titi \ - --justfoldersizes --folder NoExist --folder INBOX + --justfoldersizes --folder NoExist --folder AnotherNoExist \ + --nocheckfoldersexist --errorsmax 2 } @@ -2004,18 +2130,37 @@ ll_search_ALL() --search 'ALL' --folder INBOX } -ll_search_UID() +ll_search1_NOT_OR_OR_UID() { $CMD_PERL ./imapsync \ --host1 $HOST1 --user1 tata \ --passfile1 ../../var/pass/secret.tata \ --host2 $HOST2 --user2 titi \ --passfile2 ../../var/pass/secret.titi \ - --search1 'NOT OR OR UID 20000 UID 20002 UID 20004' --usecache --folder INBOX - - #--search1 'OR OR UID 20000 UID 20002 UID 20004' --usecache --folder INBOX + --search1 'NOT OR OR UID 20000 UID 20002 UID 20004' --folder INBOX } +ll_search1_OR_OR_UID() +{ + $CMD_PERL ./imapsync \ + --host1 $HOST1 --user1 tata \ + --passfile1 ../../var/pass/secret.tata \ + --host2 $HOST2 --user2 titi \ + --passfile2 ../../var/pass/secret.titi \ + --search1 'OR OR UID 20000 UID 20002 UID 20004' --folder INBOX +} + +ll_search2_NOT_OR_OR_UID() +{ + $CMD_PERL ./imapsync \ + --host1 $HOST1 --user1 tata \ + --passfile1 ../../var/pass/secret.tata \ + --host2 $HOST2 --user2 titi \ + --passfile2 ../../var/pass/secret.titi \ + --search2 'NOT OR OR UID 20000 UID 20002 UID 20004' --folder INBOX +} + + ll_search_FLAGGED() { can_send && sendtestmessage @@ -2665,6 +2810,35 @@ ll_regextrans2_archive_per_month() } +ll_regextrans2_archive_per_year_flat_hard_year() +{ + year= + $CMD_PERL ./imapsync \ + --host1 $HOST1 --user1 tata \ + --passfile1 ../../var/pass/secret.tata \ + --host2 $HOST2 --user2 titi \ + --passfile2 ../../var/pass/secret.titi \ + --nofoldersizes \ + --search "SENTSINCE 1-1-$year SENTBEFORE 30-12-2018" \ + --sep2 _ --regextrans2 's{(.*)}{Archive_$1_2018}' --justfolders --dry +} + +ll_regextrans2_archive_per_year_flat_variable_year() +{ + year=2018 + $CMD_PERL ./imapsync \ + --host1 $HOST1 --user1 tata \ + --passfile1 ../../var/pass/secret.tata \ + --host2 $HOST2 --user2 titi \ + --passfile2 ../../var/pass/secret.titi \ + --nofoldersizes \ + --search "SENTSINCE 1-1-$year SENTBEFORE 30-12-$year" \ + --sep2 _ --regextrans2 's{(.*)}{Archive_$1_'"$year}" --justfolders --dry +} + + + + ll_regextrans2_ALLIN() { @@ -2906,7 +3080,7 @@ ll_regexmess_trailing_NUL() } -ll_regexmess_add_header() +ll_regexmess_add_header() { if at_home; then rm -f /home/vmail/titi/.yop.yap/cur/* @@ -2918,16 +3092,63 @@ ll_regexmess_add_header() --passfile2 ../../var/pass/secret.titi \ --folder INBOX.yop.yap \ --regexmess 's/\A/X-migrated-from-foo: 20100617\n/' \ - --search 'SUBJECT add_some_header_please' \ - --debugcontent --dry + --search 'SUBJECT add_some_header_please' \ + --debugcontent - if at_home; then - file=`ls -t /home/vmail/titi/.yop.yap/cur/* | tail -1` - diff ../../var/imapsync/tests/ll_regexmess/dest_03_add_some_header $file || return 1 + if at_home; then + file=`ls -t /home/vmail/titi/.yop.yap/cur/* | tail -1` + diff W/t/07_ll_regexmess_add_header.txt $file || return 1 echo 'sudo rm -fv /home/vmail/titi/.yop.yap/cur/*' - fi + fi } + +ll_regexmess_add_header_path() +{ + if at_home; then + rm -fv "/home/vmail/titi/.yop.blanc blanc/cur/"* + fi + $CMD_PERL ./imapsync \ + --host1 $HOST1 --user1 tata \ + --passfile1 ../../var/pass/secret.tata \ + --host2 $HOST2 --user2 titi \ + --passfile2 ../../var/pass/secret.titi \ + --folder "INBOX.yop.blanc blanc" \ + --regexmess 's/\A/X-ImapSync-OriginalPath-$sync->{user1}: $sync->{ h1_current_folder }\n/' \ + --search 'SUBJECT add_some_header_please' \ + --debugcontent + + if at_home; then + file=`ls -t "/home/vmail/titi/.yop.blanc blanc/cur/"* | tail -1` + diff W/t/08_ll_regexmess_add_header_path.txt "$file" || return 1 + echo 'sudo rm -fv "/home/vmail/titi/.yop.blanc blanc/cur/"*' + fi + +} + +ll_regexmess_add_header_path_verif() +{ + $CMD_PERL ./imapsync \ + --host1 $HOST1 --user1 titi \ + --passfile1 ../../var/pass/secret.titi \ + --host2 $HOST2 --user2 tata \ + --passfile2 ../../var/pass/secret.tata \ + --folder "INBOX.yop.blanc blanc" \ + --search1 'HEADER X-ImapSync-OriginalPath-tata ""' \ + --debugcontent --dry --useuid --debugimap1 + + $CMD_PERL ./imapsync \ + --host1 $HOST1 --user1 titi \ + --passfile1 ../../var/pass/secret.titi \ + --host2 $HOST2 --user2 tata \ + --passfile2 ../../var/pass/secret.tata \ + --folder "INBOX.yop.blanc blanc" \ + --search1 'HEADER X-ImapSync-OriginalPath-tata "INBOX.yop.blanc blanc"' \ + --debugcontent --dry --useuid --debugimap1 + +} + + ll_regexmess_change_header() { # @@ -3156,6 +3377,19 @@ ll_regex_flag() echo 'rm -f /home/vmail/titi/.yop.yap/cur/*' } +ll_regex_flag_remove() +{ + $CMD_PERL ./imapsync \ + --host1 $HOST1 --user1 tata \ + --passfile1 ../../var/pass/secret.tata \ + --host2 $HOST2 --user2 titi \ + --passfile2 ../../var/pass/secret.titi \ + --folder INBOX.yop.yap \ + --regexflag 's/\\Indexed//gi' --debugflags + + echo 'rm -f /home/vmail/titi/.yop.yap/cur/*' +} + ll_regex_flag_bad() { ! $CMD_PERL ./imapsync \ @@ -3547,6 +3781,17 @@ ll_authmech_XOAUTH2_json_gmail() { } ll_authmech_xoauth2_json_gmail() { ll_authmech_XOAUTH2_json_gmail; } +ll_authmech_XOAUTH2_json_gmail_app() { + ! ping -c1 imap.gmail.com || { $CMD_PERL ./imapsync \ + --host1 imap.gmail.com --ssl1 --user1 gilles.lamiral@gmail.com \ + --password1 ../../var/pass/secret.xoauth2.json \ + --host2 imap.gmail.com --ssl2 --user2 gilles.lamiral@gmail.com \ + --password2 ../../var/pass/secret.xoauth2.json \ + --justlogin \ + --authmech1 XOAUTH2 --authmech2 XOAUTH2 --debugimap ; } +} +ll_authmech_xoauth2_json_gmail_app() { ll_authmech_XOAUTH2_json_gmail_app; } + ll_authmech_XOAUTH2_gmail_proxy() { @@ -3894,36 +4139,36 @@ ll_delete2_dev() { ll_maxmessagespersecond() { - ll_delete1_reverse + ll_delete1_reverse $CMD_PERL ./imapsync \ --host1 $HOST1 --user1 tata \ --passfile1 ../../var/pass/secret.tata \ --host2 $HOST2 --user2 titi \ --passfile2 ../../var/pass/secret.titi \ --folder INBOX \ - --maxmessagespersecond 3.3 + --maxmessagespersecond 3.3 } ll_maxbytespersecond() { - ll_delete1_reverse + ll_delete1_reverse $CMD_PERL ./imapsync \ --host1 $HOST1 --user1 tata \ --passfile1 ../../var/pass/secret.tata \ --host2 $HOST2 --user2 titi \ --passfile2 ../../var/pass/secret.titi \ --folder INBOX \ - --maxbytespersecond 2000 --nofoldersizes + --maxbytespersecond 2000 --nofoldersizes } ll_maxbytesafter() { - ll_delete1_reverse + ll_delete1_reverse $CMD_PERL ./imapsync \ --host1 $HOST1 --user1 tata \ --passfile1 ../../var/pass/secret.tata \ --host2 $HOST2 --user2 titi \ --passfile2 ../../var/pass/secret.titi \ --folder INBOX \ - --maxbytespersecond 1000 --maxbytesafter 20000 --nofoldersizes + --maxbytespersecond 1000 --maxbytesafter 20000 --nofoldersizes } @@ -3948,6 +4193,7 @@ ll_bigmail_fastio() { echo 'sudo sh -c "rm -v /home/vmail/big2/.bigmail/cur/*"' } +# In mandatory_tests memory_stress() { free $CMD_PERL ./imapsync --testsunit tests_memory_stress && free @@ -5036,7 +5282,7 @@ ll_usecache_bracket() { } - +# In mandatory_tests ll_nousecache() { if can_send; then sendtestmessage @@ -5139,6 +5385,7 @@ ll_useuid_INBOX() } +# In mandatory_tests ll_useuid() { $CMD_PERL ./imapsync \ @@ -5161,7 +5408,7 @@ ll_useuid_all() --delete2 --useuid --nofoldersizes } - +# In mandatory_tests ll_useuid_nousecache() { $CMD_PERL ./imapsync \ @@ -5524,10 +5771,12 @@ l_exchange_maxline() --minmaxlinelength 10000 --maxlinelength 11000 --debugmaxlinelength } +# In mandatory_tests fuzz_basic() { zzuf -E '^' $CMD_PERL ./imapsync } +# In mandatory_tests fuzz_network() { zzuf -E '^' -d -n $CMD_PERL ./imapsync \ --host1 $HOST1 --user1 tata \ @@ -5583,7 +5832,24 @@ xgenplus_few() { } +firstclass() { + $CMD_PERL ./imapsync \ + --host1 mail.una.ab.ca \ + --user1 glamiral --passfile1 ../../var/pass/secret.firstclass \ + --host2 mail.una.ab.ca \ + --user2 glamiral --passfile2 ../../var/pass/secret.firstclass \ + --dry --useuid --debugcontent +} +firstclass_fullfill() { + $CMD_PERL ./imapsync \ + --host1 $HOST1 --user1 tata \ + --passfile1 ../../var/pass/secret.tata \ + --host2 mail.una.ab.ca \ + --user2 glamiral --passfile2 ../../var/pass/secret.firstclass \ + --debugcontent \ + --folder INBOX.few_emails --f1f2 'INBOX.few_emails=INBOX' +} @@ -5818,14 +6084,25 @@ nytprof_bigmail() ll_nytprof() { date1=`date` - { $CMD_PERL -d:NYTProf ./imapsync \ + # one time without NYTProf + { $CMD_PERL ./imapsync \ --host1 $HOST1 --user1 tata \ --passfile1 ../../var/pass/secret.tata \ --host2 $HOST2 --user2 titi \ --passfile2 ../../var/pass/secret.titi } date2=`date` - echo3 "[$date1] [$date2]" + # then one time with NYTProf + { $CMD_PERL -d:NYTProf ./imapsync \ + --host1 $HOST1 --user1 tata \ + --passfile1 ../../var/pass/secret.tata \ + --host2 $HOST2 --user2 titi \ + --passfile2 ../../var/pass/secret.titi + } + date3=`date` + echo3 "begin: [$date1]" + echo3 "first: [$date2]" + echo3 "end: [$date3]" } @@ -5876,7 +6153,7 @@ ll pidfile_well_removed pidfile_bad ll_pidfilelocking -tail +test_tail justbanner nomodules_version xxxxx_gmail @@ -5916,7 +6193,8 @@ ll_idatefromheader ll_folder_rev ll_subscribed ll_nosubscribe -ll_justfoldersizes +ll_justfoldersizes +ll_justfoldersizes_noexist ll_authmd5 ll_authmd51 ll_authmd52 @@ -5937,6 +6215,8 @@ ll_useheader ll_useheader_noheader ll_regexmess ll_regexmess_bad_regex +ll_regexmess_add_header +ll_regexmess_add_header_path ll_regexmess_scwchu ll_skipmess ll_skipmess_8bits @@ -5956,8 +6236,6 @@ ll_regex_flag_keep_only ll_justconnect ll_justconnect_ipv6 ll_justconnect_ipv6_nossl -ks_justconnect_ipv6 -ks_justconnect_ipv6_nossl ll_justhost1 ll_justhost2 ll_justlogin @@ -5988,8 +6266,8 @@ ll_usecache_noheader ll_usecache_debugcache ll_nousecache ll_delete2foldersonly_NEW_3 -ll_delete2foldersonly -ll_delete2foldersonly_tmp +ll_delete2foldersonly_dry +ll_delete2foldersonly_subfolder2 ll_delete2foldersbutnot ll_folder_create ll_folder_create_INBOX_Inbox @@ -6003,16 +6281,21 @@ ll_domino2 fuzz_basic fuzz_network testslive -testslive6 -ll_abort_nopidfile +ll_abort_pidfile_no_exist ll_abort_noprocess ll_abort -ll_abort_cgi_context +ll_abort_cgi_context_tail +ll_abort_no_pidfile_option ll_sigreconnect_INT ksks_reset_test1 memory_stress ' +# 2019_12 Removed +# ks_justconnect_ipv6_nossl testslive6 +# ks_justconnect_ipv6 + + other_tests=' archiveopteryx_1 msw diff --git a/webserver b/webserver new file mode 100755 index 0000000..6cf0333 --- /dev/null +++ b/webserver @@ -0,0 +1,156 @@ +#!/usr/bin/perl + +# $Id: webserver,v 1.6 2019/11/28 14:45:09 gilles Exp gilles $ +package Imapsync; + +use base qw(Net::Server::HTTP); +use strict ; +use warnings ; +use Data::Dumper ; +use English qw( -no_match_vars ) ; + +my $server = Imapsync->new( + 'port' => [8080], + 'access_log_file' => 'STDERR', + 'log_level' => 4, + 'timeout_header' => 20, + 'timeout_idle' => 60, +) ; + + +$server->run() ; + + + + +sub default_server_type { 'Fork' } + +sub post_configure_hook +{ + my $self = shift ; + $self->log( 2, Data::Dumper->Dump( [ $self ], ['self'] ) ) ; +} + +sub output_file +{ + my ( $self, $file, $type ) = @_ ; + + $type ||= 'text/plain' ; + + my $string = file_to_string( $file ) ; + + my $output ; + my( $status, $msg, $body ) ; + if ( defined $string ) + { + $output = "Content-type: $type\r\n\r\n" ; + $output .= $string ; + # body can not be sent by send_status() because then it + # sets Content-type to text/html + $self->send_status( '200', 'OK' ) ; + print $output ; + + } + else + { + $self->send_status( '404', 'Not found', "File not found: $file " ) ; + } + + return ; +} + + +sub process_path_info +{ + my $self = shift ; + my $path_info = shift ; + + my $sitemap = + { + '/imapsync_form_extra.html' => sub { + output_file( $self, './X/imapsync_form_extra.html', 'text/html' ) + }, + '/imapsync_form.html' => sub { + output_file( $self, './X/imapsync_form.html', 'text/html' ) + }, + '/imapsync_form.css' => sub { + output_file( $self, './X/imapsync_form.css', 'text/css' ) + }, + '/imapsync_form.js' => sub { + output_file( $self, './X/imapsync_form.js', 'text/javascript' ) + }, + '/imapsync_form_new.js' => sub { + output_file( $self, './X/imapsync_form_new.js', 'text/javascript' ) + }, + '/' => sub { + output_file( $self, './X/imapsync_form_extra.html', 'text/html' ) + }, + '/vnstat/vnstati.html' => sub { + output_file( $self, './X/vnstati.html', 'text/html' ) + }, + + } ; + + if ( defined $sitemap->{ $path_info } ) + { + $sitemap->{ $path_info }->() ; + } + else + { + $self->send_status( '404', 'Not found', "Error: $path_info not found!\n" ) ; + } + return ; + +} + +sub process_http_request +{ + my $self = shift ; + + $self->log( 2, "In process_http_request PID $$\n" ) ; + local $Data::Dumper::Sortkeys = 1; + #$self->log( 2, Data::Dumper->Dump( [ $self ], ['self'] ) ) ; + + $ENV{'SERVER_SOFTWARE'} = $PROGRAM_NAME ; + + if ( '/cgi-bin/imapsync' eq $ENV{'PATH_INFO'} ) { + #$self->exec_trusted_perl( './imapsync' ) ; + $self->exec_cgi( './imapsync' ) ; + #$self->exec_cgi( './imapsync_bin_Linux_i686' ) ; + + #$self->exec_trusted_perl( '.\imapsync.pl' ); + $self->log( 2, "In process_http_request PID $$ after exec_trusted_perl\n" ) ; + #return ; + #return $self->exec_cgi( 'C:\Strawberry\perl\bin\perl.exe .\imapsync.pl' ); + #return $self->exec_cgi( 'imapsyncbat' ); + #return $self->exec_trusted_perl( 'imapsyncbat' ); + + } + else + { + process_path_info( $self, $ENV{'PATH_INFO'} ) ; + } + #$self->log( 4, Data::Dumper->Dump( [ $self ], ['self'] ) ) ; + $self->log( 2, "End of process_http_request PID $$\n" ) ; +} + +sub file_to_string +{ + my $file = shift ; + if ( ! $file ) { warn "Error, no file given\n" ; return ; } + if ( ! -e $file ) { warn "Error, $file does not exist\n" ; return ; } + if ( ! -f $file ) { warn "Error, $file is not a file\n" ; return ; } + if ( ! -r $file ) { warn "Error, $file is not readable\n" ; return ; } + my @string ; + if ( open my $FILE, '<', $file ) { + @string = <$FILE> ; + close $FILE ; + my $string = join q{}, @string ; + return $string ; + }else{ + warn "Error reading file $file : $OS_ERROR\n" ; + return ; + } +} + +