diff --git a/ChangeLog b/ChangeLog
index ab36fb6..019b03a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,17 +1,187 @@
RCS file: RCS/imapsync,v
Working file: imapsync
-head: 2.140
+head: 2.178
branch:
locks: strict
- gilles: 2.140
+ gilles: 2.178
access list:
symbolic names:
keyword substitution: kv
-total revisions: 1040; selected revisions: 1040
+total revisions: 1078; selected revisions: 1078
description:
----------------------------
-revision 2.140 locked by: gilles;
+revision 2.178 locked by: gilles;
+date: 2022/01/12 21:28:37; author: gilles; state: Exp; lines: +75 -13
+Added tests_compress_ssl()
+----------------------------
+revision 2.177
+date: 2021/12/23 20:38:44; author: gilles; state: Exp; lines: +8 -8
+Bugfix. 1849 -> 1848 unit tests
+----------------------------
+revision 2.176
+date: 2021/12/23 20:19:04; author: gilles; state: Exp; lines: +35 -23
+Bugfix. memory consumption on Mac was not relevant. Use RSS instead of VSZ, on Mac only. Linux stays with VSZ.
+----------------------------
+revision 2.175
+date: 2021/12/21 17:46:14; author: gilles; state: Exp; lines: +23 -21
+Bugix. Darwin, fixed loadavg tests, no more W/t/loadavg.out needed.
+----------------------------
+revision 2.174
+date: 2021/12/14 15:51:58; author: gilles; state: Exp; lines: +62 -17
+Added advice for:
+ ERR_APPEND_SIZE
+ ERR_CONNECTION_FAILURE_HOST1
+ ERR_CONNECTION_FAILURE_HOST2
+ ERR_AUTHENTICATION_FAILURE_USER1
+ ERR_AUTHENTICATION_FAILURE_USER2
+----------------------------
+revision 2.173
+date: 2021/12/09 18:30:34; author: gilles; state: Exp; lines: +61 -40
+Bugfix. Made reconnect mechanism works with --oauthdirect1 --oauthdirect2 --oauthaccesstoken1 --oauthaccesstoken2
+----------------------------
+revision 2.172
+date: 2021/12/07 18:19:42; author: gilles; state: Exp; lines: +27 -17
+Added some tests to tests_get_options_from_string() and tests_get_options_extra()
+ I can not have the unknown options back with Getopt::Long::GetOptionsFromString(), just the unknown values, ie, caca but not --caca
+----------------------------
+revision 2.171
+date: 2021/12/07 17:50:12; author: gilles; state: Exp; lines: +14 -8
+Added --ssl1 --ssl2 --tls1 --tls2 --compress1 --compress2 to get_options_from_string()
+----------------------------
+revision 2.170
+date: 2021/12/07 17:19:44; author: gilles; state: Exp; lines: +12 -8
+Added --keepalive1 --keepalive2 --reconnectretry1 --reconnectretry2 in get_options_from_string()
+----------------------------
+revision 2.169
+date: 2021/12/07 17:13:44; author: gilles; state: Exp; lines: +101 -36
+Added --keepalive1 and --keepalive2 options. On by default.
+ See https://metacpan.org/pod/Mail::IMAPClient#Keepalive
+ Use --nokeepalive1 and --nokeepalive2 to disable Keepalive.
+----------------------------
+revision 2.168
+date: 2021/12/05 23:27:27; author: gilles; state: Exp; lines: +29 -11
+Added --debugflags --errorsmax --folder --timeout in options from file
+----------------------------
+revision 2.167
+date: 2021/12/02 16:59:51; author: gilles; state: Exp; lines: +9 -9
+Moved the call to extra options after the chdir of the CGI context.
+----------------------------
+revision 2.166
+date: 2021/12/02 15:23:37; author: gilles; state: Exp; lines: +107 -9
+Now read extra options on the first line of the file ./options_extra.txt if it is present and readable.
+----------------------------
+revision 2.165
+date: 2021/11/30 20:27:38; author: gilles; state: Exp; lines: +30 -11
+cpu_time rounded with 2 decimals.
+Added 4 tests when no compression is on.
+----------------------------
+revision 2.164
+date: 2021/11/24 21:26:46; author: gilles; state: Exp; lines: +12 -11
+Compression no more on by default. Just to see.
+----------------------------
+revision 2.163
+date: 2021/11/20 20:11:46; author: gilles; state: Exp; lines: +8 -7
+Bugfix. imapsync --version was buggy in docker context.
+----------------------------
+revision 2.162
+date: 2021/11/20 10:16:33; author: gilles; state: Exp; lines: +14 -12
+Docker. Current working directory changed from /var/tmp to /var/tmp/uid_$EFFECTIVE_USER_ID
+----------------------------
+revision 2.161
+date: 2021/11/19 18:17:48; author: gilles; state: Exp; lines: +8 -8
+Bugfix. inline doc mentioned always --nocompress1
+----------------------------
+revision 2.160
+date: 2021/11/19 14:40:58; author: gilles; state: Exp; lines: +10 -7
+Added inline documentation about --nocompress1 and --nocompress2
+----------------------------
+revision 2.159
+date: 2021/11/19 14:29:31; author: gilles; state: Exp; lines: +113 -12
+Dependency. Added use Compress::Zlib
+Enhancement. Added compression in imap. On by default no matter the capability announced. Use --nocompress1 and --nocompress2 to turn it off.
+----------------------------
+revision 2.158
+date: 2021/11/13 20:01:35; author: gilles; state: Exp; lines: +13 -7
+Added README help for --truncmess
+----------------------------
+revision 2.157
+date: 2021/10/23 21:51:43; author: gilles; state: Exp; lines: +61 -16
+Refactor. Deglobalized $debugcontent. Added debugcontent() function.
+1800 unit tests.
+----------------------------
+revision 2.156
+date: 2021/10/12 13:36:36; author: gilles; state: Exp; lines: +72 -71
+Added comment for ERR_FLAGS "Many STORE errors with FLAGS. Retry with the option --noresyncflags"
+Refactored errors_incr() and errors_listing()
+Bugfix. errors_incr() existed with CATCH_ALL
+----------------------------
+revision 2.155
+date: 2021/10/01 07:46:55; author: gilles; state: Exp; lines: +9 -8
+Like --useheader X-Gmail-Received --useheader Message-Id when --gmail1 --gmail2
+----------------------------
+revision 2.154
+date: 2021/09/29 20:38:04; author: gilles; state: Exp; lines: +8 -8
+Bugfix. Added 'E&AwE-le&AwE-ments envoye&AwE-s' in possible_special
+----------------------------
+revision 2.153
+date: 2021/09/29 13:56:15; author: gilles; state: Exp; lines: +34 -12
+Does not checknoabletosearch if --justfolders
+When creating folder check if selectable and consider ok if selectable
+----------------------------
+revision 2.152
+date: 2021/09/29 12:03:12; author: gilles; state: Exp; lines: +362 -58
+Added inline advice on error ERR_OVERQUOTA
+Added inline advice on error ERR_TRANSFER_EXCEEDED
+Renamed function bytes_display_string() bytes_display_string_bin()
+ bytes_display_string_bin converts bytes to human KiB MiB GiB TiB PiB
+Added function bytes_display_string_dec() to convert bytes to human decimal KB MB GB TB PB (1000 base)
+----------------------------
+revision 2.151
+date: 2021/09/08 10:34:25; author: gilles; state: Exp; lines: +23 -18
+Bugfix. load average on macosx was sometimes buggy. locale float 3,14 instead of 3.14
+----------------------------
+revision 2.150
+date: 2021/08/08 12:10:51; author: gilles; state: Exp; lines: +9 -10
+Refactor. Deglobalized warn_release variable
+----------------------------
+revision 2.149
+date: 2021/07/31 11:24:24; author: gilles; state: Exp; lines: +7 -26
+Removed --fast option.
+----------------------------
+revision 2.148
+date: 2021/07/22 14:21:09; author: gilles; state: Exp; lines: +10 -10
+Bugfix. abort didn't do charset=UTF-8; same for heavy load 503 Service Unavailable
+----------------------------
+revision 2.147
+date: 2021/07/22 13:13:50; author: gilles; state: Exp; lines: +12 -12
+Bugfix. The maximum number a pid can be is 2^22, not 2^32.
+----------------------------
+revision 2.146
+date: 2021/07/22 12:48:21; author: gilles; state: Exp; lines: +8 -8
+1742 unit tests.
+----------------------------
+revision 2.145
+date: 2021/07/22 12:45:31; author: gilles; state: Exp; lines: +16 -13
+Bugfix. Up the maximum number a pid can be. From 99999 to 2^32. See https://unix.stackexchange.com/questions/16883/what-is-the-maximum-value-of-the-process-id
+----------------------------
+revision 2.144
+date: 2021/07/17 18:07:59; author: gilles; state: Exp; lines: +13 -10
+Just an experimental loaddelay forced to 0.
+----------------------------
+revision 2.143
+date: 2021/07/12 19:45:44; author: gilles; state: Exp; lines: +111 -15
+Bugfix. Under docker context --version was buggy, too verbose.
+----------------------------
+revision 2.142
+date: 2021/07/12 14:04:01; author: gilles; state: Exp; lines: +17 -19
+Removed that hard limit --maxsize 35_651_584 set by --gmail2 since CAPABILITY is used and good.
+----------------------------
+revision 2.141
+date: 2021/07/06 02:59:19; author: gilles; state: Exp; lines: +8 -8
+cpu_time param
+----------------------------
+revision 2.140
date: 2021/07/05 20:14:18; author: gilles; state: Exp; lines: +14 -10
Fixed perlcrit 4 severity 4 violations.
----------------------------
diff --git a/FAQ.d/FAQ.Archiving.txt b/FAQ.d/FAQ.Archiving.txt
index 45c4bb5..d4ce383 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.25 2021/05/04 16:56:59 gilles Exp gilles $
+$Id: FAQ.Archiving.txt,v 1.26 2022/01/11 12:55:53 gilles Exp gilles $
This documentation is also available online at
https://imapsync.lamiral.info/FAQ.d/
@@ -14,12 +14,12 @@ Questions answered in this FAQ are:
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 can I restore a complete account backuped in a subfolder, like
+ a backup done 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.
+Q. How to move emails from one IMAP folder to another, either on the
+ same IMAP server or on a different one? Example:
+ How to move all messages older than 1 year, from INBOX to Archive?
Q. Can imapsync be used to maintain and restore a local offline copy
of a mailbox, eg for backup purposes, using Mbox or Maildir
@@ -47,8 +47,12 @@ R. Use --subfolder2
Examples:
+To backup the account Foo in a subfolder called FooArchiv:
+
imapsync ... --user1 Foo --subfolder2 FooArchiv
+To backup the account Bar in a subfolder called BarArchiv:
+
imapsync ... --user1 Bar --subfolder2 BarArchiv
In case you need a very strict sync, add options
@@ -58,14 +62,20 @@ It will delete on account2 what is not on account1 but only in the right place,
ie, the subfolder "FooArchiv".
Examples:
-
+
+To mirror the account Foo in a subfolder called FooArchiv:
+
imapsync ... --user1 Foo --subfolder2 FooArchiv --delete2 --delete2foldersonly "FooArchiv"
+To mirror the account Bar in a subfolder called BarArchiv:
+
imapsync ... --user1 Bar --subfolder2 BarArchiv --delete2 --delete2foldersonly "BarArchiv"
+See how to restore those with the next Q/R.
+
=======================================================================
-Q. How can I restore a complete account archived in a subfolder, like
- with the option --subfolder2?
+Q. How can I restore a complete account backuped in a subfolder, like
+ a backup done with the option --subfolder2?
R. Use --subfolder1
@@ -81,26 +91,29 @@ R. Use --subfolder1
Examples:
+To restore the whole folder FooArchiv hierarchy into the Foo account:
+
imapsync ... --user2 Foo --subfolder1 FooArchiv
- imapsync ... --user2 Bar --subfolder1 BarArchiv
+To restore the whole folder BarArchiv hierarchy into the Bar account:
+ imapsync ... --user2 Bar --subfolder1 BarArchiv
Read the previous FAQ item "How can I archive different accounts on the same
destination account, each account on a separate folder?"
=======================================================================
-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.
+Q. How to move emails from one IMAP folder to another, either on the
+ same IMAP server or on a different one? Example:
+ How to move all messages older than 1 year, from INBOX to Archive?
R1. Solution:
imapsync ... --minage 365 --folder Inbox --f1f2 INBOX=Archive --delete1 --noexpungeaftereach
-Add option --noexpungeaftereach if speed is a concern.
-Add option --delete1 if you want to move messages, instead of just copy/sync them.
+Use the option --noexpungeaftereach if speed is a concern.
+Use the option --delete1 if you want to move messages, instead of just copy/sync them.
R2. See also file FAQ.Folders_Mapping.txt
@@ -145,20 +158,23 @@ I have never used any of this tools so asking me for support with them
won't go far away.
=======================================================================
-Q. How to archive a whole year in a subfolder?
+Q. How to backup a whole year in a subfolder?
-R. Example:
+R. To backup the whole year 2018 in a subfolder called ARCHIVE_2018:
imapsync ... --search "SENTSINCE 1-Jan-2018 SENTBEFORE 31-Dec-2018" \
- --folder2 ARCHIVE_2018
+ --subfolder2 ARCHIVE_2018
=======================================================================
Q. How to archive a whole year in subfolders but without subsubfolders?
-R. Example:
+R. Instead of the solution with --subfolder2, use:
imapsync ... --search "SENTSINCE 1-Jan-2018 SENTBEFORE 31-Dec-2018" \
--sep2 _ --regextrans2 's{(.*)}{Archive_$1_2018}'
+For each folder "FFFF" in the source account, it will create a destination
+folder called "Archive_FFFF_2018", at the top level hierarchy.
+
=======================================================================
=======================================================================
diff --git a/FAQ.d/FAQ.Authentication_failure.txt b/FAQ.d/FAQ.Authentication_failure.txt
index 11dec1f..7219a36 100644
--- a/FAQ.d/FAQ.Authentication_failure.txt
+++ b/FAQ.d/FAQ.Authentication_failure.txt
@@ -1,5 +1,5 @@
#!/bin/cat
-$Id: FAQ.Authentication_failure.txt,v 1.13 2021/03/02 19:24:22 gilles Exp gilles $
+$Id: FAQ.Authentication_failure.txt,v 1.14 2021/11/05 11:35:07 gilles Exp gilles $
This documentation is also available online at
https://imapsync.lamiral.info/FAQ.d/
@@ -26,14 +26,16 @@ Host1 failure: Error login on [imap.example.com] with user [foo] auth [LOGIN]: 2
R. One over four imapsync syncs ends up quickly with the error message
- "Authentication failed" or "NO LOGIN failed" or similar.
+ "Authentication failed" or "NO LOGIN failed" or a similar message.
Authentication failure is the primary failure with imapsync
and since nothing tangible can be done without authentication,
this stage must succeed to go further.
Here are some advices to get you pass this difficult stage of authentication:
- * Triple check each credential parameter, there are three parameters at each side:
+ * Triple check each credential parameter. It's not always a password problem,
+ it can be the wrong host or the wrong user.
+ There are three parameters at each side:
* triple check --host1
* triple check --user1
* triple check --password1
@@ -53,8 +55,7 @@ Here are some advices to get you pass this difficult stage of authentication:
instead of the string MASKED. It helps for debugging quoting issues.
Option --showpasswords shows passwords again when the IMAP dialog
is dumped by --debugimap option. Search for a line like
- "Sending: 2 LOGIN test1 secret1" (secret1 is the password here)
-
+ "Sending: 2 LOGIN test1 secret1" (secret1 is the password here).
* It is sometimes very hard to quote correctly unusual characters,
especially on Windows (and Mac sometimes). See
diff --git a/FAQ.d/FAQ.Contacts_Calendars.txt b/FAQ.d/FAQ.Contacts_Calendars.txt
index 08ce52a..490ec94 100644
--- a/FAQ.d/FAQ.Contacts_Calendars.txt
+++ b/FAQ.d/FAQ.Contacts_Calendars.txt
@@ -1,5 +1,5 @@
#!/bin/cat
-$Id: FAQ.Contacts_Calendars.txt,v 1.14 2020/11/02 16:04:09 gilles Exp gilles $
+$Id: FAQ.Contacts_Calendars.txt,v 1.15 2021/09/06 14:32:19 gilles Exp gilles $
This documentation is also available online at
https://imapsync.lamiral.info/FAQ.d/
@@ -11,21 +11,20 @@ https://imapsync.lamiral.info/FAQ.d/FAQ.Contacts_Calendars.txt
Questions answered in this FAQ are:
-Q. Can I copy or sync Calendars or Contacts with imapsync?
-Q. Can I copy or sync Chat messages with imapsync?
-Q. How can I avoid copying Calendar or Contacts folders?
+Q. Can I copy or sync Contacts, Calendars, Tasks or Chat messages with imapsync?
Q. How can I copy or synchronize Calendars or Contacts?
+Q. How can I avoid copying Calendar or Contacts folders?
Now the questions again with their answers.
=======================================================================
-Q. Can I copy or sync Calendars or Contacts with imapsync?
+Q. Can I copy or sync Contacts, Calendars, Tasks or Chat messages with imapsync?
-R. No, Imapsync can't migrate Contacts and Calendars.
+R. No, Imapsync can't migrate Contacts, Calendars, Tasks nor Chat messages.
It's because most IMAP servers don't get contacts and calendars
events via IMAP. In other words, messages synced by imapsync from
- Calendars or Contacts folders are not used by email servers to set
- or get the contacts or calendars.
+ Contacts/Calendars/Tasks/Chat folders are not used by email servers to set
+ or get the contacts, calendars, tasks or chat messages.
No way via IMAP, no way via imapsync.
So it's a good idea to avoid syncing contacts and calendars when
@@ -35,12 +34,6 @@ R. No, Imapsync can't migrate Contacts and Calendars.
But see also the question below
"How can I copy or synchronize Calendars or Contacts?".
-=======================================================================
-Q. Can I copy or sync Chat messages with imapsync?
-
-R. No, Imapsync can't migrate Chat messages (those in GSuite for example).
- The explanation is the same as with Calendars or Contacts.
-
=======================================================================
Q. How can I copy or synchronize Calendars or Contacts?
diff --git a/FAQ.d/FAQ.Docker.txt b/FAQ.d/FAQ.Docker.txt
index a159286..de5c59a 100644
--- a/FAQ.d/FAQ.Docker.txt
+++ b/FAQ.d/FAQ.Docker.txt
@@ -1,13 +1,13 @@
#!/bin/cat
-# $Id: FAQ.Docker.txt,v 1.8 2021/05/04 16:57:09 gilles Exp gilles $
+# $Id: FAQ.Docker.txt,v 1.10 2021/07/12 21:22: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
-===========================================================================
+======================================================================
+ Installing and using imapsync docker image
+======================================================================
Questions answered in this FAQ are:
@@ -23,27 +23,29 @@ Q. Where is the imapsync Docker hub location?
Q. How can I mask the passwords on the command line without mounting
inside the container?
-===========================================================================
Q. Why imapsync isn't logging to a file in Docker context.
How can I allow it?
Q. Any tips for the Docker Mailcow distribution?
+Q. How can I build my own image?
+
+Q. What do you do to update the docker hub image?
Now the questions again with their answers.
-===========================================================================
+======================================================================
Q. How can I install and use the imapsync Docker image on my amd64 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:
+ all you have to do in order install and run imapsync is the command line:
docker run gilleslamiral/imapsync imapsync
-===========================================================================
+======================================================================
Q. How can I install and use the imapsync Docker image on my i386 system?
-R. You can't for now. It will throw this error when running it:
+R1. You can't do it directly for now. It will throw this error when running it:
docker run gilleslamiral/imapsync imapsync
standard_init_linux.go:211: exec user process caused "exec format error"
@@ -51,21 +53,24 @@ R. You can't for now. It will throw this error when running it:
I plan to make the image multi-plateform. Drop me a note if you are
eager to have it.
-===========================================================================
+R2. Build the image on a i386 system with the exact same Dockerfile provided
+and run it on your i386 system.
+
+======================================================================
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. How can I mask the passwords on the command line without mounting
anything inside the container?
@@ -84,7 +89,7 @@ See:
https://docs.docker.com/engine/reference/commandline/run/#set-environment-variables--e---env---env-file
https://stackoverflow.com/a/30494145/491175
-===========================================================================
+======================================================================
Q. Why imapsync isn't logging to a file in Docker context.
How can I allow it?
@@ -93,14 +98,14 @@ R. In Docker context, writing the log is disabled by default because you
inside the docker and no longer available after the sync, unless
a special mount is done before.
-Starting with imapsync release 2.113 the logging can be set on
+Starting with imapsync release 2.113 the logging can be turned on
by using the option --log. You can add access to the logfile with a mount
or similar. See https://docs.docker.com/storage/volumes/"
See also
https://github.com/imapsync/imapsync/issues/283
-===========================================================================
+======================================================================
Q. Any tips for the Docker Mailcow distribution?
R. With the Mailcow distribution, imapsync is running inside a Docker
@@ -116,6 +121,40 @@ See the original Mathilde's comment:
https://github.com/imapsync/imapsync/issues/201#issuecomment-559500077
+======================================================================
+Q. How can I build my own image?
-===========================================================================
-===========================================================================
+R. Use the following command to build the image:
+
+ docker build -t gilleslamiral/imapsync .
+
+ with the Dockerfile in the current directory.
+
+The latest Dockerfile can be found at
+https://imapsync.lamiral.info/INSTALL.d/Dockerfile
+or
+https://hub.docker.com/r/gilleslamiral/imapsync
+or
+https://imapsync.lamiral.info/INSTALL.d/INSTALL.Docker_build.txt
+
+
+======================================================================
+Q. What do you do to update the docker hub image?
+
+R. I do in my imapsync directory:
+
+ make docker_build
+ make docker_upload_docker_hub
+
+Then I go to
+https://hub.docker.com/r/gilleslamiral/imapsync
+
+I edit and update the docker "Readme" with the last Dockerfile I used.
+I also update INSTALL.Docker_build.txt with the last Dockerfile
+
+I also update the last Dockerfile on the imapsync site with:
+
+ make upload_index
+
+======================================================================
+======================================================================
diff --git a/FAQ.d/FAQ.Dovecot.txt b/FAQ.d/FAQ.Dovecot.txt
index c166036..74b02b5 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.12 2021/04/30 13:02:06 gilles Exp gilles $
+$Id: FAQ.Dovecot.txt,v 1.13 2021/12/03 12:51:23 gilles Exp gilles $
This documentation is also available online at
https://imapsync.lamiral.info/FAQ.d/
@@ -13,6 +13,8 @@ https://imapsync.lamiral.info/FAQ.d/FAQ.Dovecot.txt
Questions answered in this FAQ are:
+Q. Is there imapsync specific options to deal with Dovecot?
+
Q. Subfolders are not created by imapsync and the error is
"Mailbox doesn't allow inferior mailboxes"
@@ -28,6 +30,11 @@ Q. Imapsync encounters timeouts and Dovecot log says
Now the questions again with their answers.
+=======================================================================
+Q. Is there imapsync specific options to deal with Dovecot?
+
+R. Dovecot is ok with imapsync, nothing special is needed, just the
+ basic option, the credentials, are needed.
=======================================================================
Q. How to migrate to Dovecot with an admin/MasterUser account?
diff --git a/FAQ.d/FAQ.Duplicates.txt b/FAQ.d/FAQ.Duplicates.txt
index 48092f5..a7bbc1b 100644
--- a/FAQ.d/FAQ.Duplicates.txt
+++ b/FAQ.d/FAQ.Duplicates.txt
@@ -1,5 +1,5 @@
#!/bin/cat
-$Id: FAQ.Duplicates.txt,v 1.24 2021/07/04 22:59:56 gilles Exp gilles $
+$Id: FAQ.Duplicates.txt,v 1.25 2021/10/06 20:21:13 gilles Exp gilles $
This documentation is also available online at
https://imapsync.lamiral.info/FAQ.d/
@@ -12,6 +12,10 @@ https://imapsync.lamiral.info/FAQ.d/FAQ.Duplicates.txt
Questions answered in this FAQ are:
+Q. Without imapsync, I made several copies that partially failed and it
+ ended with many duplicates/triplicates messages or more. Can I clean
+ up the account with imapsync and how?
+
Q. How does imapsync identify messages and duplicates?
Q. How can I know if imapsync will generate duplicates on a second run?
@@ -30,6 +34,14 @@ Q. How can I remove duplicates in a lone account?
Now the questions again with their answers.
+=======================================================================
+Q. Without imapsync, I made several copies that partially failed and it
+ ended with many duplicates/triplicates messages or more. Can I clean
+ up the account with imapsync and how?
+
+R. Yes.
+ See the Q/R "How can I remove duplicates in a lone account?" below.
+
=======================================================================
Q. How does imapsync identify messages and duplicates?
@@ -260,6 +272,8 @@ R. In order to remove duplicates in a lone account, just run imapsync
on the same account as source and destination, plus the
option --delete2duplicates, ie, with
host1 == host2, user1 == user2, password1 == password2
-
+
+ imapsync ... --delete2duplicates
+
=======================================================================
=======================================================================
diff --git a/FAQ.d/FAQ.Emptying.txt b/FAQ.d/FAQ.Emptying.txt
index 44b1ab6..014ef12 100644
--- a/FAQ.d/FAQ.Emptying.txt
+++ b/FAQ.d/FAQ.Emptying.txt
@@ -1,5 +1,5 @@
#!/bin/cat
-$Id: FAQ.Emptying.txt,v 1.11 2020/10/13 16:24:43 gilles Exp gilles $
+$Id: FAQ.Emptying.txt,v 1.12 2021/09/09 11:53:53 gilles Exp gilles $
This documentation is also available online at
https://imapsync.lamiral.info/FAQ.d/
@@ -13,10 +13,18 @@ https://imapsync.lamiral.info/FAQ.d/FAQ.Emptying.txt
Questions answered in this FAQ are:
Q. How to delete all emails of all folders of an account with imapsync?
+
Q. How to delete all folders of an account with imapsync?
+
Q. How to delete some folders of an account with imapsync?
+
Q. How to revert a sync that went to the wrong account?
+Q. How to delete emails older than 90 days with imapsync?
+
+Q. How to delete emails matching a certain criterium with imapsync?
+
+
Now the questions again with their answers.
=======================================================================
@@ -27,11 +35,11 @@ R. Use the same account on both sides with option --delete1
Option --noexpungeaftereach is just to speed up the deletions.
-Example (real example):
+Example:
imapsync \
- --host1 test.lamiral.info --user1 empty --password1 secret \
- --host2 test.lamiral.info --user2 empty --password2 secret \
+ --host1 test.lamiral.info --user1 foo --password1 secret \
+ --host2 test.lamiral.info --user2 foo --password2 secret \
--delete1 --noexpungeaftereach
=======================================================================
@@ -90,5 +98,35 @@ R. If all the wrong emails have some common characteristic that is not
If the wrongly emails messages synced have no special common
characteristic then take an handkerchief and cry.
+=======================================================================
+Q. How to delete emails older than 90 days with imapsync?
+
+R. Use the same account on both sides with option --delete1
+ --noexpungeaftereach --minage 90
+
+Example:
+
+ imapsync \
+ --host1 test.lamiral.info --user1 foo --password1 secret \
+ --host2 test.lamiral.info --user2 foo --password2 secret \
+ --delete1 --noexpungeaftereach --minage 90
+
+=======================================================================
+Q. How to delete emails matching a certain criterium with imapsync?
+
+R. Use the --search option to select the messages you want to delete
+ and then use the same account on both sides with the suplementary
+ options --delete1 --noexpungeaftereach
+ To select the messages read the document FAQ.Messages_Selection.txt
+ at https://imapsync.lamiral.info/FAQ.d/FAQ.Messages_Selection.txt
+
+
+Example:
+
+ imapsync \
+ --host1 test.lamiral.info --user1 foo --password1 secret \
+ --host2 test.lamiral.info --user2 foo --password2 secret \
+ --delete1 --noexpungeaftereach --search "SENTBEFORE 31-Dec-2010"
+
=======================================================================
=======================================================================
\ No newline at end of file
diff --git a/FAQ.d/FAQ.Exchange.txt b/FAQ.d/FAQ.Exchange.txt
index 88bf0db..77e74bd 100644
--- a/FAQ.d/FAQ.Exchange.txt
+++ b/FAQ.d/FAQ.Exchange.txt
@@ -1,5 +1,5 @@
-$Id: FAQ.Exchange.txt,v 1.75 2021/05/25 10:23:33 gilles Exp gilles $
+$Id: FAQ.Exchange.txt,v 1.79 2021/12/17 11:59:48 gilles Exp gilles $
This documentation is also available online at
https://imapsync.lamiral.info/FAQ.d/
@@ -31,6 +31,9 @@ Q. Exchange fails with "User is authenticated but not connected".
Q. Exchange fails with "BAD Command received in Invalid state".
+Q. Exchange fails with "NO Server Unavailable. 15" and imapsync says
+ "could not append ... NO Server Unavailable. 15"
+
Q. From XXX to Exchange 2013, read receipts are all resent again
after a sync. Even for old messages. How can I fix that?
@@ -201,6 +204,14 @@ R2. Miguel Alameda reported understanding and solving this issue
like this, the context was admin/authuser:
"The admin user had not permission in the target mailbox."
+R3. Jason from magiclamp.net adds this tip (2021_11_23).
+"In GoDaddy Exchange admin center, under recipients, you can
+double click on a mailbox, and in the "mailbox delegation" scrolling
+down to the bottom it shows a input field named "Full Access".
+Add the admin account there."
+
+
+
======================================================================
Q. I see "NO Maximum size of appendable message has been exceeded"
What can I do with that?
@@ -298,6 +309,35 @@ R2. This message might also happen when authenticating with ssl and tls.
It won't work, you can't do a direct double encryption, few
servers allow that.
+======================================================================
+Q. Exchange fails with "NO Server Unavailable. 15" and imapsync says
+ "could not append ... NO Server Unavailable. 15"
+
+R1. The problem could be a mailbox quota limitation.
+
+In the Exchange log file, if you see many
+"Microsoft.Exchange.Data.Storage.QuotaExceededException",
+it looks like "Quota Exceeded" could be the issue.
+
+The solution is to increase the quota for this mailbox.
+Quoting
+https://docs.microsoft.com/en-us/exchange/recipients/user-mailboxes/storage-quotas?view=exchserver-2019
+In the Exchange admin center (EAC), navigate to Recipients > Mailboxes.
+In the list of user mailboxes, click the mailbox that you want to change the storage quotas for,
+and then click Edit icon, then change "Prohibit send and receive at (GB)", then save your changes.
+
+Or use the Exchange Management Shell, aka PowerShell:
+Set-Mailbox -Identity "Joe Healy" -IssueWarningQuota 499gb -ProhibitSendQuota 500gb -ProhibitSendReceiveQuota 500gb -UseDatabaseQuotaDefaults $false
+
+
+R2. A user fixed it by enabling IMAP logging on Exchange which is
+ quite crazy as a solution. But why not, here it is:
+
+https://www.mantisbt.org/forums/viewtopic.php?p=68835&sid=8b1ecd2d976e85218fbf33fcd38c209d#p68835
+by TerranceM
+
+ Set-ImapSettings -Server -ProtocolLogEnabled $true
+
======================================================================
Q. From XXX to Exchange 2013, read receipts are all resent again
after a sync. Even for old messages. How can I fix that?
diff --git a/FAQ.d/FAQ.Fun_Things.txt b/FAQ.d/FAQ.Fun_Things.txt
new file mode 100644
index 0000000..a838104
--- /dev/null
+++ b/FAQ.d/FAQ.Fun_Things.txt
@@ -0,0 +1,80 @@
+#!/bin/cat
+$Id: FAQ.Fun_Things.txt,v 1.2 2021/10/15 13:37:05 gilles Exp gilles $
+
+This documentation is also available online at
+https://imapsync.lamiral.info/FAQ.d/
+https://imapsync.lamiral.info/FAQ.d/FAQ.Fun_Things.txt
+
+=======================================================================
+ Imapsync fun things to do with
+=======================================================================
+
+Questions answered in this FAQ are:
+
+Q. How can I have a daily digest of my mailbox?
+
+
+Now the questions again with their answers.
+
+=======================================================================
+Q. How can I have a daily digest of my mailbox?
+
+R. Use the same account as source and destination (not mandatory)
+
+ imapsync \
+ --host1 imap.example.com --user1 foo --password1 secret \
+ --host2 imap.example.com --user2 foo --password2 secret \
+ --folder INBOX --maxage 1 --dry --nodry1 --debugcontent \
+ --truncmess 1000 --f1f2 INBOX=Unused
+
+Some explanations on the options suggested:
+
+--folder INBOX to only focus on the folder INBOX
+
+--maxage 1 to select messages less old than 1 day
+
+--dry --nodry1 to avoid really syncing the messages
+
+--debugcontent to display the content
+
+--truncmess 1000 to display only the first 1000 bytes
+
+--f1f2 INBOX=Unused to force imapsync to do something.
+ Since it is the same mailbox as source and destination,
+ imapsync usually doesn't sync the messages as they are
+ already at the destination. The folder Unused has to
+ exist, otherwise imapsync won't display the messages.
+
+
+If you pipe this command with a filter like egrep, it becomes like
+magic:
+
+ imapsync \
+ --host1 imap.example.com --user1 foo --password1 secret \
+ --host2 imap.example.com --user2 foo --password2 secret \
+ --folder INBOX --maxage 1 --dry --nodry1 --debugcontent \
+ --truncmess 1000 --f1f2 INBOX=Unused \
+ | egrep 'From:|To:|Subject:|Date:|=====|msg '
+
+Output example:
+
+$RCSfile: FAQ.Fun_Things.txt,v $ $Revision: 1.2 $ $Date: 2021/10/15 13:37:05 $
+msg INBOX/22359 copying to INBOX.Fake (not really since --dry mode) ETA: vendredi 15 octobre 2021-10-15 15:31:38 +0200 CEST 57 s 38/38 msgs left
+================================================================================
+Subject: test: lei7eeCh4Fulahei
+To:
+Date: Mon, 11 Oct 2021 11:56:05 +0200 (CEST)
+From: gilles@localhost.info (Gilles LAMIRAL)
+================================================================================
+msg INBOX/22360 copying to INBOX.Fake (not really since --dry mode) ETA: vendredi 15 octobre 2021-10-15 15:31:38 +0200 CEST 57 s 37/38 msgs left
+================================================================================
+Subject: test: yahShee3Ohvu9mai
+To:
+Date: Mon, 11 Oct 2021 11:56:05 +0200 (CEST)
+From: gilles@localhost.info (Gilles LAMIRAL)
+================================================================================
+
+Thanks to John Fedewa for this trick!
+
+=======================================================================
+=======================================================================
\ No newline at end of file
diff --git a/FAQ.d/FAQ.Gmail.txt b/FAQ.d/FAQ.Gmail.txt
index 3464304..260704d 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.80 2021/07/06 02:30:11 gilles Exp gilles $
+$Id: FAQ.Gmail.txt,v 1.81 2021/10/06 20:21:26 gilles Exp gilles $
This document is also available online at
https://imapsync.lamiral.info/FAQ.d/
@@ -236,7 +236,7 @@ imapsync \
--password2 gmailsecret2 \
--gmail1 --gmail2
-Or, replacing what does --gmail1 --gmail2 (values are from imapsync 1.970):
+Or, replacing what does --gmail1 --gmail2 (values are from imapsync 2.155):
imapsync \
--host1 imap.gmail.com \
@@ -251,6 +251,7 @@ imapsync \
--maxbytesafter 1_000_000_000 \
--automap \
--maxsleep 2 \
+ --useheader X-Gmail-Received --useheader Message-Id \
--synclabels \
--resynclabels \
--exclude "\[Gmail\]$" \
diff --git a/FAQ.d/FAQ.ISP.txt b/FAQ.d/FAQ.ISP.txt
index 501d820..1154751 100644
--- a/FAQ.d/FAQ.ISP.txt
+++ b/FAQ.d/FAQ.ISP.txt
@@ -1,5 +1,5 @@
#!/bin/cat
-$Id: FAQ.ISP.txt,v 1.9 2018/05/24 11:34:30 gilles Exp gilles $
+$Id: FAQ.ISP.txt,v 1.13 2021/12/06 20:02:39 gilles Exp gilles $
This document is also available online at
https://imapsync.lamiral.info/FAQ.d/
@@ -9,36 +9,24 @@ https://imapsync.lamiral.info/FAQ.d/FAQ.ISP.txt
Imapsync tips for ISP. Specific issues and solutions.
=======================================================================
-* IMAPSync - usage scenario with ISP - by Flávio Zarur Lucarelli.
+* IMAPSync - usage scenario with ISP - by Flavio Zarur Lucarelli (https://www.lucanet.com.br)
-I thought Id write a quick step by step on my attempts to learn the
-imapsync features that matter the most, so it works as we expected in
-the cenario in which we use it, which is to migrate customers from
+I thought I had to write a quick step by step on my attempts to learn
+the imapsync features that matter the most, so it works as we expected
+in the scenario in which we use it, which is to migrate customers from
their old ISP to our ISP/email hosting. Thanks to the master Gilles
Lamiral for all his help and hard work.
First of all, remember to use --dry to test things first always and
check the log file to see what would actually happen.
-Initially, I used a method where I'd do an exact sync of source to
-destination, deleting messages which were in destination, but not
-source. I call this "Method 2", below. In this cenario, customer
-shouldn't be using the destination account yet. Then, after I switch MX,
-I'd do a final sync based on date. The big advantage of this is, you
-get an exact sync.
-
-Easier, however, is method 1, where I sync based on message ID, this
-way, I can use the same syntax before and after MX change, with no
-worries. Only disadvantage, you might not get an exact sync, there
-might be some difference in terms of total emails in folders, due to
-duplicates, emails that had same message ID in source server.
-
-* Method 1 - sync based on message ID, can use same syntax before and
- after MX change
+This type of copy keeps destination exactly like source (except, it doesn't
+copy duplicates), so use it ONLY before changing your MX to the new server,
+as it will delete whatever is in destination which isn't in source.
imapsync --host1 imap.myisp.com --user1 user@domain.com --password1 pwd \
--host2 imap.myisp.com --user2 user@domain.com --password2 pwd \
- --addheader
+ --subscribeall --delete2 --delete2folders --addheader
Note: add header adds message ID when it doesn't exist.
@@ -46,57 +34,141 @@ This syntax can also be used to sync different source accounts to one
same destination account, simply execute it as many times as desired,
switching source user (user1).
-* Method 2 - exact sync source do destination, then sync based on date
- after MX change
+If you have a list of accounts to sync, use this:
+https://imapsync.lamiral.info/examples/sync_loop_unix.sh
-My first goal is to have an exact sync of an account from
-current/source host to the new/destination host and be able to sync
-several times. The --useuid parameter is very important for that
-purpose. This is what I use:
+Adjust the parameters according to the original syntax which I
+explained above.
- imapsync --host1 imap.gmail.com --user1 user@domain.com --password1 pwd --ssl1 \
- --host2 imap.myisp.com --user2 user@domain.com --password2 pwd --ssl2 \
- --useuid --delete2 --delete2folders
+The Sync loop Unix script now outputs an error log, which can be
+useful.
-This makes it so imap.myisp.com (destination) is an exact copy of the
-account at imap.gmail.com (source). This is not a problem, since the
-user is not using the new host yet. ]You can check Imapsync log files
-and surely you will see the final difference should be 0. Check also
-for any possible errors in the log (search for "error").
+We also have shell scripts to check for errors, such as:
-The second goal is to lower the TTL (ex: 5 min) for the host
-associated with the MX record, in the domain's DNS server. Let's say
-customer has a host mail which his MX points to, with a high TTL
-(usually 1 hour). Lower it to 5 min so that, when you change the MX,
-it propagates faster.
+- Accounts over quota
+
+grep -R "EXIT_OVERQUOTA" *.txt
+
+- Login error
+
+grep -R "Error login" *.txt
+
+- Check just critical errors
+
+egrep 'EXIT_AUTHENTICATION_FAILURE|EXIT_CONNECTION_FAILURE|EXIT_TLS_FAILURE|EXIT_OVERQUOTA' *.txt
+
+- Check all sorts of errors (can be too much info)
+
+grep 'Exiting with return value' *.txt | grep -v 'Exiting with return value 0'
+
+Also, I like to check log file sizes and compare account sizes on
+source and destination.
+
+--
+
+Back to it.
+
+After you do a full sync, check that everything is consistant and
+let's proceed to the final stage.
+
+Lower the TTL (ex: 5 min) for the host associated with the MX record,
+in the domain's DNS server. Let's say customer has a host mail which
+his MX points to, with a high TTL (usually 1 hour). Lower it to 5 min
+so that, when you change the MX, it propagates faster.
When comes time to switch over to the new host, do a final sync with
above syntax, before changing the MX. Then, change the MX and tell
your users to start using exclusively the new host.
A few hours after the MX change, we will run Imapsync again. We have
-to start preserving emails users move or flag in the new host, which
+to start preserving emails users move or flags in the new host, which
they started using, so we can't do an exact sync anymore.
-The best solution for me was to Sync any new emails (maxage:1) from
-source (that could arrive in source even after MX change, due to
-cache) and delete such emails from source server. This way, customer's
-mailbox is still intact on the source server, except new emails, which
-get synced to new server and deleted from source.
+One simple solution is the same syntax as before, but without
+--delete2 and --delete2folders.
- imapsync --host1 imap.gmail.com --user1 user@domain.com --password1 pwd --ssl1 \
- --host2 imap.myisp.com --user2 user@domain.com --password2 pwd --ssl2 \
- --folder INBOX --useuid --noexpungeaftereach --skipemptyfolders --maxage 1 --delete1
+So:
-I personally prefer to keep a copy of users box intact in source, but
-if that's not an issue for you, you can remove --folder INBOX and even
---maxage, but then, all emails in source will be deleted. You can use
---maxage 1 with --delete1, however, for all folder (without specifying
---folder INBOX), so only any new email that arrives at source is
-copied to destination and deleted from source.
+ imapsync --host1 imap.myisp.com --user1 user@domain.com --password1 pwd \
+ --host2 imap.myisp.com --user2 user@domain.com --password2 pwd \
+ --subscribeall --addheader
-My next goal was to automate the process, so I followed this advice:
-http://imapsync.lamiral.info/examples/sync_loop_unix.sh
+The only issue with that syntax is, it would simply copy what is in
+source that is not in destination. For example, user might have moved
+emails to some sub-folder in host2. However, if you do this once, one
+hour after MX change, for example, it's comprehensible that
+destination is not exactly as the source anymore.
+
+What we've been doing, especially in the case of huge migrations,
+since our destination server auto-archives emails in sub-folders and
+changes the hierarchy, is syncing just the last day or few days of
+email and just of INBOX.
+
+So we do the sync initially explained in this doc, before the MX
+change. Then we auto-archive accounts and after auto-archiving, we
+change MX and do a final sync using maxage.
+
+Something like this:
+
+ imapsync --host1 imap.myisp.com --user1 user@domain.com --password1 pwd \
+ --host2 imap.myisp.com --user2 user@domain.com --password2 pwd \
+ --subscribeall --addheader --maxage 1
+
+If your last full sync was 2 days ago, then use --maxage 2
+
+Goal is to get all the new emails (2 last days) from source.
+
+Another alternative for syncing after the MX change, which Lamiral
+suggests, involves deleting emails from source from the last day.
+I prefer the method explained above. Anyway, here is this other cenario...
+
+Something like this:
+
+ imapsync --host1 imap.gmail.com --user1 user@domain.com --password1 pwd --ssl1 \
+ --host2 imap.myisp.com --user2 user@domain.com --password2 pwd --ssl2 \
+ --folder INBOX --noexpungeaftereach --skipemptyfolders --maxage 1 --delete1
+
+This way, any new email that arrived at source is copied to
+destination and deleted from source. Without the --delete1 option,
+messages moved on host2 by the user are coming back from host1, and
+flags changed on host2 are also reset to what they are on host1.
+
+However, as I wrote before, if you run it just once without --delete1,
+perhaps not that bad.
+
+*** Other tips for ISPs
+
+1) Sync entire account into 1 folder of another account
+
+ imapsync --host1 xxx --user1 user1@domain.com --password1 secret1 --ssl1 \
+ --host2 yyy --user2 user2@domain.com --password2 secret2 --ssl2 \
+ --addheader --subfolder2 "otheraccountfolder" --delete2 --delete2foldersonly /otheraccountfolder/
+
+Above, user must not be using such destination folder in destination
+account until you finish syncing.
+
+I've used it without --delete2 and --delete2foldersonly, as it caused
+problems for us, of that folder being unsubscribed in destination...
+Don't think it should be a problem as this copy is done usually
+without using really using the folder in host2 until you instruct him
+to.
+
+Another nice scenario, sync just one folder hierarchy of an account to
+another folder of another account.
+
+--subfolder1 test --subfolder2 test2 --delete2 --delete2foldersonly /test2/ --addheader
+
+Also, very useful is to be move emails older than one year, from an
+account to another one, to offload the source account.
+
+imapsync ... --subfolder2 "account_user1" --addheader --minage 365 --delete1
+
+So everything older than 365 days is deleted from source. You can even
+specify same account for source and recipient, if you want to "delete
+older than x days" for the account itself, without moving old emails
+to another account.
+
+2) Translate folder names
I also ended up requiring a regex to translate folder names. On the
old server (Gmail), Sent items were in a folder called [Gmail]/E-mails
@@ -110,17 +182,21 @@ So this was added:
--regextrans2 "s,Lixeira,Trash," \
--regextrans2 "s,Rascunhos,Drafts,"
-*** Other cenarios
+Option --automap is also good to do most of the translate job.
-- Sync entire account into 1 folder of another account
+3) Folders to exclude, to speed up syncs, etc.
- imapsync --host1 xxx --user1 user1@domain.com --password1 secret1 --ssl1 \
- --host2 yyy --user2 user2@domain.com --password2 secret2 --ssl2 \
- --useuid --subfolder2 otheraccountfolder --delete2 --delete2foldersonly /otheraccountfolder/
+--exclude "^Backups" --exclude "(?i)spam" --exclude "(?i)junk" --exclude "(?i)trash" --exclude "(?i)lixeira" --exclude "(?i)Deleted Items"
-Above is based on message UID, advantage of no dupes, however, user
-must not be using such destination folder in destination account until
-you finish syncing.
+4) Delete older than 1 year from an account.
+
+Use the account itself as source and destination and use:
+
+--minage 365 --delete1
+
+5) Check size of folders in an account. Use Imapsync with same account as source and destination, with this parameter:
+
+--justfoldersizes
=======================================================================
=======================================================================
diff --git a/FAQ.d/FAQ.Logfile.txt b/FAQ.d/FAQ.Logfile.txt
new file mode 100644
index 0000000..cbffe37
--- /dev/null
+++ b/FAQ.d/FAQ.Logfile.txt
@@ -0,0 +1,41 @@
+$Id: FAQ.Logfile.txt,v 1.2 2021/07/23 12:27:31 gilles Exp gilles $
+
+This documentation is also available online at
+https://imapsync.lamiral.info/FAQ.d/
+https://imapsync.lamiral.info/FAQ.d/FAQ.Logfile.txt
+
+
+======================================================================
+ Imapsync log file
+======================================================================
+
+Questions answered in this FAQ are:
+
+Q. I have these error "could not be fetched", like thos one:
+Err 1/1: - msg INBOX/17219 {0} S[36592] F[] I[16-Jul-2021 12:04:15 +0000] could not be fetched
+What can I do about it?
+
+Now the questions again with their answers.
+
+======================================================================
+Q. I have these error "could not be fetched", like thos one:
+Err 1/1: - msg INBOX/17219 {0} S[36592] F[] I[16-Jul-2021 12:04:15 +0000] could not be fetched
+What can I do about it?
+
+
+R. Explanation of a log line:
+
+- msg INBOX/17219 {0} S[36592] F[] I[16-Jul-2021 12:04:15 +0000]
+
+INBOX = folder
+17219 = UID
+{0} = got 0 bytes
+S[36592] = should have got 36592 bytes (RFC size announced)
+F[] = Flags, none here
+I[16-Jul-2021 12:04:15 +0000] = Internal date
+
+Usually this error doesn't appear on next runs, at least not for the
+same messages. So rerun imapsync until all messages are synced.
+
+======================================================================
+======================================================================
\ No newline at end of file
diff --git a/FAQ.d/FAQ.Massive.txt b/FAQ.d/FAQ.Massive.txt
index 46917a3..095af1c 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.31 2020/10/15 01:53:52 gilles Exp gilles $
+$Id: FAQ.Massive.txt,v 1.32 2021/11/01 11:30:48 gilles Exp gilles $
This document is also available online at
https://imapsync.lamiral.info/FAQ.d/
@@ -56,9 +56,9 @@ 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.
It's a mean, measured upon various different syncs, coming from
- 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.
+ the online service /X where the network card flow rate is 200 Mbps
+ (Rx 100 Mps, Tx 100 Mps) and the provider bandwidth is also 200 Mbps.
+ The maximum global rate seen is 22 MiB/s (176 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).
diff --git a/FAQ.d/FAQ.Messages_Too_Big.txt b/FAQ.d/FAQ.Messages_Too_Big.txt
index aba8cfd..82f5e58 100644
--- a/FAQ.d/FAQ.Messages_Too_Big.txt
+++ b/FAQ.d/FAQ.Messages_Too_Big.txt
@@ -1,5 +1,5 @@
#!/bin/cat
-$Id: FAQ.Messages_Too_Big.txt,v 1.5 2021/06/22 15:31:39 gilles Exp gilles $
+$Id: FAQ.Messages_Too_Big.txt,v 1.8 2021/12/16 11:44:26 gilles Exp gilles $
This document is also available online at
https://imapsync.lamiral.info/FAQ.d/
@@ -11,76 +11,128 @@ https://imapsync.lamiral.info/FAQ.d/FAQ.Messages_Too_Big.txt
Questions answered in this FAQ are:
-Q. What does imapsync with big messages?
+Q. Imapsync reports errors like these ones:
+ "could not append...Maximum size of appendable message has been exceeded"
+ "could not append...maximum message size exceeded"
+ "The most frequent error is ERR_APPEND_SIZE"
+ What does it mean?
+
+Q. Does imapsync limits big messages?
+
+Q. What are the well known servers messages size limits?
Q. What can I do to transfer messages bigger than what allows the
imap destination server?
+Q. The solution --truncmess xxxx doesn't work with Gmail.
+ What can I do?
+
+
Now the questions again with their answers.
=======================================================================
-Q. What does imapsync with big messages?
+Q. Imapsync reports errors like these ones:
+ "could not append...Maximum size of appendable message has been exceeded"
+ "could not append...maximum message size exceeded"
+ "The most frequent error is ERR_APPEND_SIZE"
+ What does it mean?
+
+R. It means the message couldn't be transferred to the destination
+ account because it is too big, imapsync tries to APPEND it to the
+ server (that's IMAP jargon) but the server refuses it by saying
+ either "NO. Maximum size of appendable message has been exceeded"
+ or "NO. maximum message size exceeded".
+
+
+=======================================================================
+Q. Does imapsync limits big messages?
+
+R. No. Imapsync synchronizes messages no matter their sizes.
-R. By default, imapsync checks if the host2 imap server announces a
-message size limit with "APPENDLIMIT=xxxx" in its CAPABILITY response.
-Then imapsync takes this value to set automatically the --maxsize
-option, unless --maxsize is already set on the command line and has a
-smaller value than the APPENDLIMIT value.
-
-If the host2 imap server doesn't announce any message size limit then
-imapsync syncs all messages no matter their sizes.
-
When a message is copied to the destination server, the destination
-server accepts it or not but it does it as a whole, it takes the full
-message or nothing. Nothing triggers an error in imapsync.
+server accepts it or not. It does it as a whole, it takes the full
+message or nothing. The destination server can refuse a too big
+message, it then triggers an APPEND error message in imapsync.
- * Gmail announces APPENDLIMIT=35651584 (June 2021).
- * Office365 announces nothing.
- * Dovecot announces nothing.
- * Usually imap servers announce nothing.
+So far, December 2021, the biggest message transferred by imapsync on
+the online /X service is 1.51 GiB. Who can top that?
+
+
+=======================================================================
+Q. What are the well known servers messages size limits?
+
+ * Gmail message size limit is 35 MB.
+ Gmail announces APPENDLIMIT=35651584 (June 2021).
+
+ * Office365 message size limit is 45 MB by default
+ and it can be upped by configuration. See
+ https://imapsync.lamiral.info/FAQ.d/FAQ.Office365.txt
+ Q. I see "NO Maximum size of appendable message has been exceeded"
+
+ * Exchange message size limit is 10 MB by default
+ and it can be upped by configuration. See
+ https://imapsync.lamiral.info/FAQ.d/FAQ.Exchange.txt
+ Q. I see "NO Maximum size of appendable message has been exceeded"
+
+ * Dovecot message size limit is variable. It is defined
+ by the sysadmin. For example, quota_max_mail_size = 100M
+ https://doc.dovecot.org/configuration_manual/quota/
+
+ * Usually, any IMAP server has a message size limit, defined
+ by the sysadmin. You discover it sooner or later
=======================================================================
Q. What can I do to transfer messages bigger than what allows the
imap destination server?
-R1. A solution is to truncate the message to the maximum size allowed
-before copying it to host2. That's a little dirty but it's ok if you
-prefer having a truncated message than no message at all. The
-attachments after the truncation won't be available but everything
-before should be ok. It may also depend on the software tool reading
-the email message.
+R1. A solution is ask imapsync to truncate the message to the maximum
+size allowed before copying it to host2 by using the option
+--truncmess.
-For example, Gmail currently limits messages to 35651584 bytes,
-aka 34 MiB (June 2021),
+That's a little dirty but it's ok if you prefer having a truncated
+message than no message at all. The attachments after the truncation
+won't be available but everything before should be ok. It may also
+depend on the software tool reading the email message.
-Starting with imapsync release 1.938 option --truncmess xxxx truncates
-messages bigger than the given size xxxx, size given in bytes.
- imapsync --truncmess 35651584 --appendlimit 1000000000000
+To truncate messages to 10 MB, use:
-The --appendlimit option is only needed imap servers that offer the
-APPENDLIMIT capability, for example, Gmail. Using it doesn't hurt
-anyway.
-
-Prior to imapsync release 1.938, instead of --truncmess:
-
-On Linux, use:
-
- imapsync ... --pipemess 'perl -0ne "print substr \$_,0,35651584" '
-
-On windows, use (I'm not sure of, not tested yet):
-
- imapsync ... --pipemess "perl -0ne 'print substr $_,0,35651584' "
+ imapsync ... --truncmess 10_000_000
R2. A not-so-dirty solution would be to transform the big messages,
-replace the attachments with links to the attachments stored elsewhere.
-Well, it's not done and it's too much complicated compared to a simpler
-solution which is to allow bigger messages on the destination account.
+replace the attachments with links to the attachments stored
+elsewhere. Well, it's not done and it's too much complicated compared
+to a simpler solution which is to allow bigger messages on the
+destination account.
As time goes on, disk space is cheaper and cheaper. Don't make the
-new user account, the destination account, worst than his previous,
-buy disks. Monitor and rule your resources, not the users.
+new user account, the destination account, worst than his previous
+account: buy disks.
+
+Monitor and rule your hardware resources, serve your users,
+not the contrary.
+
+
+=======================================================================
+Q. The solution --truncmess xxxx doesn't work with Gmail.
+ What can I do?
+
+R. Gmail currently limits messages size up to 35651584 bytes, aka 34
+ MiB (June 2021) but imapsync knows it so it avoid to transfer these
+ big messages. Solution, use:
+
+ imapsync ... --truncmess 35_651_584 --appendlimit 1_000_000_000_000
+
+Explanation. By default, imapsync checks if the host2 imap server
+announces a message size limit with "APPENDLIMIT=xxxx" in its
+CAPABILITY response, like Gmail does. Imapsync takes this APPENDLIMIT
+value to set automatically the --maxsize option, unless --maxsize is
+already set on the command line and has a smaller value than the
+APPENDLIMIT value.
+
+1_000_000_000_000 is one TB, I guess you don't have any message of
+that size yet.
=======================================================================
=======================================================================
diff --git a/FAQ.d/FAQ.Migration_Plan.txt b/FAQ.d/FAQ.Migration_Plan.txt
index e52a9a7..1b92d0d 100644
--- a/FAQ.d/FAQ.Migration_Plan.txt
+++ b/FAQ.d/FAQ.Migration_Plan.txt
@@ -1,5 +1,5 @@
#!/bin/cat
-$Id: FAQ.Migration_Plan.txt,v 1.7 2021/03/02 22:31:36 gilles Exp gilles $
+$Id: FAQ.Migration_Plan.txt,v 1.9 2021/12/19 10:00:32 gilles Exp gilles $
This document is also available online at
https://imapsync.lamiral.info/FAQ.d/
@@ -8,23 +8,23 @@ https://imapsync.lamiral.info/FAQ.d/FAQ.Migration_Plan.txt
=====================================================================
Imapsync. Suggestions for a good, low impact on users,
- well executed email migration plan.
+ well-executed email migration plan.
=====================================================================
-There is two main different scenarios depending on the response to the
-following question:
+There are two main different scenarios. Choosing which one fits your
+context depends on the response to the following question:
-Will the imap software tools used by the users use the exact same
+Will the imap software tools used by the users use the same
credentials triplet for both imap servers, the old server host1 and
the new server host2?
The credentials triplet is hostname/username/password.
-If the answer is yes, ie, clients email tools use the exact same
-triplet credentials, then it is possible to perform a migration
-without changing anything on the users side. This may be a very time
-saving option. But it's a rare condition so I'll describe this
-scenario later in this document.
+If the answer is yes, ie, clients' email tools use the same triplet
+credentials, then it is possible to perform a migration without
+changing anything on the users' side. This may be a very time-saving
+option. But it's a rare condition so I'll describe this scenario later
+in this document.
=====================================================================
@@ -40,104 +40,124 @@ Classical scenario, credentials triplets are different on both sides
users are already playing with the new mailboxes on host2, don't
follow this scenario.
- * Presync all the mailboxes from the old server host1 to the new
- server host2. If the imap server names are going to change their IP
- resolution then don't use those names, use names that will always
+ * Pre-synchronize all the mailboxes from the old server host1 to the
+ new server host2. If an imap server name is going to change its IP
+ address, then don't use this name, use a name that will always
match the same imap servers, or use their IP addresses.
- Presyncs can usefully be done with --delete2 in order to get an
- exact sync. But never use the option --delete2 once users have
- started to play with their new account on host2, their play will be
- lost on the next presync, or when the MX is changed, since INBOX
- will start to receive new messages that are not on host1.
+ Pre-synchronizations can usefully be done with --delete2 to get an
+ exact synchronization. But never use the option --delete2 once the
+ users have started to play with their new account on host2, their
+ play will be lost on the next synchronization. Don't use --delete2
+ either when the MX is changed since INBOX will start to receive new
+ messages that are not on host1 and then removing them is not a good
+ idea.
* Decide a migration day/hour.
- * Repeat the presyncs (with the --delete2 options) daily until the
- migration hour. This repeated process will show how long should
- take the last sync.
+ * Repeat the pre-synchronizations (with the --delete2 options) daily
+ until the migration hour. This repeated process will show how long
+ should take the last synchronization.
* At the migration hour, cut access to the users to the old server
host1, if you can. Or tell them to not use it anymore.
- * Do a last presync exactly like previous ones.
+ * Do the last pre-synchronization exactly like the previous ones.
* Change the MX, the new messages should start to arrive in the new
imap server host2.
- * Wait the TTL value, aka 5 minutes. Now, new messages should
- not arrive to the old server host1.
+ * Wait for the TTL value, aka 5 minutes. Now, new messages should
+ not arrive at the old server host1.
* Tell the users that the old imap server host1 is down and no
longer available.
- * Do a postsync. A postsync is a sync with the following options
- --maxage 1 --delete1 --folder INBOX
+ * Do a post-synchronization. A post-synchronization is a run with the
+ following options: --folder INBOX --delete1 --maxage 1
- This postsync will move the last new messages arrived on host1 to
- host2 during the TTL interval and delete them on host1. Do not use
- the option --delete2 in a postsync.
+ This post-synchronization will copy the messages arrived in the
+ last day (--maxage 1) in the folder INBOX (--folder INBOX) on the
+ source account, to the destination account. It will also delete
+ them on host1 (--delete1). It's --delete1, it's not --delete2.
+ Remember, do not use the option --delete2 in a post
+ synchronization, as users won't appreciate seeing their newly
+ arrived messages disappear because of you.
* Give access to new accounts to the users with their new credential
triplet hostname/username/password. If the way to contact users is
- email then you should give this long before shutting down the old
- server.
+ by email then you should give them the new credentials long before
+ shutting down the old server.
* Migration done.
* In case there are still messages arriving at the old imap server
- host1, you can perform more postsyncs, ie, syncs every day
- with the options:
- --maxage 1 --delete1 --folder INBOX
+ host1, you can perform more post-synchronizations, ie, runs every
+ day with the options: --maxage 1 --delete1 --folder INBOX
+ * Increase the TTL of the MX back to its previous value, usually
+ 24 hours, 86400 seconds. You don't want all your email system
+ to break down completely when your DNS are not available
+ temporarily, keeping dns values in cache for a 24h is a savvy
+ practice.
=====================================================================
Lucky scenario, credentials triplets are the same on both sides
=====================================================================
* Decrease the TTL of the MX, as well as the imap hostname resolution,
- to 5 minutes (or even less). See FAQ.TTL.txt to understand why.
+ to 5 minutes (or even less). The document FAQ.TTL.txt explains why.
* Create the new mailboxes on the destination server host2.
- * Presync all the mailboxes from the old host1 to the new server host2,
- using different names that the ones used by the imap software
- clients (use their IP for example).
- Presyncs have to be done with --delete2 but never use --delete2
- once users have started playing with their new account on host2.
+ * Pre-synchronize all the mailboxes from the old host1 to the new
+ server host2, using different names than the ones used by the imap
+ software clients (use their IP for example). Presyncs have to be
+ done with --delete2 but never use --delete2 once users have started
+ playing with their new account on host2.
* Decide a migration day/hour.
- * repeat the presyncs (with the --delete2 options) daily until the
- migration hour. This repeated process will show how long should
- take the last sync.
+ * Repeat the pre-synchronizations (the runs with the --delete2
+ options) daily until the migration hour. This repeated process will
+ show how long should take the last sync.
* At the migration hour, cut access to the users to the old server.
You can do this by changing the imap host1 hostname to a non-imap
server for example, or by changing their password on host1.
- * Do a last sync exactly like the presyncs, not using the imap hostname.
+ * Do the last run exactly like the pre-synchronizations.
* Change also the MX resolution, the new messages should start
to arrive in the new imap server very soon.
- * Wait the TTL value, aka 5 minutes. Now, new messages should
- not arrive to the old server host1.
+ * Wait for the TTL value, aka 5 minutes. Now, new messages should
+ not arrive at the old server host1.
- * Do a postsync. A postsync is a sync with the following options
- --maxage 1 --delete1 --folder INBOX
+ * Do a post-synchronization. A post-synchronization is a run with the
+ following options: --folder INBOX --delete1 --maxage 1
- This postsync will move the last new messages arrived on host1 to
- host2 during the TTL interval and delete them on host1. Do not use
- the option --delete2 in a postsync.
+ This post-synchronization will copy the messages arrived in the
+ last day (--maxage 1) in the folder INBOX (--folder INBOX) on the
+ source account, to the destination account. It will also delete
+ them on host1 (--delete1). It's --delete1, it's not --delete2.
+ Remember, do not use the option --delete2 in a post
+ synchronization, as users won't appreciate seeing their newly
+ arrived messages disappear because of you.
- * Shutdown the old imap server.
+ * Shut down the old imap server.
* Change the user imap hostname resolution from the old IP of host1
to the IP of the new imap server host2.
* Migration done.
+ * Increase the TTL of the MX back to its previous value, usually
+ 24 hours, 86400 seconds. You don't want all your email system
+ to break down completely when your DNS are not available
+ temporarily, keeping dns values in cache for a 24h is a savvy
+ practice.
+
=======================================================================
=======================================================================
diff --git a/FAQ.d/FAQ.Office365.txt b/FAQ.d/FAQ.Office365.txt
index 4e159c4..8a0cc39 100644
--- a/FAQ.d/FAQ.Office365.txt
+++ b/FAQ.d/FAQ.Office365.txt
@@ -1,5 +1,5 @@
-$Id: FAQ.Office365.txt,v 1.23 2021/07/06 02:30:01 gilles Exp gilles $
+$Id: FAQ.Office365.txt,v 1.33 2022/01/05 11:17:21 gilles Exp gilles $
This documentation is also available online at
https://imapsync.lamiral.info/FAQ.d/
@@ -14,14 +14,24 @@ Questions answered in this FAQ are:
Q. Can I use imapsync to transfer from or to Office365 accounts?
-Q. Does IMAPSync support OAUTH2 authentication in Office 365?
+Q. Can imapsync work for users that are administrators for
+an Office 365 domain? (quick answer: no)
+
+Q. Does imapsync support OAUTH2 authentication for Office365 accounts?
Q. How to sync from Office365 to XXX?
Q. How to sync from XXX to Office365
Q. For Office365 I have double and triple-checked the username and
- password spelling but I still get a "LOGIN failed". Any clue?
+password spelling but I still get a "LOGIN failed". Any clue?
+
+Q. How can I access an Office365 shared mailbox?
+
+Q. How can I use a shared account as a backup account for several
+mailboxes and so avoid spending too many dollars in backup accounts?
+
+Q. Office365 fails with "User is authenticated but not connected".
Q. I see "NO Maximum size of appendable message has been exceeded"
What can I do with that?
@@ -33,6 +43,8 @@ Q. Office365 throttles the sync and says:
"Request is throttled. Suggested Backoff Time: 299961 milliseconds".
What can I do with that?
+Q. What are the receive and sending limits of Office365?
+
Q. The sync fails with many "Trying command when NOT connected!".
What can I do?
@@ -68,20 +80,101 @@ Now the questions again with their answers.
======================================================================
Q. Can I use imapsync to transfer from or to Office365 accounts?
-R. Yes. But IMAP access to Office365 account is not always allowed by default
- so it has to be allowed in the server configuration part.
+R0. Yes. But IMAP access to Office365 account is not always allowed
+by default so it has to be allowed in the server configuration part.
https://docs.microsoft.com/en-us/exchange/clients-and-mobile-in-exchange-online/pop3-and-imap4/enable-or-disable-pop3-or-imap4-access
https://docs.microsoft.com/en-us/exchange/troubleshoot/configure-mailboxes/pop3-imap-owa-activesync-office-365
+R1. Imapsync doesn't support OAUTH2 authentication for Office365
+accounts yet. That's not totally true, if you have an access token
+to access your mailbox then you can authenticate with imapsync this
+way:
+
+ imapsync ... --oauthaccesstoken1 tokenfile
+
+where "tokenfile" is a file containing the access token.
+
+R2. Enable double-step authentication and configure it but after use
+an "app password" with imapsync. Details:
+
+a) Go to
+https://account.microsoft.com/security
+
+b) Click on "Advanced Security Options"
+Turn "Two-step verification" on. Follow the steps and finish".
+
+c) Then now "App passwords" is available.
+Click on "Create a new app password".
+Use this password to authenticate with imapsync.
+
+d) Delete this app password when the job with imapsync is finished.
+
+R3. Also, check a license is assigned to that account in Office365.
+
+R4. Microsoft introduced something called "security defaults" which is enabled
+by default for new tenants. One of the rules blocks IMAP access as of imapsync.
+
+The funny thing is that you can't disable a single rule of this
+security package without buying additional licenses.
+Switching the whole thing off allows the IMAP login.
+
+Also, disable double-step authentication on the Azure/Active Directory portal.
+See here:
+https://docs.microsoft.com/en-us/azure/active-directory/fundamentals/concept-fundamentals-security-defaults
+Thanks to Stephan Buhre for this R4 answer.
+
+R5. Are there special characters in the password?
+ https://imapsync.lamiral.info/FAQ.d/FAQ.Authentication_failure.txt
+ https://imapsync.lamiral.info/FAQ.d/FAQ.Passwords_on_Windows.txt
+ https://imapsync.lamiral.info/FAQ.d/FAQ.Passwords_on_Unix.txt
+ https://imapsync.lamiral.info/FAQ.d/FAQ.Passwords_on_Mac.txt
+
+R6. Triple check the hostname then. Try all of these:
+ * outlook.office365.com
+ * imap-mail.outlook.com
+ * imap.outlook.com
+
+======================================================================
+Q. Can imapsync work for users that are administrators for
+an Office 365 domain? (quick answer: no)
+
+R. I doesn't seem possible to use imap for administrators, so imapsync
+won't be able to work for an administrator's mailbox.
+See:
+https://github.com/imapsync/imapsync/issues/310#issuecomment-1002396218
+https://exhaust.lewiscollard.com/post/146866104/office365-to-migadu-migration/
+
+Solution: as explained in the article above, use Davmail as a proxy to
+access this mailbox. http://davmail.sourceforge.net/
+
+Thanks to Lewis Collard for this report and solution.
+
======================================================================
Q. Does imapsync support OAUTH2 authentication for Office365 accounts?
-R. No. But I plan to add it during the year 2021.
+R. Yes but partially. Imapsync won't help you getting an access token
+but if you have one then you can use it with imapsync this way:
+
+Office365 as source:
+
+ imapsync ... --oauthaccesstoken1 tokenfile1
+
+Office365 as destination:
+
+ imapsync ... --oauthaccesstoken2 tokenfile2
======================================================================
Q. How to sync from Office365 to XXX?
+R0. IMAP is not enabled by default on Office365, see how to enable it:
+https://docs.microsoft.com/en-us/exchange/clients-and-mobile-in-exchange-online/pop3-and-imap4/enable-or-disable-pop3-or-imap4-access
+https://docs.microsoft.com/en-us/exchange/troubleshoot/configure-mailboxes/pop3-imap-owa-activesync-office-365
+
+If IMAP cannot be enabled or if it doesn't work well, you can try DavMail
+(http://davmail.sourceforge.net/) which acts as an IMAP gateway
+through Outlook Web Access.
+
R. On Windows, use:
imapsync.exe ... --office1
@@ -141,42 +234,65 @@ Use it like this:
It often does some miracles on messages.
======================================================================
-Q. For Office365 I have double and triple-checked the username and
- password spelling but I still get a "LOGIN failed". Any clue?
+Q. For Office365 I have double and triple-checked the username and
+password spelling but I still get a "LOGIN failed". Any clue?
-R0. Imapsync doesn't support OAUTH2 authentication for Office365 accounts yet.
+R. Go to "Q. Can I use imapsync to transfer from or to Office365 accounts?"
-R1. Disable double-step authentication, also known as 2-factor,
- 2-step authentication on the Azure/Active Directory portal.
+======================================================================
+Q. How can I access an Office365 shared mailbox?
-R2. Also, check a license is assigned to that account in Office365.
+R. First, create a shared mailbox, for example shared@example.com.
+Then give full permissions to a licensed account user@example.com.
+Now with imapsync, use the licensed user login with the syntax:
-R3. Microsoft introduced something called "security defaults" which is enabled
-by default for new tenants. One of the rules blocks IMAP access as of imapsync.
-The funny thing is that you can't disable single rules of this security
-package without buying additional licenses.
-Switching the whole thing off allows the login.0
-Also, disable double-step authentication on the Azure/Active Directory portal.
-See here:
-https://docs.microsoft.com/en-us/azure/active-directory/fundamentals/concept-fundamentals-security-defaults
-Thanks to Stephan Buhre for this R3 answer.
+ user@example.com\shared@example.com
-R4. Are there special characters in the password?
- https://imapsync.lamiral.info/FAQ.d/FAQ.Authentication_failure.txt
- https://imapsync.lamiral.info/FAQ.d/FAQ.Passwords_on_Windows.txt
- https://imapsync.lamiral.info/FAQ.d/FAQ.Passwords_on_Unix.txt
- https://imapsync.lamiral.info/FAQ.d/FAQ.Passwords_on_Mac.txt
+and the password for user@example.com
-R5. Triple check the hostname then. Try all of these:
- * outlook.office365.com
- * imap-mail.outlook.com
- * imap.outlook.com
+Caveat: Character \ is a special character, so
+use double-quotes around the user login, like:
+
+ imapsync ... --user1 "user@example.com\shared@example.com"
+
+Sources:
+https://adam-hand.com/2017/07/25/connect-a-shared-mailbox-from-o365-to-outlook-via-imap/
+https://www.arclab.com/en/kb/email/imap-settings-shared-mailbox-office-exchange-online.html
+https://social.technet.microsoft.com/Forums/en-US/336e02ee-6767-4810-90a0-1352bd7cc9e9/office-365-how-to-access-a-shared-mailbox-using-imap-client?forum=onlineservicesexchange
+
+======================================================================
+Q. How can I use a shared account as a backup account for several
+mailboxes and so avoid spending too many dollars in backup accounts?
+
+R. Use the option --subfolder2 backup_foo
+
+ imapsync ... --user2 sharedloginsyntax --subfolder2 backup_foo
+
+To restore, do the reverse with:
+
+ imapsync ... --user1 sharedloginsyntax --subfolder1 backup_foo
+
+
+======================================================================
+Q. Office365 fails with "User is authenticated but not connected".
+
+R1. "The message User is authenticated but not connected is due to a
+ bug in the Office365 server's IMAP implementation. If the client
+ presents a valid user name but an invalid password, the server
+ accepts the login, but subsequent commands fail with the
+ aforementioned error message." Source:
+https://unix.stackexchange.com/questions/164823/user-is-authenticated-but-not-connected-after-changing-my-exchange-password
+Thanks to James Abbottsmith for this link and explanation at
+https://github.com/imapsync/imapsync/issues/32#issuecomment-153561647
+
+R2. Miguel Alameda reported understanding and solving this issue
+ like this, the context was admin/authuser:
+ "The admin user had not permission in the target mailbox."
======================================================================
Q. I see "NO Maximum size of appendable message has been exceeded"
What can I do with that?
-
R. Office365 supports send/receive max message sizes of up to 150MB
but you need to make changes in your tenant(s) to support it.
@@ -204,14 +320,15 @@ Q. The imap connection to Office365 is not working very efficiently,
R. Yes. Try DavMail
http://davmail.sourceforge.net/
- I don't use it myself but a user, Yannick Palanque, reported great results using it.
+ I don't use it myself but a user, Yannick Palanque, reported
+ great results using it.
======================================================================
Q. The sync fails with many "Trying command when NOT connected!".
What can I do?
-R. The --debugimap option can show you more details, especially some
- message like:
+R. The --debugimap option can show you more details, especially
+ messages like this one:
"BAD Request is throttled. Suggested Backoff Time: 178755 milliseconds"
In that case, see the next faq item and its fixes.
@@ -249,6 +366,29 @@ R2. Play with options --maxbytespersecond or --maxmessagespersecond
I don't know the upper value that avoids the default throttling from 0365
and I guess it changes over time.
+======================================================================
+Q. What are the receive and sending limits of Office365?
+
+R1. 3600 messages per hour (22 July 2021). Maybe 1200 as imapsync can
+ be viewed as a single sender. Tell me what you experienced,
+ I'll update this point.
+
+https://docs.microsoft.com/en-us/office365/servicedescriptions/exchange-online-service-description/exchange-online-limits#receiving-and-sending-limits
+
+In that case, imapsync can adapt to this with (1 message/second = 3600 messages per hour)
+
+ imapsync ... --maxmessagespersecond 1
+or
+ imapsync ... --maxmessagespersecond 0.33
+
+R2. I also found "Microsoft theoretically allows for about 300MB of
+throughput per user per hour." at
+https://www.systools.in/blog/microsoft-office-365-throttling-policy/
+
+In that case, imapsync can adapt to this with (83333 bytes/second = 300 MBytes/hour)
+
+ imapsync ... --maxbytespersecond 83333
+
======================================================================
Q. Office365 refuses to create the folder named "Files" with the error
"NO Folder name is reserved". What happens?
@@ -277,12 +417,13 @@ R0. To fix this, add --exclude Files
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. This folder contains all attachments in every email
- that is in the mailbox but without any headers.
- This causes some confusion for users as these appear in their search
- results as duplicate lines but without the sender details or even
- the message body.
+R1. This folder "Files" seems to be a standard folder in Exchange Online,
+ but it is not. This folder contains all attachments in every email
+ that is in the mailbox but without any headers.
+
+ This causes some confusion for users as these appear in their search
+ results as duplicate lines but without the sender details or even
+ the message body.
This folder seems to be usually hidden so IMAP clients can’t see it,
but for some reason sometimes it becomes visible.
@@ -350,8 +491,8 @@ R3. See also the FAQ FAQ.SSL_errors.txt
Q. From XXX Office365 I get this error message sometimes:
"BAD Command Argument Error 11". What does it mean?
-R. This error message comes from the Office365 IMAP server when it
- encounters any problem. Most of the time it is one of the following:
+R. This error message comes from the Office365 IMAP server when it
+encounters any problem. Most of the time it is one of the following:
* Some messages are bigger than the size limit.
45 MB by default on Office365.
@@ -365,7 +506,7 @@ R. This error message comes from the Office365 IMAP server when it
* Quota reached. The whole account is full.
It can be upped by configuration.
- * You use --synclabels --resynclabels from a previous command line
+ * You use --synclabels --resynclabels from a previous command line
related to syncing from Gmail to Gmail. Remove them.
* Some messages have some lines too long. Use option --maxlinelength
@@ -437,7 +578,8 @@ but previously in Office365, you must do something like the following, using Pow
Note from Betsy Lawlor: You can use global modern authentication with two factor
-on Exchange Online (M365) but you must have "AllowBasicAuthImap" on the admin account you are using to migrate the mail.
+on Exchange Online (M365) but you must have "AllowBasicAuthImap" on
+the admin account you are using to migrate the mail.
Remark: PLAIN authentication is the only way to go with --authuser1 for now.
So don't use --authmech1 SOMETHING with --authuser1 admin_user,
@@ -453,7 +595,7 @@ so if two factors authentication is enabled you will no be able to sync
the mail (it will not connect to host2).
OWA (I think this is the two-factor authentication) needs to be disabled
globally and enabled individually on the users you want to.
-One account can have the rights to access other mailboxes no matter if admin or
+One account can have the right to access other mailboxes no matter if admin or
any other account but needs to have OWA disabled to be able to connect
to the office365 server.
@@ -473,8 +615,8 @@ Date: Mon, 1 Jun 2015 17:53:54 +0000
Q. Couldn't create folder [trash] "Mailbox already exists".
R. Some servers take care of character cases in folder names,
- some servers do not, like Exchange. Since not respecting the case can merge
- two different folders into one then imapsync respects the case.
+ some servers do not, like Exchange. Since not respecting the case
+ can merge two different folders into one then imapsync respects the case.
For example, if a host1 server has a folder name called "trash"
and the host2 server already has a folder "Trash" or "TRASH"
diff --git a/FAQ.d/FAQ.OnlineUI.txt b/FAQ.d/FAQ.OnlineUI.txt
index 7d6b74f..27f9f0e 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.29 2021/05/05 21:38:32 gilles Exp gilles $
+$Id: FAQ.OnlineUI.txt,v 1.31 2021/12/24 21:02:52 gilles Exp gilles $
This document is also available online at
https://imapsync.lamiral.info/FAQ.d/
@@ -38,47 +38,52 @@ Let's do it anyway, you'll be the judge.
R1. Some figures
-Date of this report: 22 April 2021.
+Date of this report: 24 December 2021. Happy Christmas!
-The online imapsync service /X started 9 January 2017
-(1564 days of service).
+The online imapsync service /X started 9 January 2017,
+5 years ago (1810 days of service).
On average, /X has 51 users per day, each user lunches on average
-6 account migrations, from just one launch to many (hundreds).
+6 account migrations, from just 1 launch to many (hundreds).
-The total volume /X transferred so far is around 210 TiB coming
-from nearly 450 000 imap account migrations and 700 million email messages.
+The total volume /X transferred so far is around 240 TiB coming
+from nearly 520 000 imap account migrations and 810 million email messages.
R2. Pros & Cons
-The online imapsync service /X runs on HTTPS only, with a
-letsencrypt certificate, a certificate overall rated "A+" at
+The online imapsync service /X runs on HTTPS only, with a letsencrypt
+certificate, an up to date certificate overall rated "A+" at
https://www.ssllabs.com/ssltest/analyze.html?d=imapsync.lamiral.info
-Because of the HTTPS usage, what the users enter in their browser,
-the imap logins and passwords, can't be eavesdropped on the network.
+Because of the HTTPS usage, what the users enter in their browser, the
+imap logins and passwords, can't be eavesdropped on the network.
-Imapsync itself takes care of encryption for the imap sessions,
-if possible. First, imapsync tries to use SSL on port 993,
-then TLS on port 143 if the servers announce TLS, then no encryption at all.
+Imapsync itself takes care of encryption for the imap sessions, if
+possible. First, imapsync tries to use SSL on port 993, then TLS on
+port 143 if the servers announce TLS, then no encryption at all.
Concerning encryption, what is done with the source imap server host1
is independent of what is done with the destination imap server host2.
-On the date of 22 April 2021, there is no security problem
-detected or reported to me (Gilles LAMIRAL), so far.
-Feel free to attack the service and feel free to report any
-hole encountered. Have in mind I can watch what you do
-from the server-side and take measures if the service suffers from
-your acts. Drop me a note before will be fair play.
+On the date of 24 December 2021, there is no security problem detected
+or reported to me (Gilles LAMIRAL), so far.
-As the owner of the service, it could have been 450 000 pairs of
-credentials collected and nearly 210 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.
+Concerning the Log4j threats, the imapsync server doesn't use Log4j at
+all, so it should be safe about this issue.
-The imap server certificates are not checked for authenticity
-(by default) because too many imap servers are crappy configured
-regarding certified certificates.
+Feel free to attack the service and feel free to report any hole
+encountered. Have in mind that I can watch what you do from the
+server-side, and then take measures if the service suffers from your
+acts. Drop me a note before will be fair play and I will let you act
+as harsh as you can.
+
+As the owner of the service, it could have been 520 000 pairs of
+credentials collected and nearly 240 terabytes of email messages.
+That's massive. 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.
+
+Concerning imapsync transfers, the imap server certificates are not
+checked for authenticity by default because too many imap servers are
+crappy configured regarding their certified certificates.
This default behavior is chosen like this because users of /X
want their emails transferred, instead of being not transferred
@@ -88,35 +93,38 @@ I admit that this part, checking imap ssl/tls certificates,
could be improved from my side by including well known
certificates directly in imapsync.
-If the imap servers don't honor ssl nor tls, then logins, passwords
-and everything will go clear text during the imap transfers.
-That's not good at all but what "comforts" me is that if an
-imap server does only clear text transfers, then it's also true
-for all the imap sessions the account owner encounters,
-imapsync is just one of them; the imap servers are then always
-unsecured for any imap software client.
+If an imap server doesn't honor ssl nor tls, then logins, passwords
+and everything will go clear text during the imap transfers. That's
+not good at all! But what "comforts" me is that if an imap server does
+only clear text transfers, then it's also true for all the imap
+sessions the account owner encounters, imapsync is just one of them;
+the imap servers are then always unsecured for any imap software
+client.
+Last point, who could be sure that no cracker cracked the online hosts
+and that he isn't currently sniffing the credentials?
-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
-the sync is a safe and recommended practice!
+the sync is a safe and recommended practice! You can even
+change the password just after imapsync has started its job,
+just after a successful login. This way you know the previously
+given password is no longer working just after imapsync has
+started its job.
=====================================================================
Q. Does the online service store any sensitive information
like my passwords?
No.
-The online passwords are kept by your browser. The goal is
-that the next time you run a sync from your browser, all the
-parameters are already there without having to re-enter them.
-The save is done when you click on the "Sync or resync" green
-button. So, if you don't want your browser to keep your password,
-enter a wrong one or empty the password field and click
-on the "Sync or resync" green button, the wrong password
-will be saved in your browser and no sync will be done,
+
+The online passwords are kept by your browser. The goal is that the
+next time you run a sync from your browser, all the parameters are
+already there without having to re-enter them. The save is done when
+you click on the "Sync or resync" green button. So, if you don't want
+your browser to keep your password, enter a wrong one or empty the
+password field and click on the "Sync or resync" green button, the
+wrong password will be saved in your browser and no sync will be done,
since a good login is mandatory to do anything on your mailboxes.
=====================================================================
diff --git a/FAQ.d/FAQ.Release_Checklist.txt b/FAQ.d/FAQ.Release_Checklist.txt
index 92b705e..4a55af5 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.20 2021/07/06 02:29:51 gilles Exp gilles $
+$Id: FAQ.Release_Checklist.txt,v 1.22 2022/01/14 12:46:38 gilles Exp gilles $
This documentation is also available online at
https://imapsync.lamiral.info/FAQ.d/
@@ -12,6 +12,16 @@ https://imapsync.lamiral.info/FAQ.d/FAQ.Release_Checklist.txt
Checklist before release a new release:
+- Make "imapsync --tests" pass on Linux
+- Make "imapsync --tests" pass on Mac
+- Make "imapsync --tests" pass on Windows 32 bits
+- Make "imapsync --tests" pass on Windows 64 bits
+
+- Make "imapsync --testslive" pass on Linux
+- Make "imapsync --testslive" pass on Mac
+- Make "imapsync --testslive" pass on Windows 32 bits
+- Make "imapsync --testslive" pass on Windows 64 bits
+
- 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
@@ -20,6 +30,11 @@ Checklist before release a new release:
- Read the OPTIONS section of README and read it very slowly
- Read slowly README_Windows.txt
- Read slowly the TUTORIAL_Unix file in html
+
+- Make "rcsdiff imapsync" give nothing relevant and exit 0
+
+- make ci pass.
+
- Review the newsletter by running:
m4 -P W/ml_announce.in.txt
diff --git a/FAQ.d/FAQ.SSL_errors.txt b/FAQ.d/FAQ.SSL_errors.txt
index 508a587..265ea25 100644
--- a/FAQ.d/FAQ.SSL_errors.txt
+++ b/FAQ.d/FAQ.SSL_errors.txt
@@ -1,14 +1,14 @@
#!/bin/cat
-$Id: FAQ.SSL_errors.txt,v 1.15 2021/06/22 15:35:10 gilles Exp gilles $
+$Id: FAQ.SSL_errors.txt,v 1.17 2021/08/01 12:49:00 gilles Exp gilles $
This document is also available online at
https://imapsync.lamiral.info/FAQ.d/
https://imapsync.lamiral.info/FAQ.d/FAQ.SSL_errors.txt
-=======================================================================
+======================================================================
Imapsync SSL errors
-=======================================================================
+======================================================================
Questions answered in this FAQ are:
@@ -25,11 +25,14 @@ Q. SSL connect attempt failed SSL
SSL connect attempt failed SSL
SSL routines:ssl_choose_client_version:unsupported protocol
+Q. fatal SSL error: SSL connect attempt failed with unknown error
+ SSL wants a read first
+
Q. How to see the certificate and identify problems in it?
Now the questions again with their answers.
-=======================================================================
+======================================================================
Q. What are the errors
DEBUG: .../IO/Socket/SSL.pm:1165: local error: SSL write error
or
@@ -45,11 +48,11 @@ it's often Exchange or Office365. I don't know what exactly happens.
Those errors happen more often on Windows than on Linux.
-=======================================================================
+======================================================================
Q. What can I do to avoid those "SSL read/write errors"?
R0. Windows users: upgrade to imapsync.exe release 1.836 (or next ones)
-Those errors don't appear with recent releases, post 1.836
+Those errors appear less often with imapsync releases post 1.836
R1. Remove all ssl/tls encryption
@@ -70,7 +73,7 @@ R5. Set up a ssltunnel proxy to the host.
Read the file FAQ.Security.txt for an example to set up
a ssltunnel proxy.
-=======================================================================
+======================================================================
Q. SSL connect attempt failed SSL
routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure
or
@@ -145,8 +148,13 @@ when they receive a TLS version 1.1 request.
In this case setting the version
to 'SSLv23:!SSLv2:!SSLv3:!TLSv1_1:!TLSv1_2' might help.
+======================================================================
+Q. fatal SSL error: SSL connect attempt failed with unknown error
+ SSL wants a read first
-=======================================================================
+R. If you're using --ssl1 or --ssl2, try instead --tls1 or --tls2
+
+======================================================================
Q. How to see the certificate and identify problems in it?
R. Use the command openssl like this:
@@ -221,5 +229,5 @@ ggEBANuPNbYLPMZ4vPa9NBoHAUdIXqpi0eqdXMXd2sT+qRmqxS5ihr999BHOROcr
...
-=======================================================================
-=======================================================================
+======================================================================
+======================================================================
diff --git a/FAQ.d/FAQ.Security.txt b/FAQ.d/FAQ.Security.txt
index afbc72c..cbadbaf 100644
--- a/FAQ.d/FAQ.Security.txt
+++ b/FAQ.d/FAQ.Security.txt
@@ -1,45 +1,122 @@
#!/bin/cat
-# $Id: FAQ.Security.txt,v 1.23 2021/06/22 15:32:10 gilles Exp gilles $
+# $Id: FAQ.Security.txt,v 1.26 2021/07/11 12:11:38 gilles Exp gilles $
This document is also available online at
https://imapsync.lamiral.info/FAQ.d/
https://imapsync.lamiral.info/FAQ.d/FAQ.Security.txt
-
=======================================================================
Imapsync tips about security. Issues and solutions.
=======================================================================
-SSL: going to encryption before the imap session start.
- It is on port 993.
+Questions answered in this FAQ are:
-TLS: going to encryption after the imap session start but before
- the credential are sent. It is on port 143.
+Q. Is running this program a secure method of transferring emails?
+ Are there any security concerns?
+
+Q. Does imapsync refer to SSL security protocols with --ssl1 and --ssl2
+ and does it refer to TLS security protocols with the --tls1 and --tls2
+ options?
+ Short answer: No.
+
+Q. I noticed that the online UI has no option for TLS/SSL.
+ Is this secure?
+ Is this more secure than using the .bat file on my computer?
+
+Q. Are transferred emails/attachments stored on any other
+ server/location aside from my originating/destination server(s)?
+
+Q. Other than changing passwords on the originating/destination email
+ accounts once the relevant emails have been moved,
+ are there any other security tips I should know?
+
+Q. I need to transfer mail from an imap server to another imap server.
+ Which ports need to be open on the firewall to make this possible?
+
+Q. Does imapsync support the IMAP command STARTTLS?
+
+Q. Does imapsync support IMAP over SSL/TLS (IMAPS)?
+
+Q. How can I test an ssl/tls imap connection without imapsync?
+
+Q. How can I manually test login using --ssl?
+
+Q. Imapsync used to use SSL_VERIFY_PEER now it uses SSL_VERIFY_NONE.
+ How can I change this back to the more secure SSL_VERIFY_PEER?
+
+Q: How can I have an imaps server?
+
+Now the questions again with their answers.
=======================================================================
Q. Is running this program a secure method of transferring emails?
Are there any security concerns?
-R. Well, it depends. Use encryption, secure the access to the host running
- imapsync and everything shall be safe.
+R. Well, it depends. Use encryption and secure access to the host running
+ imapsync then everything shall be safe.
=======================================================================
-Q. I noticed that the online UI has no option for TLS/SSL
- Is this secure? Is this more secure that using the .bat file
- on my computer?
+Q. Does imapsync refer to SSL security protocols with --ssl1 and --ssl2
+ and does it refer to TLS security protocols with the --tls1 and --tls2
+ options?
+ Short answer: No.
-R1. The online UI does TLS/SSL imap connections if the imap
- servers support TLS/SSL. If you are concerned by security then
- using the .bat file or .sh on your computer should be more secure
- since you can examine and secure it by yourself, no matter high is
- your paranoid spirit. The online UI security is mine, I am
- concerned by security, not to the upmost high level possible
- but I won't give you direct access to the host to discover my level.
- With a good guy spirit, feel free to try to break the online UI
- security and report me any security issue you encounter, I'll do my
- best to fix them as soon as possible. Drop me a note before
- starting because I may detect a sort of abuse and ban
- definitively your IPs.
+R. No.
+
+Imapsync behaviour:
+
+--ssl: Goes to encryption before the imap session start.
+ The connection is on port 993.
+ Can use the TLS or SSL security protocols.
+ Fails if encryption cannot be established.
+
+--tls: Goes to encryption after the imap session start but before the
+ credential are sent.
+ The connection is on port 143.
+ Can use the TLS or SSL securityprotocols.
+ Fails if encryption cannot be established.
+
+Explanation:
+
+To force transferring emails over an encrypted connection, you can use
+the imapsync parameters --ssl1 and --ssl2 or the parameters --tls1 and
+--tls2, they all force the connection to be encrypted by the security
+protocols series SSL/TLS.
+
+In a security context, SSL refers to all deprecated Secure Sockets
+Layer protocols. TLS refers to the SSL successors, Transport Layer
+Security protocols. But TLS 1.0 and TLS 1.1 are also deprecated.
+
+Current endorsed versions of TLS are only TLS 1.2 and TLS 1.3 (July 2021).
+
+The whole story is detailed here:
+https://en.wikipedia.org/wiki/Transport_Layer_Security
+
+Options --ssl1 and --ssl2 are a little more paranoid than --tls1 and
+--tls2 because they verify that the hostname of the certificate is the
+same as the one used by imapsync. Other than that, the security
+behavior is the same.
+
+=======================================================================
+Q. I noticed that the online UI has no option for TLS/SSL.
+ Is this secure?
+ Is this more secure than using the .bat file on my computer?
+
+R1. The online UI does TLS/SSL imap connections if the imap servers
+support TLS/SSL.
+
+If you are concerned about security then using the .bat file or .sh on
+your computer should be more secure since you can examine and secure
+it by yourself, no matter high is your paranoid spirit compared to
+mine.
+
+The online UI security is mine, I am concerned by security, not to the
+utmost high level possible but I won't give you direct access to the
+host to discover my level. With a good guy spirit, feel free to try
+to break the online UI security and report me any security issue you
+encounter, I'll do my best to fix them as soon as possible. Drop me a
+note before starting because I may detect a sort of abuse and ban your
+IPs.
=======================================================================
Q. Are transferred emails/attachments stored on any other
@@ -48,15 +125,15 @@ Q. Are transferred emails/attachments stored on any other
R. No!
=======================================================================
-Q. Other than changing passwords on the originating/destination email
- accounts once the relevant emails have been moved,
+Q. Other than changing passwords on the originating/destination email
+ accounts once the relevant emails have been moved,
are there any other security tips I should know?
-R. Secure the host where imapsync is running since credentials are
- on it.
+R. Yes. Secure the host where imapsync is running since credentials
+ are on it.
=======================================================================
-Q. I need to transfer mail from an imap server to an other imap server.
+Q. I need to transfer mail from an imap server to another imap server.
Which ports need to be open on the firewall to make this possible?
R. It depends. Open either:
@@ -64,29 +141,31 @@ R. It depends. Open either:
* port 993 in ssl mode (--ssl1 or --ssl2)
=======================================================================
-Q. Does imapsync support IMAP TLS?
+Q. Does imapsync support the IMAP command STARTTLS?
R1. Yes.
- Use --tls1 and/or --tls2 options:
- --tls1 tells imapsync to use tls on host1.
- --tls2 tells imapsync to use tls on host2.
+ Use --tls1 and --tls2 options:
-R2. Since imapsync release 1.755 TLS mode is activated automatically
- if the server announce it supports it, STARTTLS inside the response
- to CAPABILITY, and if neither --notls nor --ssl is explicitely
- mentioned on the command line options.
+ --tls1 tells imapsync to use STARTTLS on host1.
+ --tls2 tells imapsync to use STARTTLS on host2.
+
+R2. Since imapsync release 1.755 STARTTLS mode is activated
+ automatically when the server announces that it supports it by
+ listing STARTTLS inside the response to the CAPABILITY command.
+ If either --notls or --ssl are explicitly mentioned on the
+ command-line options then STARTTLS won't be done.
=======================================================================
-Q. Does imapsync support IMAP over SSL (IMAPS)?
+Q. Does imapsync support IMAP over SSL/TLS (IMAPS)?
R. Yes natively since release 1.161.
Still, there are 2 ways, at least, to use ssl:
a) Use native --ssl1 and/or --ssl2 options
- --ssl1 tells imapsync to use ssl on host1.
- --ssl2 tells imapsync to use ssl on host2.
+ --ssl1 tells imapsync to use ssl/tls on host1.
+ --ssl2 tells imapsync to use ssl/tls on host2.
b) Use stunnel
@@ -108,18 +187,18 @@ b) Use stunnel
If the local port 143 is already taken then use a free one,
like 10143 for example.
-c) Other example for accessing gmail with no local root access
- to open port 143
+c) Another example for accessing Gmail with no local root access
+ to open port 143:
stunnel3 -P '' -c -d 9993 -r imap.gmail.com:993 -f
-Then, to access gmail as host2 use:
+Then, to access Gmail as host2 use:
imapsync ... --host2 localhost --port2 9993 --nossl2
=======================================================================
-Q.How can I test an ssl imap connection without imapsync?
+Q.How can I test an ssl/tls imap connection without imapsync?
R1. Use either ncat or telnet-ssl or openssl commands like in the
following examples with imap.gmail.com server:
@@ -133,37 +212,39 @@ R1. Use either ncat or telnet-ssl or openssl commands like in the
The previous commands are interactive, hit ctrl-c
to finish them. If you want to finish automatically, then use:
- { sleep 2; echo "a logout"; sleep 1; } | ncat --ssl -C imap.gmail.com 993
+ { sleep 2; echo "A LOGOUT"; sleep 1; } | ncat --ssl -C imap.gmail.com 993
=======================================================================
-Q. How can I manually test a login via ssl?
+Q. How can I manually test login using --ssl?
R. Use either ncat or telnet-ssl or openssl commands like in the
following examples with imap.gmail.com server:
ncat --ssl -C imap.gmail.com 993
+
telnet-ssl -z ssl imap.gmail.com 993
+
openssl s_client -crlf -connect imap.gmail.com:993
-Tipical dialog for an imap LOGIN command:
+Typical dialog for an imap LOGIN command:
* OK Gimap ready for requests from 78.196.254.58 q1mb175739668wix
-a LOGIN "gilles.lamiral@gmail.com" "secret"
+A1 LOGIN "gilles.lamiral@gmail.com" "secret"
* CAPABILITY IMAP4rev1 UNSELECT IDLE NAMESPACE ... ESEARCH
-a OK gilles.lamiral@gmail.com Gilles Lamiral authenticated (Success)
-b LOGOUT
+A1 OK gilles.lamiral@gmail.com Gilles Lamiral authenticated (Success)
+A2 LOGOUT
* BYE LOGOUT Requested
-b OK 73 good day (Success)
+A2 OK 73 good day (Success)
The client part you have to type is
-a LOGIN ...
-b LOGOUT
+A1 LOGIN ...
+A2 LOGOUT
while replacing ... by your credentials values,
other lines are the server responses.
=======================================================================
-Q.How can I test an tls imap connection without imapsync?
+Q. How can I test a STARTTLS imap connection without imapsync?
R1. Use openssl command like the following example with
an outlook.office365.com server:
@@ -177,13 +258,12 @@ to finish them. If you want to finish automatically, then use:
Replace outlook.office365.com with your imap server name.
-
======================================================================
Q. Imapsync used to use SSL_VERIFY_PEER now it uses SSL_VERIFY_NONE.
How can I change this back to the more secure SSL_VERIFY_PEER?
-R2. After imapsync 1.673,
+R. After imapsync 1.673,
to set SSL_verify_mode to SSL_VERIFY_PEER on host1
and SSL_verify_mode to SSL_VERIFY_NONE on host2
@@ -191,18 +271,20 @@ R2. After imapsync 1.673,
--sslargs1 SSL_verify_mode=1 \
--sslargs2 SSL_verify_mode=0
-See perldoc IO::Socket::SSL for all possibilities, also at
+See "perldoc IO::Socket::SSL" for all possibilities, also at
http://search.cpan.org/perldoc?IO%3A%3ASocket%3A%3ASSL
-It might be possible you need an extra:
- --sslargs1 SSL_ca_file=/etc/ssl/certs/ca-certificates.crt
+It might be possible you need an extra option
+
+ --sslargs1 SSL_ca_file=/etc/ssl/certs/ca-certificates.crt
+
to help the ssl software verifying the server certificate.
The file ca-certificates.crt may be elsewhere on your system, even
named differently.
The imap server certificates are not checked for authenticity
-(by default) because too many imap servers are crappy configured
-regarding certified certificates.
+by imapsync by default because too many imap servers are crappy
+configured regarding certified certificates.
This default behavior is chosen like this because users
want their emails transferred, instead of being not transferred
@@ -211,12 +293,13 @@ because of an incompetent imap server sysadmin.
I admit that this part, checking imap ssl/tls certificates,
could be improved from my side by including well known
certificates directly in imapsync.
-Drop me a note to encourage me.
+Drop me a note to encourage me, I'm lazy.
=======================================================================
-Q: How to have an imaps server?
+Q: How can I have an imaps server?
+
+R. Three solutions.
-R.
a) Install one
b) or use stunnel :
diff --git a/FAQ.d/FAQ.Yahoo.txt b/FAQ.d/FAQ.Yahoo.txt
index 198a401..24c3e1f 100644
--- a/FAQ.d/FAQ.Yahoo.txt
+++ b/FAQ.d/FAQ.Yahoo.txt
@@ -1,5 +1,5 @@
-$Id: FAQ.Yahoo.txt,v 1.12 2021/05/04 11:04:51 gilles Exp gilles $
+$Id: FAQ.Yahoo.txt,v 1.13 2021/12/03 12:38:58 gilles Exp gilles $
This document is also available online at
https://imapsync.lamiral.info/FAQ.d/
@@ -18,24 +18,6 @@ Q. Synchronizing from XXX to Yahoo
Now the questions again with their answers.
-Some explanation about the options given later:
-
-https://imapsync.lamiral.info/README
-...
- --noabletosearch : Makes --minage and --maxage options use the internal
- dates given by a FETCH imap command instead of the
- "Date:" header. Internal date is the arrival date
- in the mailbox.
- --noabletosearch equals --noabletosearch1 --noabletosearch2
-
- --regexmess reg : Apply the whole regex to each message before transfer.
- Example: 's/\000/ /g' # to replace null by space.
- --regexmess reg : and this one, etc.
-
-I'm not sure anymore about the need of --noabletosearch with Yahoo, maybe
-they fixed the issue about the standard imap searching command SEARCH
-they didn't honor before.
-
=======================================================================
Q. Synchronizing from Yahoo to XXX
@@ -49,8 +31,7 @@ Example:
--password1 billysecreta \
--host2 XXX \
--user2 Billy@other.com \
- --password2 billysecretb \
- --noabletosearch
+ --password2 billysecretb
You also need to go to Yahoo, security and enable
@@ -90,7 +71,7 @@ R. Example:
--host2 imap.mail.yahoo.com \
--user2 Billy@yahoo.com \
--password2 billysecretb \
- --noabletosearch --regexmess "s{(?Back to Imapsync main page." ..
@@ -40,13 +40,15 @@ AddDescription "Flags tips and issues." FAQ.Flag
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 "GoDaddy accounts." FAQ.GoDaddy.txt
AddDescription "IceWarp accounts." FAQ.IceWarp.txt
AddDescription "ISP tips." FAQ.ISP.txt
AddDescription "Kerio accounts." FAQ.Kerio.txt
AddDescription "MailEnable accounts." FAQ.MailEnable.txt
-AddDescription "Massive/bulk migrations." FAQ.Massive.txt
-AddDescription "Memory issues." FAQ.Memory.txt
-AddDescription "Migration Plan." FAQ.Migration_Plan.txt
+AddDescription "Massive and bulk migrations." FAQ.Massive.txt
+AddDescription "Log file, content, errors and tips." FAQ.Logfile.txt
+AddDescription "Memory issues." FAQ.Memory.txt
+AddDescription "Migration Plan." FAQ.Migration_Plan.txt
AddDescription "Office365 accounts." FAQ.Office365.txt
AddDescription "The Online UI service Q&R." FAQ.OnlineUI.txt
AddDescription "Password & special characters on Windows." FAQ.Passwords_on_Windows.txt
@@ -56,7 +58,7 @@ AddDescription "POP3 issues." FAQ.POP3
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 "Why the imapsync web site looks so old?" FAQ.Old_Style_Web_Design.txt
AddDescription "UCS accounts." FAQ.UCS.txt
AddDescription "Checklist before release a new release." FAQ.Release_Checklist.txt
diff --git a/INSTALL.d/Dockerfile b/INSTALL.d/Dockerfile
old mode 100755
new mode 100644
index b3e93a4..2805161
--- a/INSTALL.d/Dockerfile
+++ b/INSTALL.d/Dockerfile
@@ -1,6 +1,6 @@
## Dockerfile for building a docker imapsync image
-# $Id: Dockerfile,v 1.30 2020/03/26 07:15:04 gilles Exp gilles $
+# $Id: Dockerfile,v 1.38 2021/11/29 10:20:56 gilles Exp gilles $
# I use the following command to build the image:
#
# docker build -t gilleslamiral/imapsync .
@@ -10,9 +10,9 @@
# I thank you very much
# I like thanks
# I like stars
-# I also like (and need) money
+# I also need money to keep on doing this stuff
-# Number of imapsync images pulled so far (2021_05_29): 368881
+# Number of imapsync images pulled so far (2021_11_29): 608326
# Command used:
# curl -s https://hub.docker.com/v2/repositories/gilleslamiral/imapsync/ | jq '.pull_count'
@@ -24,16 +24,13 @@ 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?
+# I put a copy of the Dockerfile in the image itself
+# It can help maintenance, isn't it?
+# Also put optionally my local and usually more recent imapsync on /, for testing purpose
-COPY Dockerfile /
+COPY Dockerfile imapsyn[c] prerequisites_imapsyn[c] /
-# 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 \
@@ -44,7 +41,8 @@ RUN set -xe && \
libdata-uniqid-perl \
libencode-imaputf7-perl \
libfile-copy-recursive-perl \
- libfile-tail-perl \
+ libfile-tail-perl \
+ libio-compress-perl \
libio-socket-ssl-perl \
libio-socket-inet6-perl \
libio-tee-perl \
@@ -70,16 +68,17 @@ RUN set -xe && \
lsof \
ncat \
openssl \
+ ca-certificates \
&& rm -rf /var/lib/apt/lists/*
RUN set -xe \
+ && cd /usr/bin/ \
&& pwd \
- && wget -N https://imapsync.lamiral.info/imapsync \
- https://imapsync.lamiral.info/prerequisites_imapsync \
- https://raw.githubusercontent.com/google/gmail-oauth2-tools/master/python/oauth2.py
- && mv imapsync oauth2.py /usr/bin/ \
- && chmod +x /usr/bin/imapsync /usr/bin/imapsync_local /usr/bin/oauth2.py # just_a_comment_to_force_update 2019_11_26_12_58_34
-
+ && wget -N --no-check-certificate https://imapsync.lamiral.info/imapsync \
+ https://imapsync.lamiral.info/prerequisites_imapsync \
+ https://raw.githubusercontent.com/google/gmail-oauth2-tools/master/python/oauth2.py \
+ && chmod +x imapsync oauth2.py \
+ && /usr/bin/imapsync --testslive && /usr/bin/imapsync --tests # just_a_comment_to_force_update 2021_11_29_11_20_56
USER nobody:nogroup
diff --git a/INSTALL.d/INSTALL.Centos.txt b/INSTALL.d/INSTALL.Centos.txt
index 087ede7..7f047b4 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.25 2021/02/02 17:08:46 gilles Exp gilles $
+# $Id: INSTALL.Centos.txt,v 1.29 2021/12/17 14:52:20 gilles Exp gilles $
This documentation is also located online at
https://imapsync.lamiral.info/INSTALL.d/
@@ -9,37 +9,43 @@ https://imapsync.lamiral.info/INSTALL.d/INSTALL.Centos.txt
Installing imapsync on CentOS
=======================================================================
-There is one section for Centos 8,
+There is one section for AlmaLinux and Centos 8,
one for Centos 7,
and one for Centos 6.
+
=======================================================================
- Centos 8
+ AlmaLinux and Centos 8
=======================================================================
+How to install imapsync on AlmaLinux and Centos 8:
-How to install the latest imapsync on Centos 8
+ dnf install --enablerepo=powertools imapsync
+ imapsync --testslive
- dnf install wget perl-App-cpanminus gcc
- # then
- cpanm lazy Test::MockObject
- wget https://imapsync.lamiral.info/imapsync
- perl -Mlazy imapsync
+
+=======================================================================
+ AlmaLinux and Centos 8 and latest imapsync
+=======================================================================
+
+At the time of this writing (December 2021), the powertools repository
+contains imapsync release 1.977, which is not the latest available
+imapsync release. (1.977 date is 2019/12/23 while 2.174 is 2021/12/14)
+
+In order to install the latest imapsync I suggest the following process:
+
+Install the powertools imapsync 1.977 release via dnf like mentioned above.
+It will install the needed packages, Perl itself and Perl modules
+for release 1.977.
+
+The latest imapsync 2.174 needs no more Perl modules.
+
+ wget -N https://imapsync.lamiral.info/imapsync
chmod +x imapsync
./imapsync --testslive
./imapsync --tests
-
-If you encounter the following error during the run of "perl -Mlazy imapsync"
-...
-Can't locate object method "new" via package "Archive::Tar" at ...
-FAIL install IO-String-1.08
-
-fix it with:
- wget http://mirror.centos.org/centos/8/PowerTools/x86_64/os/Packages/perl-IO-String-1.08-31.el8.noarch.rpm
- yum install perl-IO-String-1.08-31.el8.noarch.rpm -y
-
-See also https://github.com/imapsync/imapsync/issues/211
+You may get an even more recent imapsync release this way.
=======================================================================
Centos 7
@@ -72,7 +78,7 @@ Unit tests:
At the time of this writing (March 2020), the epel7 repository still
contains imapsync release 1.727, which is not the latest available
-imapsync release. (1.727 date is 2016/08/19 while 1.979 is 2020/01/14)
+imapsync release. (1.727 date is 2016/08/19 while 2.174 is 2021/12/14)
In order to install the latest imapsync I suggest the following process:
@@ -102,7 +108,8 @@ Then:
perl-Test-NoWarnings \
perl-Test-Simple \
perl-Test-Warn \
- perl-Sub-Uplevel
+ perl-Sub-Uplevel \
+ ca-certificates
Also, run the following commands:
diff --git a/INSTALL.d/INSTALL.Darwin.txt b/INSTALL.d/INSTALL.Darwin.txt
index 8536ffe..7813c2f 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.34 2021/06/15 10:02:37 gilles Exp gilles $
+# $Id: INSTALL.Darwin.txt,v 1.36 2021/12/24 21:08:13 gilles Exp gilles $
This documentation is also located online at
https://imapsync.lamiral.info/INSTALL.d/
@@ -23,18 +23,18 @@ A) Installing imapsync binary on Darwin / Mac OS X
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.977.tgz
-where 1.977 is the imapsync version number.
+available in the compressed tarball called imapsync-2.140.tgz
+where 2.140 is the imapsync version number.
In case you haven't buy it yet or forgot where the download link is,
check https://imapsync.lamiral.info/dist/
-Download the tarball imapsync-1.977.tgz, not the binary imapsync_bin_Darwin
+Download the tarball imapsync-2.140.tgz, not the binary imapsync_bin_Darwin
because the binary is also in the tarball and there are other useful files
in the tarball. The binary present in /dist/ is just there for a fast upgrade
when you need one.
-I suppose this tarball imapsync-1.977.tgz is downloaded under your $HOME directory,
+I suppose this tarball imapsync-2.140.tgz is downloaded under your $HOME directory,
let say /Users/gilles/, but you can put it anywhere. In real, your $HOME directory
is not /Users/gilles/, it maybe /Users/john/ or /Users/zoey/ where John or Zoey
is you login name.
@@ -45,19 +45,19 @@ Untar the tarball:
cd
pwd
- tar xzvf imapsync-1.977.tgz
+ tar xzvf imapsync-2.140.tgz
-In case the previous command fails, it means the tarball file called imapsync-1.977.tgz
+In case the previous command fails, it means the tarball file called imapsync-2.140.tgz
is not in your $HOME directory, you may have downloaded it elsewhere on the file system.
A way to find it is the command:
find / | grep imapsync
-Now that the tarball is extracted, it created a directory called imapsync-1.977/
-Go into the directory imapsync-1.977 with the command:
+Now that the tarball is extracted, it created a directory called imapsync-2.140/
+Go into the directory imapsync-2.140 with the command:
- cd imapsync-1.977
+ cd imapsync-2.140
First let's have a simple run to see if imapsync_bin_Darwin works.
@@ -178,18 +178,19 @@ Install the "make" command in case it is not already installed.
First let us install cpanminus locally in ~/perl5
- wget --no-check-certificate -O- http://cpanmin.us | perl - -l ~/perl5 App::cpanminus local::lib
+ curl -L https://cpanmin.us | perl - -l ~/perl5 App::cpanminus local::lib
Then take this install into account in the current environment
- eval `perl -I ~/perl5/lib/perl5 -Mlocal::lib`
- perl -I ~/perl5/lib/perl5 -Mlocal::lib
+ perl -I ~/perl5/lib/perl5 -Mlocal::lib # just to see the variables
+ eval `perl -I ~/perl5/lib/perl5 -Mlocal::lib` # doing the variables assigments
If you want to have always this setting in your environment then run the commands
echo 'eval `perl -I ~/perl5/lib/perl5 -Mlocal::lib`' >> ~/.profile
echo 'export MANPATH=$HOME/perl5/man:$MANPATH' >> ~/.profile
cat ~/.profile
+ . ~/.profile
Now let's update the standard CPAN Perl module
@@ -202,18 +203,26 @@ helps to verify what is needed to install on your system
sh prerequisites_imapsync
cpanm Authen::NTLM
- cpanm File::Copy::Recursive IO::Tee
- cpanm Mail::IMAPClient
- cpanm Readonly
+ cpanm IO::Tee
+ cpanm Mail::IMAPClient # File::Copy::Recursive?
+
cpanm Unicode::String
+ cpanm Sys::MemInfo
+ cpanm File::Tail
+
+ cpanm Test::MockObject
+
+ cpanm Readonly
cpanm Data::Uniqid
cpanm JSON::WebToken
We're ready to install and test the latest imapsync
- wget -c http://imapsync.lamiral.info/imapsync
+ curl -L http://imapsync.lamiral.info/imapsync > imapsync
+ chmod +x imapsync
./imapsync
- ./imapsync --modules
+ ./imapsync --testslive
+ ./imapsync --tests
You can rerun "sh prerequisites_imapsync"
to verify everything is ok:
@@ -223,10 +232,6 @@ to verify everything is ok:
When everything is ok the script execution ends with this sentence
"All needed modules are already installed"
-Now imapsync should work on your system.
-
- ./imapsync --testslive
-
=======================================================================
E) Building imapsync binary on Darwin / Mac OS X
=======================================================================
@@ -234,7 +239,7 @@ E) Building imapsync binary on Darwin / Mac OS X
cpanm Module::ScanDeps
cpanm PAR::Packer
-pp -o imapsync.bin imapsync
+pp -x -u -o imapsync.bin imapsync
./imapsync.bin
./imapsync.bin --testslive
diff --git a/INSTALL.d/INSTALL.Debian.txt b/INSTALL.d/INSTALL.Debian.txt
index 3884bc7..5e5ac64 100644
--- a/INSTALL.d/INSTALL.Debian.txt
+++ b/INSTALL.d/INSTALL.Debian.txt
@@ -1,24 +1,26 @@
#!/bin/cat
-# $Id: INSTALL.Debian.txt,v 1.32 2020/12/11 09:27:29 gilles Exp gilles $
+# $Id: INSTALL.Debian.txt,v 1.35 2021/12/17 20:30:33 gilles Exp gilles $
This documentation is also located online at
https://imapsync.lamiral.info/INSTALL.d/
https://imapsync.lamiral.info/INSTALL.d/INSTALL.Debian.txt
-There is three install sections in this document,
-1) one for Debian 9 Stretch and Debian 10 Buster
-2) one for Debian 8 Jessie
-3) one for Debian 7 Wheezy
+There is four install sections in this document,
+1) one for Debian 9 Stretch, Debian 10 Buster, Debian 11 Bullseye
+2) one for all the Debian called "After installing the dependencies"
+3) one for Debian 8 Jessie (obsolete)
+4) one for Debian 7 Wheezy (even more obsolete)
-After reading and following 1) or 2) or 3), you'll be invited to read and follow
-the fourth section "4) After installing the dependencies"
+After reading and following 1) or 3) or 4), you'll be invited to read and follow
+the section "2) After installing the dependencies"
What is your Debian release?
Type on a terminal:
cat /etc/debian_version
+11.x => Bullseye
10.x => Buster
9.x => Stretch
8.x => Jessie
@@ -27,20 +29,20 @@ Type on a terminal:
where x is any number between 0 and 9, x is minor and to be forgotten.
-First a call to Debian packagers
+First, a call to Debian packagers
Why imapsync is not in Debian as a package?
Imapsync used to be in Debian from 2005-04-25 (release 1.125) to 2011-01-25 (release 1.315).
It could be in Debian nowadays, as always, my last words on this discussion were
-"Do what you want, I promise I won't complain anymore about the fact imapsync is on Debian or not."
+"Do what you want, I promise I won't complain anymore about the fact imapsync is in Debian or not."
https://lists.debian.org/debian-legal/2011/01/msg00058.html
-The license is now "No limits to do anything with this work and this license".
-Feel free.
+The Imapsync license is "No limits to do anything with this work and this license".
+So feel free!
See also a more detailed story at
https://lists.debian.org/debian-user/2016/11/msg00849.html
=======================================================================
- 1) Installing imapsync on Debian 9 Stretch or Debian 10 Buster
+ 1) Installing imapsync on Debian 9 Stretch, 10 Buster, 11 Bullseye
=======================================================================
How to install imapsync dependencies on a Debian system?
@@ -48,14 +50,19 @@ 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
+# Debian 11 Bullseye
+deb http://deb.debian.org/debian bullseye main contrib
or
# Debian 10 Buster
deb http://deb.debian.org/debian buster main contrib
+or
+
+# Debian 9 Stretch
+deb http://deb.debian.org/debian stretch main contrib
+
You need root privilege to run it, be root or use sudo.
@@ -88,16 +95,60 @@ apt install -y \
libtest-deep-perl \
libtest-warn-perl \
make \
+ time \
cpanminus
After installing the dependencies, imapsync should be working,
-go to the section "4) After installing the dependencies" below.
+go to the section "2) After installing the dependencies" below.
+
+=======================================================================
+ 2) After installing the dependencies
+=======================================================================
+
+You don't have to be root to test and use imapsync.
+
+Take imapsync either on github:
+
+ wget -N https://github.com/imapsync/imapsync/blob/master/imapsync
+
+or be on the cutting edge with the upstream site:
+
+ wget -N https://imapsync.lamiral.info/imapsync
+
+Add execution permission to the downloaded script:
+
+ chmod +x imapsync
+
+Check the dependencies and print also the basic example:
+
+ ./imapsync
+
+Perform a live test showing imapsync job:
+
+ ./imapsync --testslive
+
+Now install imapsync on the system (need root priviledges again):
+
+ cp imapsync /usr/bin/
+
+That's finished for the installation part.
+You can now use imapsync without knowing where it is located
+on the system:
+
+ imapsync
+
+Now go read the menu http://imapsync.lamiral.info/#doc
+and start with the tutorial
+https://imapsync.lamiral.info/doc/TUTORIAL_Unix.html
+
+Feedback is welcome!
-=============================================
- 2) Installing imapsync on Debian 8 Jessie
-=============================================
+
+=======================================================================
+ 3) Installing imapsync on Debian 8 Jessie
+=======================================================================
How to install imapsync dependencies on a Debian system?
@@ -165,11 +216,11 @@ the module JSON::WebToken with the command:
cpanm JSON::WebToken
After installing the dependencies, imapsync should be working,
-go to the section "4) After installing the dependencies" below.
+go to the section "2) After installing the dependencies" above.
=======================================================================
- 3) Installing imapsync on Debian 7 Wheezy
+ 4) Installing imapsync on Debian 7 Wheezy
=======================================================================
How to install imapsync dependencies on a Debian system?
@@ -234,40 +285,6 @@ the module JSON::WebToken with the command:
After installing the dependencies, imapsync should be working,
-then go to the section "4) After installing the dependencies" below.
-
-=======================================
- 4) After installing the dependencies
-=======================================
-
-You don't have to be root to test and use imapsync.
-
-Take imapsync either on github or at the upstream site.
-
-Add execution permission to the downloaded script:
-
- chmod +x imapsync
-
-Check the dependencies and print also the basic example:
-
- ./imapsync
-
-Perform a live test showing imapsync job:
-
- ./imapsync --testslive
-
-Now install imapsync on the system (need root priviledges again):
-
- cp imapsync /usr/bin/
-
-That's finished for the installation part.
-You can now use imapsync without knowing where it is located
-on the system:
-
- imapsync
-
-Now go to read http://imapsync.lamiral.info/#doc
-and start with the tutorial.
+then go to the section "2) After installing the dependencies" above.
=======================================================================
-=======================================================================
diff --git a/INSTALL.d/INSTALL.Docker_build.txt b/INSTALL.d/INSTALL.Docker_build.txt
index 93ba37f..814c83a 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.12 2019/11/28 14:43:48 gilles Exp gilles $
+# $Id: INSTALL.Docker_build.txt,v 1.15 2021/11/29 11:56:11 gilles Exp gilles $
This documentation is also located online at
https://imapsync.lamiral.info/INSTALL.d/
@@ -10,22 +10,27 @@ https://imapsync.lamiral.info/INSTALL.d/INSTALL.Docker_build.txt
=======================================================================
Nearly verbatim copy from https://imapsync.lamiral.info/INSTALL.d/Dockerfile
-(nearly but the Dockerfile rcs tag Id: removed, that would conflict)
+(verbatim but the Dockerfile rcs tag $ removed because it would conflict)
## Dockerfile for building a docker imapsync image
-# Dockerfile,v 1.26 2019/11/27 15:49:13 gilles Exp gilles $
+# Id: Dockerfile,v 1.38 2021/11/29 10:20:56 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 thank you very much
# I like thanks
# I like stars
-# I also like (and need) money
-# I thank you very much in advance
+# I also need money to keep on doing this stuff
+# Number of imapsync images pulled so far (2021_11_29): 608326
+# Command used:
+# curl -s https://hub.docker.com/v2/repositories/gilleslamiral/imapsync/ | jq '.pull_count'
+
+# Debian Buster is Debian 10
FROM debian:buster
@@ -33,16 +38,13 @@ 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?
+# I put a copy of the Dockerfile in the image itself
+# It can help maintenance, isn't it?
+# Also put optionally my local and usually more recent imapsync on /, for testing purpose
-COPY Dockerfile /
+COPY Dockerfile imapsyn[c] prerequisites_imapsyn[c] /
-# 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 \
@@ -53,7 +55,8 @@ RUN set -xe && \
libdata-uniqid-perl \
libencode-imaputf7-perl \
libfile-copy-recursive-perl \
- libfile-tail-perl \
+ libfile-tail-perl \
+ libio-compress-perl \
libio-socket-ssl-perl \
libio-socket-inet6-perl \
libio-tee-perl \
@@ -77,15 +80,19 @@ RUN set -xe && \
make \
cpanminus \
lsof \
+ ncat \
+ openssl \
+ ca-certificates \
&& rm -rf /var/lib/apt/lists/*
RUN set -xe \
+ && cd /usr/bin/ \
&& 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
-
+ && wget -N --no-check-certificate https://imapsync.lamiral.info/imapsync \
+ https://imapsync.lamiral.info/prerequisites_imapsync \
+ https://raw.githubusercontent.com/google/gmail-oauth2-tools/master/python/oauth2.py \
+ && chmod +x imapsync oauth2.py \
+ && /usr/bin/imapsync --testslive && /usr/bin/imapsync --tests # just_a_comment_to_force_update 2021_11_29_11_20_56
USER nobody:nogroup
@@ -102,6 +109,5 @@ CMD ["/usr/bin/imapsync"]
-
=======================================================================
=======================================================================
diff --git a/INSTALL.d/INSTALL.OnlineUI.txt b/INSTALL.d/INSTALL.OnlineUI.txt
index 1e84da5..67b406f 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.49 2021/03/19 09:39:01 gilles Exp gilles $
+# $Id: INSTALL.OnlineUI.txt,v 1.50 2021/09/20 13:47:20 gilles Exp gilles $
This documentation is also located online at
https://imapsync.lamiral.info/INSTALL.d/
@@ -11,7 +11,7 @@ https://imapsync.lamiral.info/INSTALL.d/INSTALL.OnlineUI.txt
I'm now confident with /X since the /X service is up and running quite
-well since January 2017. Anyway, if you run this service on your own
+well since January 2017. Anyway, if you run this service on your own,
online, you take responsibility for it.
=======================================================================
@@ -135,7 +135,10 @@ 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 don't know very much any of the
-Linux distributions.
+Linux distributions. I add that if you don't know very much any
+of the Linux distributions then you shouldn't install this
+imapsync service at all.
+
=============================================================================
A) Concrete example on a Debian server with Apache:
diff --git a/INSTALL.d/INSTALL.Ubuntu.txt b/INSTALL.d/INSTALL.Ubuntu.txt
index 6fa6ac0..a9df12d 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.17 2019/11/28 14:35:43 gilles Exp gilles $
+# $Id: INSTALL.Ubuntu.txt,v 1.18 2021/07/30 15:06:43 gilles Exp gilles $
This documentation is also located online at
https://imapsync.lamiral.info/INSTALL.d/
@@ -49,6 +49,7 @@ libtest-nowarnings-perl \
libtest-deep-perl \
libtest-warn-perl \
make \
+time \
cpanminus
In case you want to update the Perl module
diff --git a/INSTALL.d/memo_docker b/INSTALL.d/memo_docker
index 9d442e2..a369ae2 100644
--- a/INSTALL.d/memo_docker
+++ b/INSTALL.d/memo_docker
@@ -1,5 +1,7 @@
#!/bin/sh
+# $Id: memo_docker,v 1.15 2021/11/20 20:52:55 gilles Exp gilles $
+
echo imapsync_docker_timestamp_dockerfile
imapsync_docker_timestamp_dockerfile()
{
@@ -27,6 +29,12 @@ imapsync_docker_version()
docker run gilleslamiral/imapsync imapsync --version
}
+echo imapsync_local_docker_version
+imapsync_local_docker_version()
+{
+ docker run gilleslamiral/imapsync imapsync_local --version
+}
+
echo imapsync_docker_add_tag_version
imapsync_docker_add_tag_version()
{
@@ -102,13 +110,21 @@ imapsync_docker_rebuild_from_scratch()
imapsync_docker_build
}
+
+echo is_release_number
+is_release_number()
+{
+ echo "$1" | perl -pe 'm/^\d\.\d+$/ || exit 1'
+}
+
echo imapsync_docker_upload
imapsync_docker_upload()
{
version=`imapsync_docker_version`
# upload only after successful tests
set -x \
- && rcsdiff imapsync \
+ && is_release_number "$version" \
+ && rcsdiff imapsync Dockerfile memo_docker \
&& imapsync_docker_testslive \
&& imapsync_docker_tests \
&& docker run gilleslamiral/imapsync true \
diff --git a/Makefile b/Makefile
index 6046a6b..f71d3b8 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
-# $Id: Makefile,v 1.335 2021/07/06 02:00:46 gilles Exp gilles $
+# $Id: Makefile,v 1.339 2022/01/14 14:28:38 gilles Exp gilles $
.PHONY: help usage all doc
@@ -34,6 +34,7 @@ usage:
@echo "make upload_index"
@echo "make upload_FAQ # upload FAQs and documentation"
@echo "make upload_X # upload online UI"
+ @echo "make upload_csv # upload online CSV service"
@echo "make upload_latest # upload latest imapsync and binaries (dev)"
@echo "make upload_cgi # upload latest imapsync online, after local and remote --tests success."
@echo "make upload_cgi_memo # upload cgi_memo stat_patterns.txt to /X servers."
@@ -150,7 +151,7 @@ clean_bak:
rm -f index.shtml.bak ./S/style.css.bak
clean_oauth2:
- rm oauth2/typescript oauth2/D_*txt
+ rm -f oauth2/typescript oauth2/D_*txt
.PHONY: install dist man
@@ -160,6 +161,7 @@ clean_man:
rm -f W/imapsync.1
W/imapsync.1: imapsync
+ mkdir -p W
pod2man imapsync > W/imapsync.1
install: testp W/imapsync.1
@@ -188,7 +190,7 @@ docker:
@echo "make docker_upload_docker_hub # upload last build to https://hub.docker.com/r/gilleslamiral/imapsync"
@echo "ssh vp3 THEN cd docker/imapsync && . memo_docker"
-docker_build:
+docker_build: docker_copy_to_vp3
ssh vp3 'cd docker/imapsync && . memo_docker && imapsync_docker_build'
@@ -199,7 +201,7 @@ docker_copy_to_vp3:
rsync -av imapsync INSTALL.d/Dockerfile INSTALL.d/memo_docker INSTALL.d/prerequisites_imapsync INSTALL.d/secret.txt vp3:docker/imapsync/
rsync -av RCS/imapsync,v INSTALL.d/RCS/Dockerfile,v INSTALL.d/RCS/memo_docker,v vp3:docker/imapsync/RCS/
-docker_upload_docker_hub:
+docker_upload_docker_hub: docker_build
ssh vp3 'cd docker/imapsync && . memo_docker && imapsync_docker_upload'
functree: W/imapsync_functions_tree_ppi.txt W/imapsync_functions_tree.txt
@@ -517,18 +519,18 @@ W/test_tail.bat:
win64sshaccess:
ssh 'pc HP DV7'@p24 'perl -V'
-
-win64prepa:
- ssh 'pc HP DV7'@p24 'perl -V'
+winprepalocal:
unix2dos W/build_exe.bat W/test_exe.bat W/install_modules.bat W/install_module_one.bat
+
+win64prepa: winprepalocal
+ ssh 'pc HP DV7'@p24 'perl -V'
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
+win64build: winprepalocal
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
@@ -537,10 +539,9 @@ imapsync.exe: imapsync_64bit.exe
cp -a imapsync_64bit.exe imapsync.exe
-imapsync_64bit.exe: imapsync
+imapsync_64bit.exe: imapsync winprepalocal
(date "+%s"| tr "\n" " "; echo -n "BEGIN 64bit " $(VERSION) ": "; date) >> W/.BUILD_EXE_TIME
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'
@@ -565,7 +566,7 @@ zip: dosify_bat
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/'
+# scp ../prepa_zip/imapsync_$(VERSION).zip pc_HP_DV7_p24:'Desktop/'
cp ../prepa_zip/imapsync_$(VERSION).zip /fe/imapsync/
@@ -575,19 +576,22 @@ 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/
+macstadiumcopy:
+ rsync -v imapsync W/build_mac.sh INSTALL.d/prerequisites_imapsync webserver administrator@macstadium.lamiral.info:
+ rsync -v examples/file.txt examples/sync_loop_darwin.sh administrator@macstadium.lamiral.info:examples/
+ rsync -v X/ administrator@macstadium.lamiral.info:X/
+maccopy:
+ rsync -v -p -e 'ssh -4 -p 995' imapsync W/build_mac.sh INSTALL.d/prerequisites_imapsync webserver \
+ gilleslamira@gate.polarhome.com:
+ rsync -v -p -e 'ssh -4 -p 995' examples/file.txt examples/sync_loop_darwin.sh gilleslamira@gate.polarhome.com:examples/
+ rsync -v -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
+imapsync_bin_Darwin: imapsync W/build_mac.sh INSTALL.d/prerequisites_imapsync maccopy
rcsdiff imapsync
- rsync -p -e 'ssh -4 -p 995' imapsync W/build_mac.sh INSTALL.d/prerequisites_imapsync gilleslamira@gate.polarhome.com:
ssh -4 -p 995 gilleslamira@gate.polarhome.com 'sh -x build_mac.sh'
rsync -P -e 'ssh -4 -p 995' gilleslamira@gate.polarhome.com:imapsync_bin_Darwin .
@@ -714,12 +718,12 @@ S/imapsync_sold_by_country.txt: /g/bin/imapsync_by_country
ks:
rsync -avHz --delete --exclude '*.exe' \
. gilles@ks.lamiral.info:public_html/imapsync/
- ssh root@ks.lamiral.info 'apachectl configtest && /etc/init.d/apache2 reload'
+ ssh root@ks.lamiral.info 'apachectl configtest && apachectl reload'
ksa:
rsync -avHz --delete -P \
. gilles@ks.lamiral.info:public_html/imapsync/
- ssh root@ks.lamiral.info 'apachectl configtest && /etc/init.d/apache2 reload'
+ ssh root@ks.lamiral.info 'apachectl configtest && apachectl reload'
ks3:
rsync -avHz --delete -P \
@@ -745,11 +749,10 @@ ks5tests: ks5tests_gilles ks5tests_root
ks5tests_gilles:
rsync -P imapsync gilles@ks.lamiral.info:public_html/imapsync/
- rsync -P oauth2_access_token.txt oauth2_string_for_oauthdirect.txt gilles@ks.lamiral.info:
ssh gilles@ks.lamiral.info 'public_html/imapsync/imapsync --tests'
ks5tests_root:
- rsync -P imapsync oauth2_access_token.txt oauth2_string_for_oauthdirect.txt root@ks5.lamiral.info:
+ rsync -P imapsync root@ks5.lamiral.info:
ssh root@ks5.lamiral.info './imapsync --tests'
@@ -830,14 +833,16 @@ W/.valid.index.shtml: index.shtml S/*.shtml
upload_index: valid_index clean_permissions
rcsdiff index.shtml README_Windows.txt S/style.css S/*.shtml FAQ.d/*.txt LICENSE CREDITS TODO examples/*.bat examples/*.sh index.shtml INSTALL.d/*.txt
+ rcsdiff S/quiz/quiz_imapsync.html S/quiz/quiz_imapsync.js S/quiz/quiz_imapsync.css
rm -f examples/LOG_imapsync/*
rsync -avH index.shtml README_Windows.txt FAQ INSTALL NOLIMIT LICENSE CREDITS TODO S/robots.txt S/favicon.ico ../imapsync_website/
rsync -aHv --delete ./W/ks.htaccess ../imapsync_website/.htaccess
- rsync -aHv --delete S/ ../imapsync_website/S/
+ rsync -aHv --delete ./S/ ../imapsync_website/S/
rsync -aHv --delete ./examples/ ../imapsync_website/examples/
rsync -aHv --delete ./INSTALL.d/ ../imapsync_website/INSTALL.d/
rsync -aHv --delete ./FAQ.d/ ../imapsync_website/FAQ.d/
rsync -avH --delete ./doc/ ../imapsync_website/doc/
+ rsync -avH --delete ./W/tools/ ../imapsync_website/W/tools/
rsync -aHvz --delete ../imapsync_website/ root@ks5.lamiral.info:/usr/local/www/apache24/data/imapsync/
@@ -853,7 +858,7 @@ upload_latest: unitests ci_imapsync bin
upload_cgi: unitests ks5tests ks5tests_root ci_imapsync
rsync -a imapsync ./INSTALL.d/prerequisites_imapsync ../imapsync_website/
rsync -aHvz --delete ../imapsync_website/ root@ks5.lamiral.info:/usr/local/www/apache24/data/imapsync/
- rsync -P imapsync root@ks5.lamiral.info:/home/www/apache24/cgi-bin/imapsync
+ rsync -P imapsync root@ks5.lamiral.info:/home/www/apache24/cgi-bin/
upload_cgi_memo:
dos2unix X/stat_patterns.txt X/server_survey_patterns.txt
@@ -863,13 +868,21 @@ upload_cgi_memo:
upload_X:
./W/tools/validate_xml_html5 X/index.html X/imapsync_form.html X/imapsync_form_extra.html X/imapsync_form_extra_free.html X/imapsync_form_wrapper.html
- rcsdiff X/imapsync_form.html X/imapsync_form_extra.html X/imapsync_form_wrapper.html X/imapsync_form.css X/noscript.css
- rcsdiff X/imapsync_form.js X/imapsync_form_wrapper.js
+ rcsdiff X/imapsync_form.html X/imapsync_form_extra.html X/imapsync_form_extra_free.html X/imapsync_form_wrapper.html X/imapsync_form.css X/noscript.css
+ rcsdiff X/imapsync_form.js X/imapsync_form_wrapper.js
rcsdiff INSTALL.d/INSTALL.OnlineUI.txt
rsync -a ./INSTALL.d/INSTALL.OnlineUI.txt ../imapsync_website/INSTALL.d/INSTALL.OnlineUI.txt
rsync -av --delete X/ ../imapsync_website/X/
rsync -aHvz --delete ../imapsync_website/ root@ks5.lamiral.info:/usr/local/www/apache24/data/imapsync/
+upload_csv:
+ ./W/tools/validate_xml_html5 X/sandbox_csv.html
+ rcsdiff X/sandbox_csv.html X/sandbox_csv.js X/imapsync_csv_wrapper
+ rsync -a X/sandbox_csv.html X/sandbox_csv.js X/imapsync_csv_wrapper ../imapsync_website/X/
+ rsync -aHvz X/sandbox_csv.html X/sandbox_csv.js X/imapsync_csv_wrapper root@ks5.lamiral.info:/usr/local/www/apache24/data/imapsync/X/
+ rsync X/imapsync_csv_wrapper root@ks5.lamiral.info:/home/www/apache24/cgi-bin/
+
+
upload_FAQ:
rcsdiff FAQ.d/*.txt LICENSE CREDITS TODO INSTALL.d/*.txt
rsync -avH FAQ INSTALL CREDITS TODO ../imapsync_website/
@@ -891,8 +904,9 @@ upload_ks: ci tarball
rsync -aHv --delete ./INSTALL.d/ ../imapsync_website/INSTALL.d/
rsync -aHv --delete ./FAQ.d/ ../imapsync_website/FAQ.d/
rsync -avH --delete ./doc/ ../imapsync_website/doc/
+ rsync -avH --delete ./W/tools/ ../imapsync_website/W/tools/
rsync -aHvz --delete ../imapsync_website/ root@ks5.lamiral.info:/usr/local/www/apache24/data/imapsync/
- ssh root@ks.lamiral.info 'apachectl configtest && /etc/init.d/apache2 reload'
+ ssh root@ks.lamiral.info 'apachectl configtest && apachectl reload'
upload_ks5:
diff --git a/README b/README
index 4fc332f..12fce91 100644
--- a/README
+++ b/README
@@ -6,7 +6,7 @@ NAME
VERSION
- This documentation refers to Imapsync $Revision: 2.140 $
+ This documentation refers to Imapsync $Revision: 2.178 $
USAGE
@@ -182,16 +182,6 @@ OPTIONS
--sslargs2 str : Pass any ssl parameter for host2 ssl or tls connection.
See --sslargs1
- --timeout1 flo : Connection timeout in seconds for host1.
- Default is 120 and 0 means no timeout at all.
- --timeout2 flo : Connection timeout in seconds for host2.
- Default is 120 and 0 means no timeout at all.
-
- Caveat, under CGI context, you may encounter a timeout
- from the webserver, killing imapsync and the imap connexions.
- See the document INSTALL.OnlineUI.txt and search
- for "Timeout" for how to deal with this issue.
-
OPTIONS/authentication
--authmech1 str : Auth mechanism to use with host1:
@@ -395,6 +385,12 @@ OPTIONS
Example: 's/\000/ /g' # to replace null characters
by spaces.
--regexmess reg : and this one, etc.
+
+ --truncmess int : truncates messages when their size exceed the int
+ value, specified in bytes. Good to sync too big
+ messages or to "suppress" attachments.
+ Have in mind that this way, messages become
+ uncoherent somehow.
OPTIONS/labels
@@ -595,6 +591,26 @@ OPTIONS
OPTIONS/behavior
+ --timeout1 flo : Connection timeout in seconds for host1.
+ Default is 120 and 0 means no timeout at all.
+ --timeout2 flo : Connection timeout in seconds for host2.
+ Default is 120 and 0 means no timeout at all.
+
+ Caveat, under CGI context, you may encounter a timeout
+ from the webserver, killing imapsync and the imap connexions.
+ See the document INSTALL.OnlineUI.txt and search
+ for "Timeout" for how to deal with this issue.
+
+ --keepalive1 : https://metacpan.org/pod/Mail::IMAPClient#Keepalive
+ Some firewalls and network gears like to timeout connections
+ prematurely if the connection sits idle.
+ This option enables SO_KEEPALIVE on the host1 socket.
+ --keepalive1 is on by default since imapsync release 2.169
+ Use --nokeepalive1 to disable it.
+
+ --keepalive2 : Same as --keepalive2 but for host2.
+ Use --nokeepalive2 to disable it.
+
--maxmessagespersecond flo : limits the average number of messages
transferred per second.
diff --git a/README_Windows.txt b/README_Windows.txt
index 99ba050..b51162a 100644
--- a/README_Windows.txt
+++ b/README_Windows.txt
@@ -1,4 +1,4 @@
-# $Id: README_Windows.txt,v 1.24 2021/06/15 10:29:45 gilles Exp gilles $
+# $Id: README_Windows.txt,v 1.26 2022/01/14 11:54:28 gilles Exp gilles $
#
# This is the README_Windows.txt file for imapsync
# imapsync: IMAP syncing and migration tool.
@@ -21,48 +21,52 @@ A) Simplest way
A.0) Preamble for visual users looking for a visual tool.
- First, the visual thing I am talking about here is not the online visual
- interface I call /X that you might have seen and used at the URL
- https://imapsync.lamiral.info/X/
+ First, the visual thing I am talking about here is not the online
+ visual interface I call /X that you might have seen and used at the
+ URL https://imapsync.lamiral.info/X/
+
This /X visual interface is not yet available on Windows as a service
- that you can install and use in your system.
- I plan to make a visual tool available on Windows but, for now,
- I encountered technical issues.
+ that you can install and use in your system. I plan to make a visual
+ tool available on Windows but, for now, I encountered technical
+ issues.
So what visual thing am I talking about?
Imapsync itself is not a visual tool. The visual tool is Notepad or
any text editor. Many pure visual users have succeeded in using
- imapsync to transfer their email accounts. As you can guess, only
- the ones that tried have succeeded, so don't give up before
- trying at least once. Another assumption is that visual users can read.
+ imapsync to transfer their email accounts. As you can guess, only the
+ ones that tried have succeeded, so don't give up before trying at
+ least once. Another assumption is that visual users can read.
+
Let's go for some reading!
A.1) Get imapsync.
Get imapsync at https://imapsync.lamiral.info/
- You'll then have access to a zip archive file named imapsync_1.977.zip
- where 1.977 is the imapsync release number.
+ You'll then have access to a zip archive file named imapsync_2.178.zip
+ where 2.178 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.977/
+ a unique folder named imapsync_2.178/
Do not unzip the archive in what is called a "system" directory since
you may encounter permission issues.
-Two-point to have in mind:
+Two points to have in mind:
* You don't need to be an Administrator to unzip the zip archive.
* You don't need to be an Administrator to run imapsync.
+In short, any user on your system can use imapsync.
A.3) Check the folder
- In the folder extracted imapsync_1.977 you see 7 files and 2 directories,
- which may be presented in a different order than the following, the order
- is not important anyway. The really important files to get your mailbox
- transfer job started in a few minutes are the first two files of the
+ In the folder extracted and called imapsync_2.178, you see 7 files
+ and 2 directories. Those files and directories may be presented in a
+ different order than the following, the order is not important
+ anyway. There are only two important files to get your mailbox
+ transfer job started in a few minutes, the first two files of the
following list:
* README_Windows.txt is the current file you are reading.
@@ -80,90 +84,104 @@ A.3) Check the folder
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, a file name ending with a .bat extension means "I am a batch script".
- A batch script is a file containing commands, it's a program.
- Don't be afraid, a program can be very simple to modify and I hope
- imapsync_example.bat is one of them.
+ On Windows systems, a file name ending with a .bat extension means
+ "I'm a batch script". A batch script is a file containing commands,
+ it's a program. Don't be afraid, a program can be very simple to
+ modify and I hope imapsync_example.bat is one of them.
- The batch scripts have to stay in the same directory as
- imapsync.exe because of the way they call imapsync.exe.
- They use the string ".\imapsync.exe", so let them be in the same directory.
+ The batch scripts have to stay in the same directory as imapsync.exe
+ because of the way they call imapsync.exe. They use the string
+ ".\imapsync.exe", so let them be in the same directory.
- 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).
+ 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 mysync.bat
- If you don't know how to copy and rename a file then use imapsync_example.bat
- itself, it's ok. The original file is still in the zip file in case
- you want to restart from scratch.
+ If you don't know how to copy and rename a file then use
+ imapsync_example.bat itself, it's ok. The original file is still in
+ the zip file in case you want to restart from scratch.
A.4) Edit the batch file
- This section describes how to edit the file mysync.bat to change
- the example values with yours.
+ This section describes how to edit the file mysync.bat and change
+ it by replacing example values with your values.
To edit mysync.bat, you have to right-click on it and select "modify"
in the list presented in the small window menu.
- Notepad or Notepadd++ are very good editor candidates to modify it.
- Notepad is already installed on any Windows system, Notepadd++
- is not usually installed but if you have it then use it.
+ Notepad or Notepadd++ are very good editor candidates to modify the
+ script. Notepad is already installed on any Windows system,
+ Notepadd++ is not usually installed but if you have it, then use it.
Office Word or any powerful text processor is NOT good for that job.
Text processors transform files in a special format that is wrong to
make them stay a good batch file, so don't use them!
- Files FAQ.txt and FAQ.d/* contain many tips and special options sometimes
- needed by specific imap software servers like Exchange, Office365, or Gmail.
- Those files are also available online at
+ The documents FAQ.txt and FAQ.d/* contain many tips. They describe
+ some special options that are sometimes needed by specific imap
+ software servers like Exchange, Office365, or Gmail.
+
+ Those documents are also available online at
https://imapsync.lamiral.info/FAQ.d/
You don't have to look into them unless you encounter problems.
A.5) Run the batch file
- To run imapsync with your values just double-click on the batch file mysync.bat
+ To run imapsync with your values just double-click on the batch file
+ mysync.bat
There is no need to have administrator privileges to run imapsync.
The run happens in a DOS window; usually, this window is black.
+ If imapsync.exe returns immediately with the ERRORLEVEL -1, it may be
+ because you have a Group Policy in place to prevent the execution of
+ programs in the %TEMP% directory. Temporarily remove this restriction
+ and imapsync will work as expected. Thanks to Walter H. for this
+ input!
-If imapsync.exe returns immediately with the ERRORLEVEL -1, it may be
-because you have an Group Policy in place to prevent execution of
-programs in %TEMP%. Temporarily remove this restriction and imapsync
-will work as expected. Thanks to Walter H. for this input!
-Technically imapsync.exe is an embedded Perl script with also Perl
-and many Perl modules glued together in an archive auto-extracted.
+ Technically speaking, imapsync.exe is an embedded Perl script with
+ also the Perl interpreter and many Perl modules, all glued together
+ in an archive auto-extracted at run time. So it needs write-access to
+ the temporary directory. The temporary directory name depends on the
+ user but its value is in the variable %TEMP%. You can have the value
+ by running the command ECHO %TEMP% in a DOS window. You can have a
+ DOS window by launching the command cmd.exe
A.6) Look at the sync running.
- You can abort the sync at any time with a quick double ctrl-c,
- ie hit ctrl-c twice within one second.
+ You can abort the sync 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 simply abort the sync by closing the DOS window,
- using the cross situated at the up-right corner.
+
+ You can also simply abort the sync by closing the DOS window, using
+ the cross situated at the up-right corner.
What you see in this DOS terminal is also put in a logfile located
in the subdirectory LOG_imapsync/
A.7) Control what happened.
- When the sync is finished you can find the whole log file
- of the output in the folder named "LOG_imapsync/".
- The logfile name is based on the launching date,
- hour, minute, second, milliseconds, plus the user1 and user2 parameters.
+ 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 log file created for each run.
- The log file name is printed at the end of the imapsync run.
+ There is one log file created for each run. The log file name is
+ printed both at the beginning and the end of the imapsync run.
- IMPORTANT: When there is a problem, the problem is very often described
- at the end of the log file. It means you don't have to read all this
- bloody ununderstandable verbose logfile, just read the end first.
+ IMPORTANT: When there is a problem, the problem is very often
+ described at the end of the log file. It means you don't have to read
+ all this bloody ununderstandable verbose logfile, just read the end
+ first.
A.8) Loop on A.4 through A.7
@@ -173,7 +191,7 @@ A.8) Loop on A.4 through A.7
* A.6) look at the run and the log file
* A.7) control what happened.
- Loop on the process of editing, running, and controlling imapsync
+ Loop on the process of editing, running and controlling imapsync
until you solve all issues and the sync is over.
A good sign that the sync went very well is when the nearly last lines are like:
@@ -195,8 +213,8 @@ 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.30.1.1 (released 2019-11-22) but previous and later releases
- should work as well (Perl 5.18 to 5.26 do).
+ I use 5.32.1.1 (released 2021-01-24) but previous and later releases
+ should work as well (Perl 5.18 to 5.30 do).
B.2) Go into the Cook/ directory
B.3) Double-click build_exe.bat
@@ -205,4 +223,3 @@ It should create a binary imapsync.exe in the current Cook/ directory.
B.4) Move imapsync.exe in the upper directory and follow instructions
from A.3) to A.8)
-
diff --git a/S/external.shtml b/S/external.shtml
index 38ff879..697c6fd 100644
--- a/S/external.shtml
+++ b/S/external.shtml
@@ -65,9 +65,13 @@
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)
+ (A tool to upload a local mbox file to IMAP4 server)
imapbackup: https://github.com/rcarmo/imapbackup
- (A Python script for incremental backups of IMAP mailboxes)
+ (A Python script to incremental backups of IMAP mailboxes)
+
+ imap-backup: https://github.com/joeyates/imap-backup
+ (A Ruby script to backup GMail (or other IMAP) accounts to disk)
+
BitRecover email-backup 99 USD, 299 USD https://www.bitrecover.com/email-backup/.
@@ -182,7 +186,7 @@ alt="Viewable With Any Browser" />
This document last modified on
-($Id: external.shtml,v 1.58 2021/06/30 20:34:23 gilles Exp gilles $)
+($Id: external.shtml,v 1.59 2022/01/08 19:54:26 gilles Exp gilles $)
Top of the page
diff --git a/S/images/5c019d917bba312af7553b49_MacStadium-developerlogo.png b/S/images/5c019d917bba312af7553b49_MacStadium-developerlogo.png
new file mode 100644
index 0000000..3655b2f
Binary files /dev/null and b/S/images/5c019d917bba312af7553b49_MacStadium-developerlogo.png differ
diff --git a/S/news.shtml b/S/news.shtml
index 5d44610..ddfaf10 100644
--- a/S/news.shtml
+++ b/S/news.shtml
@@ -85,6 +85,72 @@ If you are very interrested in those projects, don't hesitate to solicit me!
-->
+
+
+- 2.178
+- General:
+
+- Dependencies removed: None
+- Dependencies added: Perl module Compress::Zlib
+
+- Enhancement: Added final statistic line: "CPU time and %cpu : 13.27 sec 8.3 %cpu 2.1 %allcpus
+- Enhancement: Removed the hard limit --maxsize 35_651_584 set by --gmail2 since CAPABILITY is used and good.
+- Enhancement: Does not checknoabletosearch if --justfolders
+- Enhancement: When creating a folder, check if it is selectable and consider ok if it is selectable.
+- Enhancement: Options --gmail1 --gmail2 together sets --useheader X-Gmail-Received --useheader Message-Id
+- Enhancement: Added compression in the imap connexions.
+ Compression is off by default no matter the capability announced.
+ Use --compress1 and --compress2 to turn compression on.
+- Enhancement: Added --keepalive1 and --keepalive2 options.
+ Some firewalls and network gears like to timeout connections prematurely if the connection sits idle.
+ This option enables SO_KEEPALIVE on the host1 socket.
+ --keepalive1 is on by default since imapsync release 2.169
+ Use --nokeepalive1 to disable it. Same thing for --keepalive2 but for --host2. See https://metacpan.org/pod/Mail::IMAPClient#Keepalive
+
+- Enhancement:
+- Enhancement:
+
+- Usability: Removed --fast option. It didn't do anything anyway, it was a fake option.
+- Usability: Added advice inline advice on errors
+
+ - ERR_OVERQUOTA. "The destination mailbox is 100% full, get free space on it and then resume the sync."
+ - ERR_TRANSFER_EXCEEDED. "The maximum transfer size for a single sync is reached ( over 3 GB ). Relaunch the sync to sync more."
+ - ERR_APPEND_SIZE. "The destination server refuses too big messages. Use --truncmess option. Read https://imapsync.lamiral.info/FAQ.d/FAQ.Messages_Too_Big.txt"
+ - ERR_CONNECTION_FAILURE_HOST1. "Check that host1 on port1 is the right IMAP server to be contacted for your mailbox."
+ - ERR_CONNECTION_FAILURE_HOST2. "Check that host2 on port2 is the right IMAP server to be contacted for your mailbox."
+ - ERR_AUTHENTICATION_FAILURE_USER1. "Check the credentials for user1."
+ - ERR_AUTHENTICATION_FAILURE_USER2. "Check the credentials for user2."
+
+
+
+- Usability: Bytes sizes human readable are now presented in KB MB GB TB PB (1000 base) instead of KiB MiB GiB TiB PiB (1024 base)
+- Usability: Added README help for --truncmess
+- Usability:
+- Usability:
+- Usability:
+- Usability:
+
+
+- CGI context: Experimental loaddelay forced to 0 (no delay at all). So far a huge load is rarely a problem.
+- CGI context: Bugfix. Abort didn't set charset=UTF-8; same thing for heavy load 503 Service Unavailable
+
+
+- Bug fix: Made reconnect mechanism works with --oauthdirect1 --oauthdirect2 --oauthaccesstoken1 --oauthaccesstoken2
+- Bug fix: Upped the maximum number a pid can be. From 99999 to 2^22.
+ See what-is-the-maximum-value-of-the-process-id
+- Bug fix: Load average on Mac was sometimes buggy. locale float 3,14 instead of 3.14
+- Bug fix: errors_incr() exited with CATCH_ALL
+- Bug fix: Memory consumption on Mac was not relevant. Use RSS instead of VSZ, on Mac only. Linux stays with VSZ.
+- Bug fix:
+- Bug fix:
+
+
+- Docker context: Current working directory changed from /var/tmp to /var/tmp/uid_$EFFECTIVE_USER_ID
+
+
+
+
+
- 2.140
- General: New release numbering from 1.999 directly to 2.100; I want to avoid 1.1000 and sorting issues in directory listing.
@@ -157,8 +223,6 @@ Exit value 112 (EXIT_WITH_ERRORS_MAX) is now replaced by the most common error e
- Refactoring: Continuing to deglobalize the global variables.
- Refactoring: 1734 unit tests.
-- Refactoring:
-
@@ -954,7 +1018,7 @@ by ignoring PERMANENTFLAGS (Exchange tests)
This document last modified on
-($Id: news.shtml,v 1.78 2021/07/05 20:22:15 gilles Exp gilles $)
+($Id: news.shtml,v 1.83 2022/01/13 18:36:12 gilles Exp gilles $)
Top of the page