This commit is contained in:
Nick Bebout 2022-06-01 10:47:18 -05:00
parent 8e4211e86d
commit 42dd32ab62
46 changed files with 2600 additions and 1114 deletions

101
ChangeLog
View file

@ -1,17 +1,110 @@
RCS file: RCS/imapsync,v RCS file: RCS/imapsync,v
Working file: imapsync Working file: imapsync
head: 2.178 head: 2.200
branch: branch:
locks: strict locks: strict
gilles: 2.178 gilles: 2.200
access list: access list:
symbolic names: symbolic names:
keyword substitution: kv keyword substitution: kv
total revisions: 1078; selected revisions: 1078 total revisions: 1100; selected revisions: 1100
description: description:
---------------------------- ----------------------------
revision 2.178 locked by: gilles; revision 2.200 locked by: gilles;
date: 2022/04/04 16:05:55; author: gilles; state: Exp; lines: +14 -10
typo. "check the certificate server" => "check the server certificate."
----------------------------
revision 2.199
date: 2022/04/01 19:45:33; author: gilles; state: Exp; lines: +15 -14
Enhancement. Added the local ip address for the imap connexions. It can help configuring firewalls to allow the imap source IP.
----------------------------
revision 2.198
date: 2022/04/01 11:13:01; author: gilles; state: Exp; lines: +10 -12
Added SERVER_NAME SERVER_ADDR SERVER_ADMIN variables and values to the output.
----------------------------
revision 2.197
date: 2022/03/30 10:43:22; author: gilles; state: Exp; lines: +29 -28
Bugfix. --tests --testslive was listing 0 folders.
Added message "Use --noemailreport1 to avoid it" after putting the email final report in INBOX.
----------------------------
revision 2.196
date: 2022/03/25 20:35:59; author: gilles; state: Exp; lines: +120 -67
Bugfix. Dates were not displayed under Windows because POSIX::strftime %e is not portable.
Bugfix. Several other places where dates were wrong on Windows.
----------------------------
revision 2.195
date: 2022/03/24 10:00:09; author: gilles; state: Exp; lines: +26 -29
Added warning "parsing headers of folder ... It can take time for huge folders. Be patient."
----------------------------
revision 2.194
date: 2022/03/17 11:04:16; author: gilles; state: Exp; lines: +16 -15
Bugfix. --var HTTP_COOKIE=proximapsync_runs=31 was not working because of the second =
----------------------------
revision 2.193
date: 2022/03/15 11:30:02; author: gilles; state: Exp; lines: +101 -105
Refactor. Deglobalized $debuglist $debugflags
Refactor. Added sync->{ permanentflags2 }
----------------------------
revision 2.192
date: 2022/03/11 18:26:06; author: gilles; state: Exp; lines: +88 -46
Bugfix. Do not allow --skipcrossduplicates and --usecache. Exit EX_USAGE 64
----------------------------
revision 2.191
date: 2022/03/08 10:55:21; author: gilles; state: Exp; lines: +131 -48
Added --var to pass values from proximapsync for variables REMOTE_ADDR REMOTE_HOST HTTP_REFERER HTTP_USER_AGENT SERVER_SOFTWARE SERVER_PORT HTTP_COOKIE
----------------------------
revision 2.190
date: 2022/03/01 21:48:11; author: gilles; state: Exp; lines: +31 -8
Bugfix. Do not turn on --delete2duplicates when --syncduplicates is on, unless --delete2duplicates is given.
----------------------------
revision 2.189
date: 2022/02/28 18:10:10; author: gilles; state: Exp; lines: +9 -11
Upped ERRORS_MAX_CGI from 20 to 500
----------------------------
revision 2.188
date: 2022/02/26 22:43:55; author: gilles; state: Exp; lines: +182 -100
Refactor. Changed setlogfile() to be usable for different logs by proximapsync.
----------------------------
revision 2.187
date: 2022/02/23 12:01:25; author: gilles; state: Exp; lines: +26 -7
Documented why total sizes can differ even when the sync is perfect.
----------------------------
revision 2.186
date: 2022/02/22 22:39:50; author: gilles; state: Exp; lines: +27 -21
Bugfix. Redirect STDERR to STDOUT in all cases, --log or --nolog
----------------------------
revision 2.185
date: 2022/02/11 21:36:18; author: gilles; state: Exp; lines: +19 -11
Added option --emailreport1 and --emailreport2. On by default. Use --noemailreport1 and --noemailreport2 to avoid final emails reports in each INBOX.
----------------------------
revision 2.184
date: 2022/02/10 17:37:57; author: gilles; state: Exp; lines: +91 -31
Added final report to source account also.
----------------------------
revision 2.183
date: 2022/02/06 13:14:33; author: gilles; state: Exp; lines: +29 -29
Added folder name in the debug output of header identificators
----------------------------
revision 2.182
date: 2022/02/01 20:49:51; author: gilles; state: Exp; lines: +10 -10
Bugfix. GMT is good but the tests had to be changed also...
----------------------------
revision 2.181
date: 2022/02/01 20:19:22; author: gilles; state: Exp; lines: +23 -10
Bugfix. Use GMT in tests_email_report_message_id
Bugfix. Make the email report w3c validated. Crazy man!
----------------------------
revision 2.180
date: 2022/02/01 15:14:51; author: gilles; state: Exp; lines: +373 -30
Enhancement. Append a final email report on account2 at the end of the synchronization. Will be optionnal soon.
----------------------------
revision 2.179
date: 2022/01/26 14:32:19; author: gilles; state: Exp; lines: +134 -139
README reread, grammarly on it.
Added "Posta inviata" so \Sent with --automap
----------------------------
revision 2.178
date: 2022/01/12 21:28:37; author: gilles; state: Exp; lines: +75 -13 date: 2022/01/12 21:28:37; author: gilles; state: Exp; lines: +75 -13
Added tests_compress_ssl() Added tests_compress_ssl()
---------------------------- ----------------------------

View file

@ -1,5 +1,5 @@
#!/bin/cat #!/bin/cat
$Id: FAQ.Admin_Authentication.txt,v 1.12 2021/02/19 13:44:18 gilles Exp gilles $ $Id: FAQ.Admin_Authentication.txt,v 1.13 2022/04/06 10:27:52 gilles Exp gilles $
This documentation is also available online at This documentation is also available online at
https://imapsync.lamiral.info/FAQ.d/ https://imapsync.lamiral.info/FAQ.d/
@ -42,6 +42,7 @@ Known imap software servers supporting imap admin authentication:
* Zimbra. See the file FAQ.Zimbra.txt * Zimbra. See the file FAQ.Zimbra.txt
* Kerio See the file FAQ.Kerio.txt * Kerio See the file FAQ.Kerio.txt
* Cyrus-imap. See the file FAQ.Cyrus.txt * Cyrus-imap. See the file FAQ.Cyrus.txt
* James. See the file FAQ.James.txt
* UW-imap. See the file FAQ.General.txt * UW-imap. See the file FAQ.General.txt
* Sun Java Enterprise System/SunOne/iPlanet. See the file FAQ.General.txt * Sun Java Enterprise System/SunOne/iPlanet. See the file FAQ.General.txt

View file

@ -1,9 +1,9 @@
#!/bin/cat #!/bin/cat
$Id: FAQ.Authentication_failure.txt,v 1.14 2021/11/05 11:35:07 gilles Exp gilles $ $Id: FAQ.Authentication_failure.txt,v 1.15 2022/03/03 11:43:55 gilles Exp gilles $
This documentation is also available online at This documentation is also available online at
https://imapsync.lamiral.info/FAQ.d/ https://imapsync.lamiral.info/FAQ.d/
https://imapsync.lamiral.info/FAQ.d/FAQ.Admin_Authentication.txt https://imapsync.lamiral.info/FAQ.d/FAQ.Authentication_failure.txt
======================================================================= =======================================================================
Imapsync authentication issues Imapsync authentication issues

View file

@ -0,0 +1,55 @@
$Id: FAQ.Capacity_Planning.txt,v 1.3 2022/03/22 11:12:25 gilles Exp gilles $
This documentation is also available online at
https://imapsync.lamiral.info/FAQ.d/
https://imapsync.lamiral.info/FAQ.d/FAQ.Capacity_Planning.txt
======================================================================
Imapsync tips for Capacity Planning.
======================================================================
I plan to go to a distributed architecture for the online service. I'm
doing some capacity planning. Imapsync takes memory, cpu and bandwidth
in a relatively deterministic values.
My current question is: Shall I use
* N 2GB hosts
* N/2 4GB hosts
* N/4 8GB hosts
Let's do some maths
The CPU can be an issue. On average, an imapsync run takes 5% of the
overall cpu time for a Intel i5-2300 with 4 cores. It implies 20
imapsync runs is ok on the current online host before the cpus become
the bottleneck. As a rule of thumb, imapsync takes 20% of a cpu core.
The RAM can be an issue. On average, an imapsync run takes 250 MB. So
4 imapsync processes per GB is the limit before swapping to disk,
which is a known phenomenum telling when memory becomes the bottleneck.
16 GB allows 64 imapsync processes.
The Bandwidth I/O can be an issue. The "Average bandwidth rate" value
given by imapsync at the end of a transfer, and also the bandwidth
rate given during the sync on the ETA line, is the total size of all
messages copied divided by the time passed. If imapsync is run between
two foreign imap servers then the total size transferred on the
network link is twice this value, one time when getting the message
from host1, rx, and one time sending the message to host2, tx.
On average, an imapsync runs at 3 Mbps both ways, rx and tx, so 6 Mbps
in total. So a 100 Mbps symetric link allows 33 imapsync processes
before the link becomes the bottleneck.
The best minutes observed so far are a global 187 Mpbs rate (23 MiB/s)
on a 100 Mbps symetrical link done by 28 imapsync processes in parallel,
6.7 Mbps per process at that minute. But the best minutes observed for a
single imapsync process is at 103 Mbps, the rx/tx link limit.
The harddisk I/O can be an issue. I don't measure it yet because
imapsync doesn't perform heavy I/0 where it runs. Well, I don't know,
no measure is no knowledge, just guesses.

View file

@ -1,5 +1,5 @@
#!/bin/cat #!/bin/cat
$Id: FAQ.Contacts_Calendars.txt,v 1.15 2021/09/06 14:32:19 gilles Exp gilles $ $Id: FAQ.Contacts_Calendars.txt,v 1.16 2022/04/05 13:48:52 gilles Exp gilles $
This documentation is also available online at This documentation is also available online at
https://imapsync.lamiral.info/FAQ.d/ https://imapsync.lamiral.info/FAQ.d/
@ -70,8 +70,8 @@ d) Etc. Search the web. There's also specific tools and paid services.
e) I plan to make tools for that but so far nothing has began e) I plan to make tools for that but so far nothing has began
more than this discussion: more than this discussion:
http://www.linux-france.org/prj/imapsync_list/msg01797.html http://linux-france.tk/prj/imapsync_list/msg01797.html
http://www.linux-france.org/prj/imapsync_list/msg01811.html http://linux-france.tk/prj/imapsync_list/msg01811.html
======================================================================= =======================================================================
Q. How can I avoid copying Calendar or Contacts folders? Q. How can I avoid copying Calendar or Contacts folders?

View file

@ -1,5 +1,5 @@
#!/bin/cat #!/bin/cat
$Id: FAQ.David_Tobit.txt,v 1.4 2019/03/28 17:58:53 gilles Exp gilles $ $Id: FAQ.David_Tobit.txt,v 1.5 2022/04/05 13:48:52 gilles Exp gilles $
This documentation is also available online at This documentation is also available online at
https://imapsync.lamiral.info/FAQ.d/ https://imapsync.lamiral.info/FAQ.d/
@ -47,8 +47,8 @@ First try above V10 solution since improvments have been made
to support Tobit. to support Tobit.
R. Look at the discussion: R. Look at the discussion:
http://www.linux-france.org/prj/imapsync_list/msg00583.html http://linux-france.tk/prj/imapsync_list/msg00583.html
http://www.linux-france.org/prj/imapsync_list/threads.html#00583 http://linux-france.tk/prj/imapsync_list/threads.html#00583
patch saved in ./patches/imapsync-1.337_tobit_V6.patch patch saved in ./patches/imapsync-1.337_tobit_V6.patch
======================================================================= =======================================================================

View file

@ -1,5 +1,5 @@
$Id: FAQ.Exchange.txt,v 1.79 2021/12/17 11:59:48 gilles Exp gilles $ $Id: FAQ.Exchange.txt,v 1.80 2022/04/05 13:48:52 gilles Exp gilles $
This documentation is also available online at This documentation is also available online at
https://imapsync.lamiral.info/FAQ.d/ https://imapsync.lamiral.info/FAQ.d/
@ -288,7 +288,7 @@ and I guess it changes over time.
R2. For Exchange, in case throttle appears anyway, fix them with: R2. For Exchange, in case throttle appears anyway, fix them with:
https://docs.microsoft.com/en-us/exchange/change-user-throttling-settings-for-specific-users-exchange-2013-help https://docs.microsoft.com/en-us/exchange/change-user-throttling-settings-for-specific-users-exchange-2013-help
See also: See also:
http://www.linux-france.org/prj/imapsync_list/msg02072.html http://linux-france.tk/prj/imapsync_list/msg02072.html
(Subject: Re: [imapsync] From Exchange to Dovecot. Speed (Subject: Re: [imapsync] From Exchange to Dovecot. Speed
Date: Mon, 03 Nov 2014 00:14:59 +0100) Date: Mon, 03 Nov 2014 00:14:59 +0100)

View file

@ -1,5 +1,5 @@
#!/bin/cat #!/bin/cat
$Id: FAQ.Folders_Selection.txt,v 1.11 2020/12/31 11:41:46 gilles Exp gilles $ $Id: FAQ.Folders_Selection.txt,v 1.12 2022/03/22 11:12:32 gilles Exp gilles $
This documentation is also available online at This documentation is also available online at
https://imapsync.lamiral.info/FAQ.d/ https://imapsync.lamiral.info/FAQ.d/
@ -72,9 +72,9 @@ R. From https://imapsync.lamiral.info/README
--nomixfolders : Do not merge folders when host1 is case-sensitive --nomixfolders : Do not merge folders when host1 is case-sensitive
while host2 is not (like Exchange). Only the first while host2 is not (like Exchange). Only the first
similar folder is synced (example: with folders similar folder is synced. Example: with folders
"Sent", "SENT" and "sent" "Sent", "SENT" and "sent" on host1, only "Sent"
on host1 only "Sent" will be synced to host2). will be synced to host2.
--skipemptyfolders : Empty host1 folders are not created on host2. --skipemptyfolders : Empty host1 folders are not created on host2.

View file

@ -1,5 +1,5 @@
#!/bin/cat #!/bin/cat
# $Id: FAQ.General.txt,v 1.244 2021/02/19 13:38:39 gilles Exp gilles $ # $Id: FAQ.General.txt,v 1.245 2022/04/05 13:55:47 gilles Exp gilles $
======================================================================= =======================================================================
General FAQ for imapsync General FAQ for imapsync
@ -372,13 +372,7 @@ Use --useuid then imapsync will avoid dealing with headers.
======================================================================= =======================================================================
Q. How can I try imapsync with latest Mail::IMAPClient 3.xx perl module? Q. How can I try imapsync with latest Mail::IMAPClient 3.xx perl module?
Three solutions at least. R1 Run:
R1 - Look at the script named "i3" in the tarball, it can be used to
run imapsync with the included Mail-IMAPClient-3.39/ wherever you
unpacked the imapsync tarball
R2 Run:
cpanm Mail::IMAPClient # this uses cpanminus cpanm Mail::IMAPClient # this uses cpanminus
@ -391,7 +385,7 @@ R2 Run:
perl -MCPAN -e "install Mail::IMAPClient" perl -MCPAN -e "install Mail::IMAPClient"
R3 If you want to install the Perl module locally in a directory R2 If you want to install the Perl module locally in a directory
- Download latest Mail::IMAPClient 3.xx at - Download latest Mail::IMAPClient 3.xx at
http://search.cpan.org/dist/Mail-IMAPClient/ http://search.cpan.org/dist/Mail-IMAPClient/
@ -409,7 +403,6 @@ R3 If you want to install the Perl module locally in a directory
or if imapsync is in directory /path/ or if imapsync is in directory /path/
perl -I./Mail-IMAPClient-3.39/lib /path/imapsync ... perl -I./Mail-IMAPClient-3.39/lib /path/imapsync ...
======================================================================= =======================================================================
Q. How can I use imapsync with Mail::IMAPClient 2.2.9 perl module? Q. How can I use imapsync with Mail::IMAPClient 2.2.9 perl module?

View file

@ -1,5 +1,5 @@
#!/bin/cat #!/bin/cat
$Id: FAQ.Gmail.txt,v 1.81 2021/10/06 20:21:26 gilles Exp gilles $ $Id: FAQ.Gmail.txt,v 1.87 2022/02/10 12:42:52 gilles Exp gilles $
This document is also available online at This document is also available online at
https://imapsync.lamiral.info/FAQ.d/ https://imapsync.lamiral.info/FAQ.d/
@ -41,11 +41,16 @@ Q. Can not open imap connection on [imap.gmail.com]
Q. I want to sync the Sent folder only, what is it on Gmail? Q. I want to sync the Sent folder only, what is it on Gmail?
Q. From Gmail to Gmail, I want to keep Categories. What can I do?
Q. The context is a Gmail account at the source, but not Gmail at the Q. The context is a Gmail account at the source, but not Gmail at the
destination. I want cross-duplicates, different Gmail folders/labels destination. I want cross-duplicates, different Gmail folders/labels
generating duplicate messages across folders on the destination, generating duplicate messages across folders on the destination,
except for the "All Mail" folder. except for the "All Mail" folder.
Q. I can't sync more than 1000 messages in each Gmail folder.
What can I do?
Q. What are the Gmail imap names of the folders Q. What are the Gmail imap names of the folders
"Sent" "Trash" "Drafts" "Junk" "Flagged" and "All"? "Sent" "Trash" "Drafts" "Junk" "Flagged" and "All"?
@ -236,7 +241,7 @@ imapsync \
--password2 gmailsecret2 \ --password2 gmailsecret2 \
--gmail1 --gmail2 --gmail1 --gmail2
Or, replacing what does --gmail1 --gmail2 (values are from imapsync 2.155): Or, replacing what does --gmail1 --gmail2 (values are from imapsync 2.178):
imapsync \ imapsync \
--host1 imap.gmail.com \ --host1 imap.gmail.com \
@ -320,7 +325,7 @@ imapsync --host1 mail.oldhost.com \
--password2 gmailsecret \ --password2 gmailsecret \
--gmail2 --gmail2
Or, replacing what does --gmail2 (values are from imapsync 1.970): Or, replacing what does --gmail2 (values are from imapsync 2.178):
(For Linux only because of the quotes) (For Linux only because of the quotes)
imapsync --host1 mail.oldhost.com \ imapsync --host1 mail.oldhost.com \
@ -429,19 +434,19 @@ R. Use this example:
imapsync \ imapsync \
--user1 foo@gmail.com \ --user1 foo@gmail.com \
--password1 gmailsecret \ --password1 gmailsecret \
--host2 localhost \ --host2 imap.example.org \
--user2 tata \ --user2 tata \
--password2 tatasecret \ --password2 tatasecret \
--gmail1 --gmail1
Or, replacing what does --gmail1 (values are from imapsync 1.970): Or, replacing what does --gmail1 (values are from imapsync 2.178):
imapsync \ imapsync \
--host1 imap.gmail.com \ --host1 imap.gmail.com \
--ssl1 \ --ssl1 \
--user1 foo@gmail.com \ --user1 foo@gmail.com \
--password1 gmailsecret \ --password1 gmailsecret \
--host2 localhost \ --host2 imap.example.org \
--user2 tata \ --user2 tata \
--password2 tatasecret \ --password2 tatasecret \
--maxbytespersecond 40_000 \ --maxbytespersecond 40_000 \
@ -627,6 +632,73 @@ R2. In fact, by configuration from the user, it can be another folder
name presented in IMAP. Use --automap --dry to see this mapping. name presented in IMAP. Use --automap --dry to see this mapping.
See below See below
=======================================================================
Q. From Gmail to Gmail, I want to keep Categories. What can I do?
R. First, read a document to learn how to play with Gmail Categories:
https://support.google.com/mail/answer/3094499
Categories are not presented in IMAP in Gmail, so synchronizing them
with imapsync requires some work.
Let's say I want to synchronize the category named "Updates".
1. Create a label "Updates_L", or name it as you want. You can't
create a label named "Updates" like the category name because
Gmail will refuse to create it, saying it's a reserved name.
2. Select all messages in the category "Updates".
To do so, you can use the string "category:updates" in the
search input text located at the top of the Gmail page.
Notice the case is irrelevant to the search,
"category:updates" equals "Category:Updates".
Gmail then announces "All 100 messages on this page are selected."
It's not enough, I want all the "Updates" category messages.
So, on the right of this statement, click on the text
"Select all messages that match this search".
Now Gmail announces "All messages in this search are selected."
3. Apply label "Updates_L" created at step 1 to all the selected
messages. Gmail will present a warning and a
"Confirm bulk action" button. Press "Ok".
4. Repeat steps 1 to 3 for each category you want to synchronize.
5. Transfer your mailbox to the new account with imapsync using the
options --gmail1 --gmail2, the labels will be synchronized.
6. For each of the labels you made for categories, do the steps 7 to 9.
As an example, I take the label "Updates_L" previously used.
7. Select all messages with the label "Updates_L".
You can use the string "label:Updates_L" in the search input
text located at the top of the Gmail page.
Gmail then announces "All 100 messages on this page are selected."
It's not enough, I want all the "updates_l" labeled messages.
So, on the right of this statement, click on the text
"Select all messages that match this search".
Now Gmail announces "All messages in this search are selected."
(does it sound similar to a previous §?)
8. Apply the category "Updates" to all the selected
messages. Gmail will present a warning and a
"Confirm bulk action" button. Press "Ok".
If you search where are the categories: the categories are
located with the labels, as if they were labels.
9. Delete the temporary label. That part is optional.
Maybe one day Google will make categories optionally available
in IMAP, like any other label and this trick will be obsolete.
Labels can be "Show in IMAP" at
https://mail.google.com/mail/u/0/#settings/labels
Categories are listed there but not possibly "Show in IMAP", not yet :-)
Thanks to Michael Leggett https://twitter.com/leggett for this
trick. See the story at
https://twitter.com/leggett/status/1484632316697739267?s=20
======================================================================= =======================================================================
Q. The context is a Gmail account at the source, but not Gmail at the Q. The context is a Gmail account at the source, but not Gmail at the
destination. I want cross-duplicates, different Gmail folders/labels destination. I want cross-duplicates, different Gmail folders/labels
@ -658,6 +730,16 @@ See https://github.com/imapsync/imapsync/pull/266
(I refused it because well maintaining it will be very hard for me (I refused it because well maintaining it will be very hard for me
and I have other priorities). and I have other priorities).
=======================================================================
Q. I can't sync more than 1000 messages in each Gmail folder.
What can I do?
R. It's a Gmail configuration feature that someone set for your
Gmail account. Go to
https://mail.google.com/mail/u/0/?tab=wm#settings/fwdandpop
and select
"Do not limit the number of messages in an IMAP folder (default)"
======================================================================= =======================================================================
Q. What are the Gmail imap names of the folders Q. What are the Gmail imap names of the folders
"Sent" "Trash" "Drafts" "Junk" "Flagged" and "All"? "Sent" "Trash" "Drafts" "Junk" "Flagged" and "All"?
@ -719,24 +801,29 @@ Q. Gmail does not really delete messages in folder [Gmail]/All Mail
What happens? What can I do? What happens? What can I do?
R. It's true and explained in Gmail documentation at R. It's true and explained in Gmail documentation at
https://support.google.com/mail/answer/7401?hl=en https://support.google.com/mail/answer/7401?hl=en#zippy=%2Cempty-your-trash
To really remove messages in folder "[Gmail]/All Mail", they have to To really remove messages in folder "[Gmail]/All Mail", they have to
be moved to the "Trash" folder and be deleted from "Trash". be moved to the "Trash" folder and be deleted from "Trash".
Quoting the link above (25 december 2018, happy christmas by the way!) Quoting the link above (4 february 2022)
... ...
Empty your Trash Empty your Trash
If you don't want a message to stay in your Trash for 30 days,
you can permanently delete it.
* On your computer, go to Gmail.
* On the left side of the page, scroll down,
then click More and then Trash.
* Check the box next to messages you want to permanently delete,
then click Delete forever.
* Note: The Delete forever option is only available in the Trash. If you don't want a message to stay in your trash for 30 days,
You wont be able to delete items forever from the Search result view. you can permanently delete it.
* On your computer, go to Gmail.
* On the left side of the page, click More.
* Scroll to Trash.
* Check the box next to messages you want to permanently delete.
Then click Delete forever.
* Tip: The "Delete forever" option is only available in the trash.
You wont be able to delete items permanently from the Search result view.
To delete all messages in your trash, click Empty Trash now. To delete all messages in your trash, click Empty Trash now.

34
FAQ.d/FAQ.James.txt Normal file
View file

@ -0,0 +1,34 @@
#!/bin/cat
$Id: FAQ.James.txt,v 1.2 2022/04/06 10:28:16 gilles Exp gilles $
This documentation is also available online at
https://imapsync.lamiral.info/FAQ.d/
https://imapsync.lamiral.info/FAQ.d/FAQ.James.txt
=======================================================================
Imapsync tips for James. Specific issues and solutions.
=======================================================================
James: JAVA Apache Mail Enterprise Server
Questions answered in this FAQ are:
Q. How to migrate to Dovecot with an admin/MasterUser account?
=======================================================================
Q. How to migrate to James with an admin/MasterUser account?
R. James supports impersonation and is setup via the administratoId key
field stored in <install>/conf/usersrepository.conf
There are multiple user repository definitions, each using
a different key:value pair to define administratorId
https://james.apache.org/server/config-users.html
(Thanks to From Rob Davis for this Q/R)
=======================================================================
=======================================================================

View file

@ -1,5 +1,5 @@
#!/bin/cat #!/bin/cat
$Id: FAQ.Kerio.txt,v 1.2 2019/11/15 11:33:14 gilles Exp gilles $ $Id: FAQ.Kerio.txt,v 1.3 2022/04/05 13:48:52 gilles Exp gilles $
This document is also available online at This document is also available online at
https://imapsync.lamiral.info/FAQ.d/ https://imapsync.lamiral.info/FAQ.d/
@ -17,7 +17,7 @@ Q. How to migrate from Kerio Connect to XXX
R. No special options required. R. No special options required.
See also: See also:
http://www.linux-france.org/prj/imapsync_list/msg01756.html http://linux-france.tk/prj/imapsync_list/msg01756.html
http://web.archive.org/web/20140224041102/https://www.safetynet-it.com/it-support/mac-kerio-server-to-microsoft-exchange-2010-migration-1/ http://web.archive.org/web/20140224041102/https://www.safetynet-it.com/it-support/mac-kerio-server-to-microsoft-exchange-2010-migration-1/
http://web.archive.org/web/20121125074756/http://www.safetynet-it.com/it-support/mac-kerio-server-to-microsoft-exchange-2010-migration-2/ http://web.archive.org/web/20121125074756/http://www.safetynet-it.com/it-support/mac-kerio-server-to-microsoft-exchange-2010-migration-2/

View file

@ -1,5 +1,5 @@
$Id: FAQ.Office365.txt,v 1.33 2022/01/05 11:17:21 gilles Exp gilles $ $Id: FAQ.Office365.txt,v 1.37 2022/04/06 09:58:39 gilles Exp gilles $
This documentation is also available online at This documentation is also available online at
https://imapsync.lamiral.info/FAQ.d/ https://imapsync.lamiral.info/FAQ.d/
@ -112,7 +112,27 @@ d) Delete this app password when the job with imapsync is finished.
R3. Also, check a license is assigned to that account in Office365. R3. Also, check a license is assigned to that account in Office365.
R4. Microsoft introduced something called "security defaults" which is enabled R4. From Dave Pusey
https://github.com/imapsync/imapsync/issues/317#issuecomment-1027776418
I quote Dave nearly verbatim:
"I had created an app password, and security defaults are already off.
I have now figured out the issue.
Despite the MS365 and EXO admin centers showing that IMAP and Basic
Auth were all enabled, it turns out that in Oct 2021, Microsoft began
disabling basic auth for all tenants that had have never used it by
that point. There was an item in my Message Center from that date
saying my tenant was being done.
You can re-enable it for specific protocols (IMAP in this case) using
the diagnostic process detailed at
https://techcommunity.microsoft.com/t5/exchange-team-blog/basic-authentication-and-exchange-online-september-2021-update/bc-p/2782230
(see the section "Limited Opt Out")
R5. Microsoft introduced something called "security defaults" which is enabled
by default for new tenants. One of the rules blocks IMAP access as of imapsync. 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 The funny thing is that you can't disable a single rule of this
@ -122,15 +142,15 @@ Switching the whole thing off allows the IMAP login.
Also, disable double-step authentication on the Azure/Active Directory portal. Also, disable double-step authentication on the Azure/Active Directory portal.
See here: See here:
https://docs.microsoft.com/en-us/azure/active-directory/fundamentals/concept-fundamentals-security-defaults https://docs.microsoft.com/en-us/azure/active-directory/fundamentals/concept-fundamentals-security-defaults
Thanks to Stephan Buhre for this R4 answer. Thanks to Stephan Buhre for this R5 answer.
R5. Are there special characters in the password? R6. Are there special characters in the password?
https://imapsync.lamiral.info/FAQ.d/FAQ.Authentication_failure.txt 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_Windows.txt
https://imapsync.lamiral.info/FAQ.d/FAQ.Passwords_on_Unix.txt https://imapsync.lamiral.info/FAQ.d/FAQ.Passwords_on_Unix.txt
https://imapsync.lamiral.info/FAQ.d/FAQ.Passwords_on_Mac.txt https://imapsync.lamiral.info/FAQ.d/FAQ.Passwords_on_Mac.txt
R6. Triple check the hostname then. Try all of these: R7. Triple check the hostname then. Try all of these:
* outlook.office365.com * outlook.office365.com
* imap-mail.outlook.com * imap-mail.outlook.com
* imap.outlook.com * imap.outlook.com
@ -570,7 +590,7 @@ Note from Yago Torres Fernandez:
(a working command using admin/authuser on host2 Office 365) (a working command using admin/authuser on host2 Office 365)
imapsync ... --authuser2 user_admin@domain.com --user2 user_to_be_migrated@domain.com ^ imapsync ... --authuser2 user_admin@domain.com --user2 user_to_be_migrated@domain.com ^
--password2 XXXX --ssl2 ^ --password2 XXXX --ssl2
but previously in Office365, you must do something like the following, using Powershell: but previously in Office365, you must do something like the following, using Powershell:
@ -581,6 +601,10 @@ Note from Betsy Lawlor: You can use global modern authentication with two factor
on Exchange Online (M365) but you must have "AllowBasicAuthImap" on on Exchange Online (M365) but you must have "AllowBasicAuthImap" on
the admin account you are using to migrate the mail. the admin account you are using to migrate the mail.
Note from Guido (5 April 2022):The way I fixed it was by turning off security defaults
https://docs.microsoft.com/nl-nl/azure/active-directory/fundamentals/concept-fundamentals-security-defaults.
You still need to check IMAP access on an account-basis though.
Remark: PLAIN authentication is the only way to go with --authuser1 for now. Remark: PLAIN authentication is the only way to go with --authuser1 for now.
So don't use --authmech1 SOMETHING with --authuser1 admin_user, So don't use --authmech1 SOMETHING with --authuser1 admin_user,
it will not work. it will not work.
@ -606,7 +630,7 @@ but not for the admin. Example:
imapsync ... --authuser2 user_admin@domain.com --user2 user_to_be_migrated imapsync ... --authuser2 user_admin@domain.com --user2 user_to_be_migrated
See also: See also:
http://www.linux-france.org/prj/imapsync_list/msg02203.html http://linux-france.tk/prj/imapsync_list/msg02203.html
Subject: RE: [imapsync] Office 365 - 'Master User'? Subject: RE: [imapsync] Office 365 - 'Master User'?
Date: Mon, 1 Jun 2015 17:53:54 +0000 Date: Mon, 1 Jun 2015 17:53:54 +0000

View file

@ -1,5 +1,5 @@
#!/bin/cat #!/bin/cat
$Id: FAQ.OnlineUI.txt,v 1.31 2021/12/24 21:02:52 gilles Exp gilles $ $Id: FAQ.OnlineUI.txt,v 1.32 2022/03/23 11:00:27 gilles Exp gilles $
This document is also available online at This document is also available online at
https://imapsync.lamiral.info/FAQ.d/ https://imapsync.lamiral.info/FAQ.d/
@ -12,23 +12,38 @@ https://imapsync.lamiral.info/FAQ.d/FAQ.OnlineUI.txt
Questions answered in this FAQ are: Questions answered in this FAQ are:
Q. Can I launch several imap synchronizations on the visual
user interface /X?
Q. How secure is the online visual user interface /X? Q. How secure is the online visual user interface /X?
Q. Does the online service store any sensitive information Q. Does the online service store any sensitive information
like my passwords? like my passwords?
Q. I want to switch from the visual interface /X to the
imapsync command line or to the script examples
https://imapsync.lamiral.info/#DOC_BASIC
What should I know?
Q. Shall I have issues when the browser times out? Q. Shall I have issues when the browser times out?
What happens if the browser connection is closed for whatever reason? What happens if the browser connection is closed for whatever reason?
Q. Shall I have issues when the webserver times out? What happens Q. Shall I have issues when the webserver times out? What happens
if the web server closes the connection for whatever reason? if the web server closes the connection for whatever reason?
Q. The sync stalls at the beginning, just after a line like: Q. The sync stalls at the beginning, just after a line like:
"Host1: xxx says it has CAPABILITY for AUTHENTICATE LOGIN" "Host1: xxx says it has CAPABILITY for AUTHENTICATE LOGIN"
What is the problem? What is the problem?
Now the questions again with their answers. Now the questions again with their answers.
=====================================================================
Q. Can I launch several imap synchronizations on the visual
user interface /X?
R. Yes. Open several tabs/windows on your browser and fill each one
with different credentials.
===================================================================== =====================================================================
Q. How secure is the online visual user interface /X? Q. How secure is the online visual user interface /X?
@ -114,7 +129,7 @@ started its job.
===================================================================== =====================================================================
Q. Does the online service store any sensitive information Q. Does the online service store any sensitive information
like my passwords? like my passwords?
No. No.
@ -125,14 +140,71 @@ 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 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 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, 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. since a correct login is mandatory to do anything on your mailboxes.
=====================================================================
Q. I want to switch from the visual interface /X to the
imapsync command line or to the script examples
https://imapsync.lamiral.info/#DOC_BASIC
What should I know?
R. Let's do some ascii art.
The visual interface looks roughly like this, for the textfields input part:
+------------------------------------------+------------------------------------------+
| IMAP source Mailbox | IMAP destination Mailbox |
| | |
| Login (usually an email address) | Login (usually an email address) |
| | |
| test1 | test2 |
| | |
| Password | Password |
| | |
| secret1 | secret2 |
| | |
| IMAP Server hostname (or its IP address) | IMAP Server hostname (or its IP address) |
| | |
| test1.lamiral.info | test2.lamiral.info |
| | |
+------------------------------------------+------------------------------------------+
Notice the 6 examples values I put in the previous "picture":
* test1
* secret1
* test1.lamiral.info
* test2
* secret2
* test2.lamiral.info
The corresponding imapsync command line on Windows is:
imapsync.exe --host1 "test1.lamiral.info" --user1 "test1" --password1 "secret1" ^
--host2 "test2.lamiral.info" --user2 "test2" --password2 "secret2"
The order of the parameters is whatever you want as long as you respect each pair
like: --optionname "value"
There is no need to type this in a command prompt window, just use the example script
https://imapsync.lamiral.info/examples/imapsync_example.bat
The corresponding imapsync command line on Linux is:
imapsync --host1 "test1.lamiral.info" --user1 "test1" --password1 "secret1" \
--host2 "test2.lamiral.info" --user2 "test2" --password2 "secret2"
There is no need to type this in a command prompt window, just use the example script
https://imapsync.lamiral.info/examples/imapsync_example.sh
===================================================================== =====================================================================
Q. Shall I have issues with the browser timing out? Q. Shall I have issues with the browser timing out?
What happens if the browser connection is closed for whatever reason? What happens if the browser connection is closed for whatever reason?
R. A browser connection closed closes also the imapsync process, R. A browser connection closed closes also the imapsync process,
ie, the sync is ended right away. ie, the sync is ended right away.
Further comments on this behavior. Further comments on this behavior.
@ -145,7 +217,7 @@ If the Browser/WebServer connection timeouts or ends,
the imapsync sync is also ended immediately by the remote the imapsync sync is also ended immediately by the remote
Apache HTTPS server. Technically, Apache sends a TERM signal Apache HTTPS server. Technically, Apache sends a TERM signal
to the imapsync process, then wait some seconds before to the imapsync process, then wait some seconds before
sending a KILL signal if it is still alive. sending a KILL signal if the imapsync process is still alive.
You can relaunch the sync with the "Sync!" button, at any time. You can relaunch the sync with the "Sync!" button, at any time.
If the "Sync!" button is gray/inactive then just reload If the "Sync!" button is gray/inactive then just reload
@ -166,26 +238,23 @@ the logfile running the sync like a "tail -f" command (isn't that magic?).
===================================================================== =====================================================================
Q. Shall I have issues when the webserver times out? What happens Q. Shall I have issues when the webserver times out? What happens
if the web server closes the connection for whatever reason? if the web server closes the connection for whatever reason?
R. If the webserver closes the connection then usually it also R. If the webserver closes the connection then usually it also
kills the imapsync process and the imap connections as well. kills the imapsync process and the imap connections as well.
To fix this issue, see the document INSTALL.OnlineUI.txt The current webserver timeout at
and search for "Timeout" in it. https://imapsync.lamiral.info/X/
is 3600 secondes, one hour.
Tip: If the connections close for huge folders and always after
300 seconds or 60 seconds then it looks like a web server timeout.
Apache 2.2 timeout is 300 seconds.
Apache 2.4 timeout is 60 seconds.
===================================================================== =====================================================================
Q. The sync stalls at the beginning, just after a line like: Q. The sync stalls at the beginning, just after a line like:
"Host1: xxx says it has CAPABILITY for AUTHENTICATE LOGIN" "Host1: xxx says it has CAPABILITY for AUTHENTICATE LOGIN"
What is the problem? What is the problem?
R. I've seen this issue on /X with the imap server R. I've seen this issue on /X with the imap server
CommuniGate Pro IMAP Server 6.0.11 CommuniGate Pro IMAP Server 6.0.11
The issue looks related to special characters in the password. The issue looks related to special characters in the password.
Solution for now: change the password, keep only standard (ASCII) Solution for now: change the password, keep only standard (ASCII)
alphanumeric characters ABC-YZ abc-yz 012-89. alphanumeric characters ABC-YZ abc-yz 012-89.

View file

@ -1,5 +1,5 @@
#!/bin/cat #!/bin/cat
$Id: FAQ.POP3.txt,v 1.5 2019/07/27 20:18:37 gilles Exp gilles $ $Id: FAQ.POP3.txt,v 1.6 2022/04/05 13:48:52 gilles Exp gilles $
This document is also available online at This document is also available online at
https://imapsync.lamiral.info/FAQ.d/ https://imapsync.lamiral.info/FAQ.d/
@ -24,8 +24,8 @@ Q. Can I use imapsync to migrate emails from pop3 server to imap server?
R1. No, but you can migrate emails from a pop3 server to an imap server R1. No, but you can migrate emails from a pop3 server to an imap server
with the command line tool pop2imap: with the command line tool pop2imap:
http://www.linux-france.org/prj/pop2imap/ http://linux-france.tk/prj/pop2imap/
http://www.linux-france.org/prj/pop2imap/README http://linux-france.tk/prj/pop2imap/README
R2. Yes, sometimes, because many pop3 servers runs in parallel R2. Yes, sometimes, because many pop3 servers runs in parallel
with an imap server on exactly the same mailboxes. They serve with an imap server on exactly the same mailboxes. They serve
@ -81,10 +81,10 @@ R4. Here are some points, an analyse that made me purpose the not
to bad but not very good R2 answer. to bad but not very good R2 answer.
There was a discussion about this issue on the imapsync mailing-list: There was a discussion about this issue on the imapsync mailing-list:
http://www.linux-france.org/prj/imapsync_list/msg02622.html http://linux-france.tk/prj/imapsync_list/msg02622.html
http://www.linux-france.org/prj/imapsync_list/msg02623.html http://linux-france.tk/prj/imapsync_list/msg02623.html
My reply was not very good My reply was not very good
http://www.linux-france.org/prj/imapsync_list/msg02624.html http://linux-france.tk/prj/imapsync_list/msg02624.html
It's because I wrote pop2imap and it uses a stateless It's because I wrote pop2imap and it uses a stateless
mechanism to avoid duplicates, I wasn't aware of UIDL when I wrote pop2imap, mechanism to avoid duplicates, I wasn't aware of UIDL when I wrote pop2imap,
and later when I entered the discussion. and later when I entered the discussion.

View file

@ -1,5 +1,5 @@
#!/bin/cat #!/bin/cat
$Id: FAQ.SSL_errors.txt,v 1.17 2021/08/01 12:49:00 gilles Exp gilles $ $Id: FAQ.SSL_errors.txt,v 1.18 2022/01/14 21:20:37 gilles Exp gilles $
This document is also available online at This document is also available online at
https://imapsync.lamiral.info/FAQ.d/ https://imapsync.lamiral.info/FAQ.d/
@ -12,6 +12,9 @@ https://imapsync.lamiral.info/FAQ.d/FAQ.SSL_errors.txt
Questions answered in this FAQ are: Questions answered in this FAQ are:
Q. What is the error
DEBUG: .../IO/Socket/SSL.pm:1177: global error: Undefined SSL object
Q. What are the errors Q. What are the errors
DEBUG: .../IO/Socket/SSL.pm:1165: local error: SSL write error DEBUG: .../IO/Socket/SSL.pm:1165: local error: SSL write error
or or
@ -19,19 +22,37 @@ Q. What are the errors
Q. What can I do to avoid those "SSL read/write errors"? Q. What can I do to avoid those "SSL read/write errors"?
Q. SSL connect attempt failed SSL Q. What are the errors
SSL connect attempt failed SSL
routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure
or or
SSL connect attempt failed SSL SSL connect attempt failed SSL
SSL routines:ssl_choose_client_version:unsupported protocol SSL routines:ssl_choose_client_version:unsupported protocol
Q. fatal SSL error: SSL connect attempt failed with unknown error Q. What is the error
fatal SSL error: SSL connect attempt failed with unknown error
SSL wants a read first SSL wants a read first
Q. How to see the certificate and identify problems in it? Q. How to see the certificate and identify problems in it?
Now the questions again with their answers. Now the questions again with their answers.
======================================================================
Q. What is the error
DEBUG: .../IO/Socket/SSL.pm:1177: global error: Undefined SSL object
R. It's a fake error from the Perl Module IO::Socket::SSL
Imapsync works well despite this fake warning but it's disturbing
when you encounter errors due to something else, you believe it's
the issue but no, it's something else to deal with.
This fake error is fixed in IO::Socket::SSL release 2.073
https://metacpan.org/dist/IO-Socket-SSL/changes
"fix #110 - prevent internal error warning in some cases"
https://github.com/noxxi/p5-io-socket-ssl/issues/110
imapsync.exe release 2.178 uses this fixed 2.073 IO::Socket::SSL
====================================================================== ======================================================================
Q. What are the errors Q. What are the errors
DEBUG: .../IO/Socket/SSL.pm:1165: local error: SSL write error DEBUG: .../IO/Socket/SSL.pm:1165: local error: SSL write error
@ -74,7 +95,8 @@ R5. Set up a ssltunnel proxy to the host.
a ssltunnel proxy. a ssltunnel proxy.
====================================================================== ======================================================================
Q. SSL connect attempt failed SSL Q. What are the errors
SSL connect attempt failed SSL
routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure
or or
SSL connect attempt failed SSL SSL connect attempt failed SSL
@ -149,7 +171,8 @@ In this case setting the version
to 'SSLv23:!SSLv2:!SSLv3:!TLSv1_1:!TLSv1_2' might help. to 'SSLv23:!SSLv2:!SSLv3:!TLSv1_1:!TLSv1_2' might help.
====================================================================== ======================================================================
Q. fatal SSL error: SSL connect attempt failed with unknown error Q. What is the error
fatal SSL error: SSL connect attempt failed with unknown error
SSL wants a read first SSL wants a read first
R. If you're using --ssl1 or --ssl2, try instead --tls1 or --tls2 R. If you're using --ssl1 or --ssl2, try instead --tls1 or --tls2
@ -201,7 +224,6 @@ ggEBAMUTJVdrTl86nDI2yO6Vz5l1qxMMPqJylQcgi9vDHpwsnUq5HGPv+qZNhM69
... ...
After an complete server update ("apt update && apt upgrade && /etc/init.d/dovecot restart"): After an complete server update ("apt update && apt upgrade && /etc/init.d/dovecot restart"):
echo | openssl s_client -crlf -connect test1.lamiral.info:993 echo | openssl s_client -crlf -connect test1.lamiral.info:993
@ -228,6 +250,7 @@ EnRlc3QxLmxhbWlyYWwuaW5mbzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
ggEBANuPNbYLPMZ4vPa9NBoHAUdIXqpi0eqdXMXd2sT+qRmqxS5ihr999BHOROcr ggEBANuPNbYLPMZ4vPa9NBoHAUdIXqpi0eqdXMXd2sT+qRmqxS5ihr999BHOROcr
... ...
Champagne!
====================================================================== ======================================================================
====================================================================== ======================================================================

View file

@ -1,4 +1,4 @@
$Id: FAQ.Two_Ways_Sync.txt,v 1.5 2021/06/10 11:21:09 gilles Exp gilles $ $Id: FAQ.Two_Ways_Sync.txt,v 1.6 2022/02/22 15:16:16 gilles Exp gilles $
This documentation is also available online at This documentation is also available online at
https://imapsync.lamiral.info/FAQ.d/ https://imapsync.lamiral.info/FAQ.d/
@ -6,18 +6,9 @@ https://imapsync.lamiral.info/FAQ.d/FAQ.Two_Ways_Sync.txt
======================================================================= =======================================================================
Two ways sync with Imapsync ================ Two ways sync with Imapsync =========================
======================================================================= =======================================================================
Questions answered in this FAQ are:
Q. Can Imapsync do a good "two ways" sync?
Short answer: no, not a good one. Why?
Now the questions again with their answers.
======================================================================= =======================================================================
Q. Can Imapsync do a good "two ways" sync? Q. Can Imapsync do a good "two ways" sync?
Short answer: no, not a good one. Why? Short answer: no, not a good one. Why?
@ -52,16 +43,14 @@ run a sync with the --delete2 option from A to B.
If you know that the missing messages on A are missing messages from B If you know that the missing messages on A are missing messages from B
that has to be copied to A then run a sync from B to A. that has to be copied to A then run a sync from B to A.
If you know it's a mixed scenario, some deletions/moves on A, If you know it's a mixed scenario, that there are some deletions/moves
and some deletions/moves on B, but not the same, then you are in on A, and there are some deletions/moves on B, but not the same, then
trouble and so you end up with a not very good "two ways" sync. you are in trouble and it ends up with a not very good "two ways"
I suggest to avoid imapsync to do deletions in that case, which is sync. In that case, two runs of imapsync, one from A to B, one from B
the default imapsync behavior. to A, put the two accounts in a synchronized state. But deletions on
either side get cancelled and folder renamings on either side bring
messages duplicates.
With a two ways sync, the account user is very surprised and
disapointed when his actions (deletions, renamings, or movings) come
back: the deletions are cancelled, the renamings and movings end up
with duplicates.
======================================================================= =======================================================================
======================================================================= =======================================================================

View file

@ -1,5 +1,5 @@
#!/bin/cat #!/bin/cat
$Id: FAQ.XOAUTH2.txt,v 1.17 2021/01/21 13:25:02 gilles Exp gilles $ $Id: FAQ.XOAUTH2.txt,v 1.18 2022/04/05 13:48:52 gilles Exp gilles $
This document is also available online at This document is also available online at
https://imapsync.lamiral.info/FAQ.d/ https://imapsync.lamiral.info/FAQ.d/
@ -154,7 +154,7 @@ also called cpanminus.
The code and first explanation comes from Joaquin Lopez at The code and first explanation comes from Joaquin Lopez at
https://github.com/imapsync/imapsync/pull/25 https://github.com/imapsync/imapsync/pull/25
http://www.linux-france.org/prj/imapsync_list/msg02129.html http://linux-france.tk/prj/imapsync_list/msg02129.html
Also, the binary command "openssl" is needed since it is used to Also, the binary command "openssl" is needed since it is used to
convert the pk12 file. convert the pk12 file.

View file

@ -1,5 +1,5 @@
# $Id: htaccess.txt,v 1.32 2021/07/23 12:38:19 gilles Exp gilles $ # $Id: htaccess.txt,v 1.33 2022/04/06 10:27:52 gilles Exp gilles $
AddDescription "<b>Back</b> to Imapsync main page." .. AddDescription "<b>Back</b> to Imapsync main page." ..
@ -43,6 +43,7 @@ AddDescription "<b>Gmail</b> accounts." FAQ.Gmai
AddDescription "<b>GoDaddy</b> accounts." FAQ.GoDaddy.txt AddDescription "<b>GoDaddy</b> accounts." FAQ.GoDaddy.txt
AddDescription "<b>IceWarp</b> accounts." FAQ.IceWarp.txt AddDescription "<b>IceWarp</b> accounts." FAQ.IceWarp.txt
AddDescription "<b>ISP tips</b>." FAQ.ISP.txt AddDescription "<b>ISP tips</b>." FAQ.ISP.txt
AddDescription "<b>James</b> accounts." FAQ.James.txt
AddDescription "<b>Kerio</b> accounts." FAQ.Kerio.txt AddDescription "<b>Kerio</b> accounts." FAQ.Kerio.txt
AddDescription "<b>MailEnable</b> accounts." FAQ.MailEnable.txt AddDescription "<b>MailEnable</b> accounts." FAQ.MailEnable.txt
AddDescription "<b>Massive and bulk</b> migrations." FAQ.Massive.txt AddDescription "<b>Massive and bulk</b> migrations." FAQ.Massive.txt

View file

@ -1,24 +1,38 @@
## Dockerfile for building a docker imapsync image ## Dockerfile for building a docker imapsync image
# $Id: Dockerfile,v 1.38 2021/11/29 10:20:56 gilles Exp gilles $ # $Id: Dockerfile,v 1.42 2022/04/04 19:16:50 gilles Exp gilles $
# I use the following command to build the image: # I use the following command to build the image:
# #
# docker build -t gilleslamiral/imapsync . # docker build -t gilleslamiral/imapsync .
# #
# where this Dockerfile is in the current directory # where this Dockerfile is in the current directory
# #
# This Dockerfile build an image with two imapsync
# 1) One comes from https://imapsync.lamiral.info/imapsync
# and goes to /usr/bin/imapsync in the Docker image
# It is used with the command:
#
# docker run gilleslamiral/imapsync imapsync ...
#
# 2) One comes from the local file ./imapsync
# and goes to /imapsync in the Docker image
# It is used with the command:
#
# docker run gilleslamiral/imapsync /imapsync ...
# I thank you very much # I thank you very much
# I like thanks # I like thanks
# I like stars # I like stars
# I also need money to keep on doing this stuff # I like money to keep on doing this stuff
# Number of imapsync images pulled so far (2021_11_29): 608326 # Number of imapsync images pulled so far (2022_04_04): 673551
# Command used: # Command used:
# curl -s https://hub.docker.com/v2/repositories/gilleslamiral/imapsync/ | jq '.pull_count' # curl -s https://hub.docker.com/v2/repositories/gilleslamiral/imapsync/ | jq '.pull_count'
# Debian Buster is Debian 10 # Debian Bullseye is Debian 11
FROM debian:buster FROM debian:bullseye
LABEL maintainer="Gilles LAMIRAL <gilles@lamiral.info>" \ LABEL maintainer="Gilles LAMIRAL <gilles@lamiral.info>" \
description="Imapsync" \ description="Imapsync" \
@ -30,8 +44,6 @@ LABEL maintainer="Gilles LAMIRAL <gilles@lamiral.info>" \
COPY Dockerfile imapsyn[c] prerequisites_imapsyn[c] / COPY Dockerfile imapsyn[c] prerequisites_imapsyn[c] /
RUN set -xe && \ RUN set -xe && \
apt-get update \ apt-get update \
&& apt-get install -y \ && apt-get install -y \
@ -69,7 +81,11 @@ RUN set -xe && \
ncat \ ncat \
openssl \ openssl \
ca-certificates \ ca-certificates \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/* \
&& cpanm IO::Socket::SSL
# I added the IO::Socket::SSL update to avoid the annoying, confusing and useless warning
# DEBUG: .../IO/Socket/SSL.pm:1177: global error: Undefined SSL object
RUN set -xe \ RUN set -xe \
&& cd /usr/bin/ \ && cd /usr/bin/ \
@ -78,7 +94,7 @@ RUN set -xe \
https://imapsync.lamiral.info/prerequisites_imapsync \ https://imapsync.lamiral.info/prerequisites_imapsync \
https://raw.githubusercontent.com/google/gmail-oauth2-tools/master/python/oauth2.py \ https://raw.githubusercontent.com/google/gmail-oauth2-tools/master/python/oauth2.py \
&& chmod +x imapsync 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 && /usr/bin/imapsync --testslive && /usr/bin/imapsync --tests # just_a_comment_to_force_update 2022_04_04_21_16_50
USER nobody:nogroup USER nobody:nogroup

View file

@ -1,5 +1,5 @@
#!/bin/cat #!/bin/cat
# $Id: INSTALL.Centos.txt,v 1.29 2021/12/17 14:52:20 gilles Exp gilles $ # $Id: INSTALL.Centos.txt,v 1.31 2022/02/19 20:28:13 gilles Exp gilles $
This documentation is also located online at This documentation is also located online at
https://imapsync.lamiral.info/INSTALL.d/ https://imapsync.lamiral.info/INSTALL.d/
@ -24,6 +24,29 @@ How to install imapsync on AlmaLinux and Centos 8:
imapsync --testslive imapsync --testslive
For Centos 8 End Of Life fix:
https://www.centos.org/centos-linux-eol/
If you encounter the error
"Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist"
Do this:
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-Linux-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-Linux-*
dnf update
To upgrade to CentOS stream:
dnf install centos-release-stream
dnf swap centos-{linux,stream}-repos
dnf distro-sync
Taken from
https://stackoverflow.com/questions/70926799/centos-through-vm-no-urls-in-mirrorlist
and tested successfuly on one of my hosts, an ex-Centos8/CentOS-stream now.
======================================================================= =======================================================================
AlmaLinux and Centos 8 and latest imapsync AlmaLinux and Centos 8 and latest imapsync
======================================================================= =======================================================================

View file

@ -1,5 +1,5 @@
#!/bin/cat #!/bin/cat
# $Id: INSTALL.Darwin.txt,v 1.36 2021/12/24 21:08:13 gilles Exp gilles $ # $Id: INSTALL.Darwin.txt,v 1.38 2022/04/05 19:44:30 gilles Exp gilles $
This documentation is also located online at This documentation is also located online at
https://imapsync.lamiral.info/INSTALL.d/ https://imapsync.lamiral.info/INSTALL.d/
@ -20,21 +20,20 @@ E) Building imapsync binary on Darwin / Mac OS X
A) Installing imapsync binary on Darwin / Mac OS X A) Installing imapsync binary on Darwin / Mac OS X
======================================================================= =======================================================================
There is a standalone imapsync binary for Mac OS X There is a standalone imapsync binary for Mac OS X
called "imapsync_bin_Darwin" (without the quotes), called "imapsync_bin_Darwin" (without the quotes),
available in the compressed tarball called imapsync-2.140.tgz available in the compressed tarball called imapsync-2.200.tgz
where 2.140 is the imapsync version number. where 2.200 is the imapsync version number.
In case you haven't buy it yet or forgot where the download link is, In case you haven't buy it yet or forgot where the download link is,
check https://imapsync.lamiral.info/dist/ check https://imapsync.lamiral.info/dist/
Download the tarball imapsync-2.140.tgz, not the binary imapsync_bin_Darwin Download the tarball imapsync-2.200.tgz, not the binary imapsync_bin_Darwin
because the binary is also in the tarball and there are other useful files 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 in the tarball. The binary present in /dist/ is just there for a fast upgrade
when you need one. when you need one.
I suppose this tarball imapsync-2.140.tgz is downloaded under your $HOME directory, I suppose this tarball imapsync-2.200.tgz is downloaded under your $HOME directory,
let say /Users/gilles/, but you can put it anywhere. In real, 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 not /Users/gilles/, it maybe /Users/john/ or /Users/zoey/ where John or Zoey
is you login name. is you login name.
@ -45,19 +44,19 @@ Untar the tarball:
cd cd
pwd pwd
tar xzvf imapsync-2.140.tgz tar xzvf imapsync-2.200.tgz
In case the previous command fails, it means the tarball file called imapsync-2.140.tgz In case the previous command fails, it means the tarball file called imapsync-2.200.tgz
is not in your $HOME directory, you may have downloaded it elsewhere on the file system. is not in your $HOME directory, you may have downloaded it elsewhere on the file system.
A way to find it is the command: A way to find it is the command:
find / | grep imapsync find / | grep imapsync
Now that the tarball is extracted, it created a directory called imapsync-2.140/ Now that the tarball is extracted, it created a directory called imapsync-2.200/
Go into the directory imapsync-2.140 with the command: Go into the directory imapsync-2.200 with the command:
cd imapsync-2.140 cd imapsync-2.200
First let's have a simple run to see if imapsync_bin_Darwin works. First let's have a simple run to see if imapsync_bin_Darwin works.

View file

@ -1,5 +1,5 @@
#!/bin/cat #!/bin/cat
# $Id: INSTALL.Debian.txt,v 1.35 2021/12/17 20:30:33 gilles Exp gilles $ # $Id: INSTALL.Debian.txt,v 1.37 2022/03/29 11:03:55 gilles Exp gilles $
This documentation is also located online at This documentation is also located online at
https://imapsync.lamiral.info/INSTALL.d/ https://imapsync.lamiral.info/INSTALL.d/
@ -8,7 +8,7 @@ https://imapsync.lamiral.info/INSTALL.d/INSTALL.Debian.txt
There is four install sections in this document, There is four install sections in this document,
1) one for Debian 9 Stretch, Debian 10 Buster, Debian 11 Bullseye 1) one for Debian 9 Stretch, Debian 10 Buster, Debian 11 Bullseye
2) one for all the Debian called "After installing the dependencies" 2) one for all the Debian, called "After installing the dependencies".
3) one for Debian 8 Jessie (obsolete) 3) one for Debian 8 Jessie (obsolete)
4) one for Debian 7 Wheezy (even more obsolete) 4) one for Debian 7 Wheezy (even more obsolete)
@ -110,7 +110,7 @@ You don't have to be root to test and use imapsync.
Take imapsync either on github: Take imapsync either on github:
wget -N https://github.com/imapsync/imapsync/blob/master/imapsync wget -N https://raw.githubusercontent.com/imapsync/imapsync/master/imapsync
or be on the cutting edge with the upstream site: or be on the cutting edge with the upstream site:

View file

@ -1,5 +1,5 @@
#!/bin/cat #!/bin/cat
# $Id: INSTALL.Docker_build.txt,v 1.15 2021/11/29 11:56:11 gilles Exp gilles $ # $Id: INSTALL.Docker_build.txt,v 1.16 2022/04/05 13:20:24 gilles Exp gilles $
This documentation is also located online at This documentation is also located online at
https://imapsync.lamiral.info/INSTALL.d/ https://imapsync.lamiral.info/INSTALL.d/
@ -14,25 +14,39 @@ Nearly verbatim copy from https://imapsync.lamiral.info/INSTALL.d/Dockerfile
## Dockerfile for building a docker imapsync image ## Dockerfile for building a docker imapsync image
# Id: Dockerfile,v 1.38 2021/11/29 10:20:56 gilles Exp gilles $ # Id: Dockerfile,v 1.42 2022/04/04 19:16:50 gilles Exp gilles $
# I use the following command to build the image: # I use the following command to build the image:
# #
# docker build -t gilleslamiral/imapsync . # docker build -t gilleslamiral/imapsync .
# #
# where this Dockerfile is in the current directory # where this Dockerfile is in the current directory
# #
# This Dockerfile build an image with two imapsync
# 1) One comes from https://imapsync.lamiral.info/imapsync
# and goes to /usr/bin/imapsync in the Docker image
# It is used with the command:
#
# docker run gilleslamiral/imapsync imapsync ...
#
# 2) One comes from the local file ./imapsync
# and goes to /imapsync in the Docker image
# It is used with the command:
#
# docker run gilleslamiral/imapsync /imapsync ...
# I thank you very much # I thank you very much
# I like thanks # I like thanks
# I like stars # I like stars
# I also need money to keep on doing this stuff # I like money to keep on doing this stuff
# Number of imapsync images pulled so far (2021_11_29): 608326 # Number of imapsync images pulled so far (2022_04_04): 673551
# Command used: # Command used:
# curl -s https://hub.docker.com/v2/repositories/gilleslamiral/imapsync/ | jq '.pull_count' # curl -s https://hub.docker.com/v2/repositories/gilleslamiral/imapsync/ | jq '.pull_count'
# Debian Buster is Debian 10 # Debian Bullseye is Debian 11
FROM debian:buster FROM debian:bullseye
LABEL maintainer="Gilles LAMIRAL <gilles@lamiral.info>" \ LABEL maintainer="Gilles LAMIRAL <gilles@lamiral.info>" \
description="Imapsync" \ description="Imapsync" \
@ -44,8 +58,6 @@ LABEL maintainer="Gilles LAMIRAL <gilles@lamiral.info>" \
COPY Dockerfile imapsyn[c] prerequisites_imapsyn[c] / COPY Dockerfile imapsyn[c] prerequisites_imapsyn[c] /
RUN set -xe && \ RUN set -xe && \
apt-get update \ apt-get update \
&& apt-get install -y \ && apt-get install -y \
@ -83,7 +95,11 @@ RUN set -xe && \
ncat \ ncat \
openssl \ openssl \
ca-certificates \ ca-certificates \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/* \
&& cpanm IO::Socket::SSL
# I added the IO::Socket::SSL update to avoid the annoying, confusing and useless warning
# DEBUG: .../IO/Socket/SSL.pm:1177: global error: Undefined SSL object
RUN set -xe \ RUN set -xe \
&& cd /usr/bin/ \ && cd /usr/bin/ \
@ -92,7 +108,7 @@ RUN set -xe \
https://imapsync.lamiral.info/prerequisites_imapsync \ https://imapsync.lamiral.info/prerequisites_imapsync \
https://raw.githubusercontent.com/google/gmail-oauth2-tools/master/python/oauth2.py \ https://raw.githubusercontent.com/google/gmail-oauth2-tools/master/python/oauth2.py \
&& chmod +x imapsync 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 && /usr/bin/imapsync --testslive && /usr/bin/imapsync --tests # just_a_comment_to_force_update 2022_04_04_21_16_50
USER nobody:nogroup USER nobody:nogroup
@ -107,7 +123,5 @@ CMD ["/usr/bin/imapsync"]
# #
# End of imapsync Dockerfile # End of imapsync Dockerfile
======================================================================= =======================================================================
======================================================================= =======================================================================

View file

@ -1,5 +1,5 @@
#!/bin/cat #!/bin/cat
# $Id: INSTALL.OnlineUI.txt,v 1.50 2021/09/20 13:47:20 gilles Exp gilles $ # $Id: INSTALL.OnlineUI.txt,v 1.52 2022/03/23 11:02:05 gilles Exp gilles $
This documentation is also located online at This documentation is also located online at
https://imapsync.lamiral.info/INSTALL.d/ https://imapsync.lamiral.info/INSTALL.d/
@ -26,26 +26,25 @@ Load mean: 0.8 on a CPU 4 cores "Intel(R) i5-2320 3.00GHz K8-class"
======================================================================= =======================================================================
Installation Installation
You have to be a little familiar with what a CGI script is You have to be a little familiar with what a CGI script is and how to
and how to activate a CGI script on the Apache activate a CGI script on the Apache HTTP server, or any other HTTP
HTTP server, or any other HTTP server. I have received demands server. I have received demands to run it on the Ngnix HTTP server but
to run it on the Ngnix HTTP server but I haven't played with it yet. I haven't played with it yet. Linux is also a preferred platform (I
Linux is also a preferred platform (I run /X service on Linux and FreeBSD). run /X service on Linux and FreeBSD).
I have tested this visual interface on Mac. It works. I have tested this visual interface on Mac. It works. For now, it
For now, it demands some skills few Mac users have. demands some skills few Mac users have. Drop me a note in case you
Drop me a note in case you want to do that. want to do that.
I have tested this visual interface on Windows, I have tested this visual interface on Windows, it fails on Windows
it fails on Windows because of some hardcoded Unix paths. because of some hardcoded Unix paths. I'm working on it to be Windows
I'm working on it to be Windows ok but it's not done yet (May 2020). ok but it's not done yet (May 2020).
Some users have successfully installed a /X visual interface Some users have successfully installed a /X visual interface on
on Windows using a Linux VM machine. Windows using a Linux VM machine.
The web visual user interface frontend /X is compounded in four The web visual user interface frontend /X is compounded in four files:
files: a html5 file, a CSS file, a javascript file, and a html5 file, a CSS file, a javascript file, and a logo image:
a logo image:
* https://imapsync.lamiral.info/X/imapsync_form_extra.html * https://imapsync.lamiral.info/X/imapsync_form_extra.html
* https://imapsync.lamiral.info/X/imapsync_form.css * https://imapsync.lamiral.info/X/imapsync_form.css
@ -53,29 +52,28 @@ a logo image:
* https://imapsync.lamiral.info/X/logo_imapsync_Xn.png * https://imapsync.lamiral.info/X/logo_imapsync_Xn.png
You can do a "view source" to see the HTML file as You can do a "view source" to see the HTML file as it is written, and
it is written, and a "save" to get it locally. a "save" to get it locally. The three other files can be saved the
The three other files can be saved the same way or same way or with a command named "wget". I strongly suggest using
with a command named "wget". I suggest using wget, wget, see below the ready-to-use command lines.
see below the ready-to-use command lines.
Those four files can be put anywhere on a web server, Those four files can be put anywhere on a web server, as long as they
as long as they stand in the same directory. If you stand in the same directory. If you want to put them in different
want to put them in different directories, just change directories, just change the content of imapsync_form_extra.html to
the content of imapsync_form_extra.html to reflect the change, reflect the change, ie, change the two lines referencing
ie, change the two lines referencing imapsync_form.css and imapsync_form.js imapsync_form.css and imapsync_form.js href="imapsync_form.css" (near
href="imapsync_form.css" (near the beginning of imapsync_form_extra.html) the beginning of imapsync_form_extra.html) src="imapsync_form.js"
src="imapsync_form.js" (near the end of imapsync_form_extra.html) (near the end of imapsync_form_extra.html) I let you change the image
I let you change the image logo as an exercise, it's safe if you fail. logo as an exercise, it's safe if you fail.
The actual imap syncing work is done by imapsync acting as a CGI, The actual imap syncing work is done by imapsync acting as a CGI, the
the visual interface is only there to give imapsync the parameters visual interface is only there to give imapsync the parameters needed
needed for the sync. for the sync.
Use at least Perl module CGI.pm release 4.08 (2014-10-18) Use at least Perl module CGI.pm release 4.08 (2014-10-18) to avoid the
to avoid the bug "Undefined subroutine CGI::multi_param". bug "Undefined subroutine CGI::multi_param". You can use the command
You can use the command named cpanm to upgrade CGI.pm to named cpanm to upgrade CGI.pm to its last version, it's the easiest
its last version, it's the easiest way. way.
Print the CGI.pm release with: Print the CGI.pm release with:
@ -85,8 +83,12 @@ If it is under release 4.08 (2014-10-18) then upgrade it with
cpanm CGI cpanm CGI
It is a good thing to remove the old one if it was installed It is a good thing to remove the old one if it was installed by a
by a distribution package, I let you this part as an exercise too. distribution package, I let you this part as an exercise too. Ok, here
is a way:
apt remove libcgi-pm-perl # for the Debian family
dnf remove perl-CGI # for the Centos family
To check and fix the Perl modules dependencies, run: To check and fix the Perl modules dependencies, run:
@ -94,50 +96,59 @@ To check and fix the Perl modules dependencies, run:
wget -N https://imapsync.lamiral.info/prerequisites_imapsync wget -N https://imapsync.lamiral.info/prerequisites_imapsync
sh prerequisites_imapsync sh prerequisites_imapsync
To make imapsync work as a CGI script, there are two conditions. To make imapsync work as a CGI script, there are three conditions.
First, imapsync has to work by itself on the web host.
If imapsync doesn't work by itself, as a command line, First, imapsync has to work by itself on the web host. If imapsync
then it won't work as a CGI script. doesn't work by itself, as a command line, then it won't work as a CGI
script.
Second, imapsync has to work by itself on the web host using Second, imapsync has to work by itself on the web host using the Unix
the Unix user running the webserver. Detailed examples to user running the webserver.
verify that will be provided further in this document.
Third, the file imapsync has to be considered as a cgi script.
Command lines to provide and verify those three conditions will be
provided further in this document, for the Debian family systems and
for the Centos family systems. You are strongly advised to follow this
commands if need and want help from me because I will first ask you to
run them before searching what you did wrong.
The imapsync_form_extra.html file in action calls the CGI location The imapsync_form_extra.html file in action calls the CGI location
/cgi-bin/imapsync /cgi-bin/imapsync
which has to be imapsync itself, the file script (not the directory). which has to be imapsync itself, the file script (not the directory).
The very latest and relatively stable imapsync is at The very latest and relatively stable imapsync is
https://imapsync.lamiral.info/imapsync https://imapsync.lamiral.info/imapsync
This file is the program file used verbatim for the service given at This file is the program file used verbatim for the service given at
https://imapsync.lamiral.info/X/ https://imapsync.lamiral.info/X/
Copy the three files imapsync_form.* on a directory that is exported Copy the three files imapsync_form.* on a directory that is exported
by your HTTP server. by your HTTP server.
Copy the imapsync script on the cgi-bin/ directory Copy the imapsync script on the cgi-bin/ directory
allowing CGIs and you'll have your imapsync visual interface allowing CGIs and you'll have your imapsync visual interface
and service. The cgi-bin/ directory is usually outside the and service. The cgi-bin/ directory is usually outside the
hierarchy exported to anybody by the HTTP server. hierarchy exported to anybody by the HTTP server.
The default Apache 2.4 timeout is 60 seconds, one minute, 300 for older Apache. The default Apache 2.4 timeout is 60 seconds, one minute, and 300
secondes for older Apache, 5 minutes. See
https://httpd.apache.org/docs/2.4/mod/core.html#timeout https://httpd.apache.org/docs/2.4/mod/core.html#timeout
Mine is now "Timeout 3600", 3600 seconds, an hour. I chose this huge
timeout value because imapsync can spend a long time without talking while
getting the headers of huge folders of 100k messages.
If you intend to offer this service for huge mailboxes or for a long
time, I strongly recommand you to set this "Timeout 3600" in
the Apache configuration right now because you will sure end up with this
timeout issue in a few months.
Search for timeouts in the Apache error log to see if you have timeout issues.
Now that I have explained the general context for any system, I use "Timeout 3600", 3600 seconds, an hour. I chose this huge timeout
I'll describe concrete examples on several systems, value because imapsync can spend a long time without talking while
Debian/Ubuntu and Centos. Feedbacks show that the Centos getting the headers of huge folders of 100k messages. If you intend
process is easier in case you don't know very much any of the to offer this service for huge mailboxes or for a long time, I
Linux distributions. I add that if you don't know very much any strongly recommand you to set this "Timeout 3600" in the Apache
of the Linux distributions then you shouldn't install this configuration right now because you will sure end up with this timeout
imapsync service at all. issue in a few months. You can search for timeouts in the Apache error
log to see if you have timeout issues.
Now that I have explained the general context for any system, I'll
describe concrete examples on several systems, Debian/Ubuntu and
Centos. Feedbacks show that the Centos process is easier in case you
don't know very much any Linux distribution. But I have to add that if
you don't know very much the Linux distribution you use, then you
shouldn't install this imapsync service at all.
============================================================================= =============================================================================
@ -175,7 +186,18 @@ ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
Require all granted Require all granted
</Directory> </Directory>
That's all for the Apache configuration side. In recent Debian distributions you can activate this cgi
stuff with the following commands:
a2enmod cgi
a2enconf serve-cgi-bin
/etc/init.d/apache2 reload
If the cgi mode and the cgi-bin configuration are not activated then
you may encounter a 404 error when, later, you will run the command
wget -nv -S -O- http://localhost/cgi-bin/imapsync?testslive=1
That's all for the Apache Debian family configuration side.
Now get, test, and install the latest imapsync: Now get, test, and install the latest imapsync:
@ -189,33 +211,38 @@ Now get, test, and install the latest imapsync:
cp imapsync /usr/lib/cgi-bin/ cp imapsync /usr/lib/cgi-bin/
Assuming that the Unix account running Apache is www-data, Assuming that the Unix account running Apache is www-data, check that
check that it will work under Apache with this command: it will work under Apache with this command:
su -s /bin/sh -c 'SERVER_SOFTWARE=foo /usr/lib/cgi-bin/imapsync' www-data su -s /bin/sh -c 'SERVER_SOFTWARE=foo /usr/lib/cgi-bin/imapsync' www-data
Test that imapsync is considered a cgi with:
wget -nv -S -O- http://localhost/cgi-bin/imapsync?testslive=1 wget -nv -S -O- http://localhost/cgi-bin/imapsync?testslive=1
The last command should print something like: The last command should print something like:
Status: 200 OK to sync IMAP boxes. Load on bar is ... Status: 200 OK to sync IMAP boxes. Load on bar is ...
... ...
If you get a 404 here then review the cgi installation and
configuration part.
You can also verify that the webserver is not buffering its output with the You can also verify that the webserver is not buffering its output with the
command: command:
wget -nv -S -O- 'http://localhost/cgi-bin/imapsync?testslive=1&simulong=10' wget -nv -S -O- 'http://localhost/cgi-bin/imapsync?testslive=1&simulong=10'
You should get the output as time goes on. If you don't get the You should get the output as time goes on. If you don't get the output
output as time goes on, ie you see no output then all output as time goes on, ie you see no output then all output at once, it
at once, it means the webserver is buffering. Fix it with means the webserver is buffering. Fix it with the "SetEnv no-gzip 1"
the "SetEnv no-gzip 1" described above. described above.
The UI front-end file place on the server disk in The UI front-end file place on the server disk in this example is
this example is
/var/www/html/X/imapsync_form_extra.html /var/www/html/X/imapsync_form_extra.html
but it can be placed anywhere on the disk, the important but it can be placed anywhere on the disk, the important thing is that
thing is that it has to be served by the webserver. it has to be served by the webserver.
mkdir /var/www/html/X/ mkdir /var/www/html/X/
cd /var/www/html/X/ cd /var/www/html/X/
@ -228,9 +255,8 @@ thing is that it has to be served by the webserver.
The imapsync process working directory in cgi mode is The imapsync process working directory in cgi mode is
/var/tmp/imapsync_cgi/ /var/tmp/imapsync_cgi/
it is not configurable unless changing it in it is not configurable unless changing it in imapsync directly, it is
imapsync directly, it is hard-coded in imapsync. hard-coded in imapsync. In this directory will go the log files and
In this directory will go the log files and
the pid files. the pid files.
Check Check
@ -238,14 +264,14 @@ Check
or the safer or the safer
https://yourhost/X/imapsync_form_extra.html https://yourhost/X/imapsync_form_extra.html
That's all for installing a /X service on Debian. That's all for installing a /X service on a Debian family system.
============================================================================= =============================================================================
B) Here is a concrete example on a Centos 7 server with the Apache B) Here is a concrete example on a Centos 7 server with the Apache
webserver httpd: webserver httpd:
First, follow and apply the section "Centos 7 and latest imapsync" First, follow and apply the section "Centos 7 and latest imapsync" at
at https://imapsync.lamiral.info/INSTALL.d/INSTALL.Centos.txt https://imapsync.lamiral.info/INSTALL.d/INSTALL.Centos.txt
Then: Then:
@ -291,14 +317,14 @@ The last command should print something like:
Status: 200 OK to sync IMAP boxes. Load on bar is ... Status: 200 OK to sync IMAP boxes. Load on bar is ...
... ...
You can also verify that the webserver is not buffering its output with the You can also verify that the webserver is not buffering its output
command: with the command:
wget -nv -S -O- 'http://localhost/cgi-bin/imapsync?testslive=1&simulong=10' wget -nv -S -O- 'http://localhost/cgi-bin/imapsync?testslive=1&simulong=10'
You should get the output as time goes on. If you don't, no output then all You should get the output as time goes on. If you don't, no output
output at once, it means the webserver is buffering. Fix it with then all output at once, it means the webserver is buffering. Fix it
the "SetEnv no-gzip 1" described above. with the "SetEnv no-gzip 1" described above.
Now check Now check
http://yourhost/X/imapsync_form_extra.html http://yourhost/X/imapsync_form_extra.html
@ -310,17 +336,19 @@ That's all for installing a /X service on Centos 7.
B bis) How about Centos 8? B bis) How about Centos 8?
Follow the procedure for Centos 7. While imapsync is ok on the command line, Follow the procedure for Centos 7. While imapsync is ok on the command
you will encounter some permission denied in the CGI context. Something like: line, you will encounter some permission denied in the CGI
context. Something like:
wget -nv -S -O- http://localhost/cgi-bin/imapsync?testslive=1 wget -nv -S -O- http://localhost/cgi-bin/imapsync?testslive=1
... ...
Host1 failure: can not open imap connection on host1 [test1.lamiral.info] Host1 failure: can not open imap connection on host1
with user [test1]: Unable to connect to test1.lamiral.info: Permission denied [test1.lamiral.info] with user [test1]: Unable to connect to
test1.lamiral.info: Permission denied
The issue might come from SELinux. I haven't dig into SELinux enough to give The issue might come from SELinux. I haven't dig into SELinux enough
you the commands that will allow imapsync online and only it while maintaining to give you the commands that will allow imapsync online and only it
SELinux in enforcing mode. while maintaining SELinux in enforcing mode.
Quick solution: Quick solution:
@ -336,36 +364,21 @@ To go back to the previous state:
Nota bene Nota bene
========= =========
You may also want to avoid being placed by systemd in
a directory like (where xxx are crypto hash characters): You may also want to avoid being placed by systemd in a directory like
(where xxx are crypto hash characters):
/var/tmp/systemd-private-xxx-httpd.service-xxx/tmp/ /var/tmp/systemd-private-xxx-httpd.service-xxx/tmp/
In that case, edit the file In that case, see the Troubleshooting section below.
/usr/lib/systemd/system/httpd.service
and in it, replace the line
PrivateTmp=true
by the line
PrivateTmp=false
then reload systemd and restart httpd with the commands:
systemctl daemon-reload
systemctl restart httpd
systemctl status httpd
======================================================================= =======================================================================
=================== Bandwidth statistics ========================== =================== Bandwidth statistics ==========================
======================================================================= =======================================================================
If you want the bandwidth statistics like the ones at the bottom If you want the bandwidth statistics like the ones at the bottom of
of the page and following the image link, more detailed at the page and following the image link, more detailed at
https://imapsync.lamiral.info/vnstat/vnstati.html https://imapsync.lamiral.info/vnstat/vnstati.html
Those stats are generated by vnstat Those stats are generated by vnstat
@ -392,39 +405,50 @@ vnstati -5 -o /var/www/vnstat/vnstat_5.png
The log says the temporary directory is The log says the temporary directory is
/var/tmp/imapsync_cgi/ /var/tmp/imapsync_cgi/
but it is not in the system. but this directory is not in the system. What a mystery!
It may be that the apache or httpd service is run by systemd with a jailed It may be that the apache or httpd service is run by systemd with a
temporary directory. jailed temporary directory.
Solution: Solution:
find /etc/systemd/ /usr/lib/systemd/ |xargs grep -s PrivateTmp find /etc/systemd/ /usr/lib/systemd/ | xargs grep -s PrivateTmp
If systemd jails Apache then you'll find a line like: If systemd jails Apache, then you'll find a line like:
/etc/systemd/system/multi-user.target.wants/apache2.service:PrivateTmp=true /etc/systemd/system/multi-user.target.wants/apache2.service:PrivateTmp=true
(Debian/Ubuntu) (Debian/Ubuntu)
or or
/usr/lib/systemd/system/httpd.service:PrivateTmp=true /usr/lib/systemd/system/httpd.service:PrivateTmp=true
(Centos) (Centos)
Replace this line "PrivateTmp=true" The goal is to override the line
in /etc/systemd/system/multi-user.target.wants/apache2.service
PrivateTmp=true
found in /etc/systemd/system/multi-user.target.wants/apache2.service
or or
/usr/lib/systemd/system/httpd.service /usr/lib/systemd/system/httpd.service
with: with the line:
PrivateTmp=false PrivateTmp=false
Then reload the systemd daemon and restart the apache2 service The right way to do it is by using the "systemctl edit ..." command
and then reload the systemd daemon and restart the apache2 service.
You can also edit directly the file override.conf if you know where
to do it. If you don't use the override.conf mechanism then your change will
be canceled the next time the apache package is updated.
Debian: Debian:
systemctl edit apache2
cat /etc/systemd/system/apache2.service.d/override.conf
systemctl daemon-reload systemctl daemon-reload
systemctl restart apache2 systemctl restart apache2
systemctl status apache2 systemctl status apache2
Centos: Centos:
systemctl edit httpd
cat /etc/systemd/system/httpd.service.d/override.conf
systemctl daemon-reload systemctl daemon-reload
systemctl restart httpd systemctl restart httpd
systemctl status httpd systemctl status httpd
@ -461,6 +485,7 @@ So if your https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js
is not what it should be, your access looks compromised. is not what it should be, your access looks compromised.
Thanks to Dominik Ulrich for this insight! Thanks to Dominik Ulrich for this insight!
======================================================================= =======================================================================
======================================================================= =======================================================================
@ -487,11 +512,11 @@ Debian:
chmod +x imapsync_shell_wrapper chmod +x imapsync_shell_wrapper
cp imapsync_shell_wrapper /usr/lib/cgi-bin/ cp imapsync_shell_wrapper /usr/lib/cgi-bin/
Normally, you only have to change the script imapsync_shell_wrapper Normally, you only have to change the script imapsync_shell_wrapper to
to suit your needs. suit your needs.
Have in mind that the abort button will kill only one imapsync so Have in mind that the abort button will kill only one imapsync so it
it is not a working button in case of successive imapsync runs. is not a working button in case of successive imapsync runs.
======================================================================= =======================================================================
======================================================================= =======================================================================
@ -500,13 +525,12 @@ it is not a working button in case of successive imapsync runs.
====== mod_perl failure ====== ====== mod_perl failure ======
This part is for mod_perl experts only. This part is for mod_perl experts only.
The script imapsync doesn't work under Modperl::Registry
nor under ModPerl::PerlRun. So read on if you think you
are better than me.
I tried the standard way, telling how any cgi Perl script The script imapsync doesn't work under Modperl::Registry nor under
can be run under mod_perl perlrun, but it fails with imapsync. ModPerl::PerlRun. So read on if you think you are better than me.
Any hint welcome!
I tried the standard way, telling how any cgi Perl script can be run
under mod_perl perlrun, but it fails with imapsync. Any hint welcome!
# This is a Debian example # This is a Debian example
@ -545,6 +569,5 @@ Any hint welcome!
curl http://localhost/perl-run/imapsync curl http://localhost/perl-run/imapsync
======================================================================= =======================================================================
======================================================================= =======================================================================

View file

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
# $Id: memo_docker,v 1.15 2021/11/20 20:52:55 gilles Exp gilles $ # $Id: memo_docker,v 1.17 2022/04/04 14:46:21 gilles Exp gilles $
echo imapsync_docker_timestamp_dockerfile echo imapsync_docker_timestamp_dockerfile
imapsync_docker_timestamp_dockerfile() imapsync_docker_timestamp_dockerfile()
@ -16,11 +16,6 @@ imapsync_docker_build()
{ {
docker build -t gilleslamiral/imapsync . \ docker build -t gilleslamiral/imapsync . \
&& imapsync_docker_add_tag_version && echo Build SUCCEEDED || echo Build FAILED && imapsync_docker_add_tag_version && echo Build SUCCEEDED || echo Build FAILED
echo
#docker run gilleslamiral/imapsync imapsync --testslive
#docker run gilleslamiral/imapsync imapsync --testslive6
# docker run gilleslamiral/imapsync imapsync --testslive6 --nossl2
} }
echo imapsync_docker_version echo imapsync_docker_version
@ -32,7 +27,7 @@ imapsync_docker_version()
echo imapsync_local_docker_version echo imapsync_local_docker_version
imapsync_local_docker_version() imapsync_local_docker_version()
{ {
docker run gilleslamiral/imapsync imapsync_local --version docker run gilleslamiral/imapsync /imapsync --version
} }
echo imapsync_docker_add_tag_version echo imapsync_docker_add_tag_version
@ -51,15 +46,15 @@ imapsync_docker_add_tag_version()
echo imapsync_docker_testslive echo imapsync_docker_testslive
imapsync_docker_testslive() imapsync_docker_testslive()
{ {
echo docker run gilleslamiral/imapsync imapsync --testslive echo docker run gilleslamiral/imapsync imapsync --testslive "$@"
docker run gilleslamiral/imapsync imapsync --testslive docker run gilleslamiral/imapsync imapsync --testslive "$@"
} }
echo imapsync_docker_testslive6 echo imapsync_docker_testslive6
imapsync_docker_testslive6() imapsync_docker_testslive6()
{ {
echo docker run gilleslamiral/imapsync imapsync --testslive6 --ssl1 --ssl2 echo docker run gilleslamiral/imapsync imapsync --testslive6 "$@"
docker run gilleslamiral/imapsync imapsync --testslive6 --ssl1 --ssl2 docker run gilleslamiral/imapsync imapsync --testslive6 "$@"
} }
echo imapsync_docker_tests echo imapsync_docker_tests
@ -121,13 +116,18 @@ echo imapsync_docker_upload
imapsync_docker_upload() imapsync_docker_upload()
{ {
version=`imapsync_docker_version` version=`imapsync_docker_version`
version_local=`imapsync_local_docker_version`
# upload only after successful tests # upload only after successful tests
set -x \ set -x \
&& is_release_number "$version" \ && is_release_number "$version" \
&& is_release_number "$version_local" \
&& test "$version" = "$version_local" \
&& rcsdiff imapsync Dockerfile memo_docker \ && rcsdiff imapsync Dockerfile memo_docker \
&& imapsync_docker_testslive \ && imapsync_docker_testslive \
&& imapsync_docker_tests \ && imapsync_docker_tests \
&& docker run gilleslamiral/imapsync true \ && docker run gilleslamiral/imapsync true \
&& docker run gilleslamiral/imapsync diff /imapsync /usr/bin/imapsync \
&& docker login --username=gilleslamiral --password=`cat $HOME/var/pass/secret.docker` \ && docker login --username=gilleslamiral --password=`cat $HOME/var/pass/secret.docker` \
&& docker push gilleslamiral/imapsync:latest \ && docker push gilleslamiral/imapsync:latest \
&& docker push gilleslamiral/imapsync:$version \ && docker push gilleslamiral/imapsync:$version \

122
Makefile
View file

@ -1,5 +1,5 @@
# $Id: Makefile,v 1.339 2022/01/14 14:28:38 gilles Exp gilles $ # $Id: Makefile,v 1.345 2022/04/06 10:00:39 gilles Exp gilles $
.PHONY: help usage all doc .PHONY: help usage all doc
@ -194,7 +194,6 @@ docker_build: docker_copy_to_vp3
ssh vp3 'cd docker/imapsync && . memo_docker && imapsync_docker_build' ssh vp3 'cd docker/imapsync && . memo_docker && imapsync_docker_build'
docker_copy_to_vp3: docker_copy_to_vp3:
ssh vp3 'mkdir -p docker/imapsync/ var/pass/' ssh vp3 'mkdir -p docker/imapsync/ var/pass/'
rsync -av /g/var/pass/secret.docker vp3:var/pass/secret.docker rsync -av /g/var/pass/secret.docker vp3:var/pass/secret.docker
@ -287,10 +286,10 @@ testv: imapsync tests.sh
tests: test tests: test
test: .test_3xx test: .tests_passed
# .test_3xx is created by tests.sh with success at all mandatory tests # .tests_passed is created by tests.sh with success at all mandatory tests
.test_3xx: imapsync tests.sh .tests_passed: imapsync
/usr/bin/time sh tests.sh 1>/dev/null /usr/bin/time sh tests.sh 1>/dev/null
unitests: unitests:
@ -467,6 +466,20 @@ win64testsdebug:
./W/check_win64err test_testsdebug.bat ./W/check_win64err test_testsdebug.bat
win64testsdebug_p26:
unix2dos W/test_testsdebug.bat
scp imapsync W/test_testsdebug.bat gille@p26:'Desktop\imapsync_build'
ssh gille@p26 'Desktop\imapsync_build\test_testsdebug.bat'
./W/check_p26err test_testsdebug.bat
win64tests_p26:
unix2dos W/test_tests.bat
scp imapsync W/test_tests.bat gille@p26:'Desktop\imapsync_build'
ssh gille@p26 'Desktop\imapsync_build\test_tests.bat'
./W/check_p26err test_tests.bat
zzz: zzz:
unix2dos W/build_exe.bat W/install_module_one.bat unix2dos W/build_exe.bat W/install_module_one.bat
scp imapsync W/build_exe.bat W/install_module_one.bat W/test_exe_testsdebug.bat pc_HP_DV7_p24:'Desktop/imapsync_build' scp imapsync W/build_exe.bat W/install_module_one.bat W/test_exe_testsdebug.bat pc_HP_DV7_p24:'Desktop/imapsync_build'
@ -535,12 +548,18 @@ win64build: winprepalocal
ssh 'pc HP DV7'@p24 'Desktop/imapsync_build/build_exe.bat' ssh 'pc HP DV7'@p24 'Desktop/imapsync_build/build_exe.bat'
./W/check_win64err build_exe.bat ./W/check_win64err build_exe.bat
imapsync.exe: imapsync_64bit.exe imapsync.exe: imapsync_64bit.exe_p26
cp -a imapsync_64bit.exe imapsync.exe cp -a imapsync_64bit.exe imapsync.exe
imapsync_64bit.exe: imapsync winprepalocal
.PHONY: imapsync_64bit.exe_p24 imapsync_64bit.exe_p26
imapsync_64bit.exe_p24: imapsync
(date "+%s"| tr "\n" " "; echo -n "BEGIN 64bit " $(VERSION) ": "; date) >> W/.BUILD_EXE_TIME (date "+%s"| tr "\n" " "; echo -n "BEGIN 64bit " $(VERSION) ": "; date) >> W/.BUILD_EXE_TIME
unix2dos W/build_exe.bat W/test_exe.bat W/install_modules.bat W/install_module_one.bat
ssh 'pc HP DV7'@p24 'perl -V' ssh 'pc HP DV7'@p24 'perl -V'
scp imapsync W/build_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 \ W/test_exe_tests.bat W/test_exe_testsdebug.bat W/test_exe.bat \
@ -554,13 +573,31 @@ imapsync_64bit.exe: imapsync winprepalocal
chmod a+r+x imapsync_64bit.exe chmod a+r+x imapsync_64bit.exe
(date "+%s"| tr "\n" " "; echo -n "END 64bit " $(VERSION) ": "; date) >> W/.BUILD_EXE_TIME (date "+%s"| tr "\n" " "; echo -n "END 64bit " $(VERSION) ": "; date) >> W/.BUILD_EXE_TIME
imapsync_64bit.exe: imapsync
(date "+%s"| tr "\n" " "; echo -n "BEGIN 64bit " $(VERSION) ": "; date) >> W/.BUILD_EXE_TIME
unix2dos W/build_exe.bat W/test_exe.bat W/install_modules.bat W/install_module_one.bat
ssh gille@p26 'perl -V'
ssh gille@p26 'if not exist Desktop\imapsync_build mkdir Desktop\imapsync_build'
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 \
gille@p26:'Desktop\imapsync_build'
ssh gille@p26 'Desktop\imapsync_build\build_exe.bat'
./W/check_p26err build_exe.bat
scp ../../var/pass/secret.tata ../../var/pass/secret.titi gille@p26:'Desktop\imapsync_build'
ssh gille@p26 'Desktop\imapsync_build\test_exe.bat'
./W/check_p26err test_exe.bat
rm -f imapsync_64bit.exe
scp -T gille@p26:'Desktop\imapsync_build\imapsync_64bit.exe' .
chmod a+r+x imapsync_64bit.exe
(date "+%s"| tr "\n" " "; echo -n "END 64bit " $(VERSION) ": "; date) >> W/.BUILD_EXE_TIME
zip: dosify_bat zip: dosify_bat
rm -rfv ../prepa_zip/imapsync_$(VERSION)/ rm -rfv ../prepa_zip/imapsync_$(VERSION)/
mkdir -p ../prepa_zip/imapsync_$(VERSION)/FAQ.d/ ../prepa_zip/imapsync_$(VERSION)/Cook/ mkdir -p ../prepa_zip/imapsync_$(VERSION)/FAQ.d/ ../prepa_zip/imapsync_$(VERSION)/Cook/
cp -av examples/imapsync_example.bat examples/sync_loop_windows.bat examples/file.txt ../prepa_zip/imapsync_$(VERSION)/ cp -av examples/imapsync_example.bat examples/sync_loop_windows.bat examples/file.txt ../prepa_zip/imapsync_$(VERSION)/
cp -av W/build_exe.bat W/install_modules.bat W/test_cook_exe.bat W/test_cook_src.bat imapsync ../prepa_zip/imapsync_$(VERSION)/Cook/ cp -av W/build_exe.bat W/install_modules.bat W/test_cook_exe.bat W/test_cook_src.bat imapsync ../prepa_zip/imapsync_$(VERSION)/Cook/
for f in README ; do cp -av $$f ../prepa_zip/imapsync_$(VERSION)/$$f.txt ; done cp -av README.txt ../prepa_zip/imapsync_$(VERSION)/
cp -av FAQ.d/*.txt ../prepa_zip/imapsync_$(VERSION)/FAQ.d/ cp -av FAQ.d/*.txt ../prepa_zip/imapsync_$(VERSION)/FAQ.d/
cp -av imapsync.exe imapsync_32bit.exe README_Windows.txt ../prepa_zip/imapsync_$(VERSION)/ cp -av imapsync.exe imapsync_32bit.exe README_Windows.txt ../prepa_zip/imapsync_$(VERSION)/
unix2dos ../prepa_zip/imapsync_$(VERSION)/*.txt unix2dos ../prepa_zip/imapsync_$(VERSION)/*.txt
@ -572,7 +609,7 @@ zip: dosify_bat
# C:\Users\mansour\Desktop\imapsync # C:\Users\mansour\Desktop\imapsync
.PHONY: mac maccopy macforce mactests mactestsdebug mactestslive mactestslive6 bin win lin win64 .PHONY: mac macstadiumcopy maccopy macforce mactests mactestsdebug mactestslive mactestslive6 bin win lin win64
mac: imapsync_bin_Darwin mac: imapsync_bin_Darwin
@ -590,7 +627,7 @@ maccopy:
macforce: maccopy macforce: maccopy
ssh -4 -p 995 gilleslamira@gate.polarhome.com 'sh -x build_mac.sh' 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 maccopy imapsync_bin_Darwin: maccopy imapsync W/build_mac.sh INSTALL.d/prerequisites_imapsync
rcsdiff imapsync rcsdiff imapsync
ssh -4 -p 995 gilleslamira@gate.polarhome.com 'sh -x build_mac.sh' 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 . rsync -P -e 'ssh -4 -p 995' gilleslamira@gate.polarhome.com:imapsync_bin_Darwin .
@ -617,7 +654,7 @@ bin: mac win
lin: $(BIN_NAME) lin: $(BIN_NAME)
win: win64 win32 imapsync.exe win: win32 win64 imapsync.exe
win32: imapsync_32bit.exe win32: imapsync_32bit.exe
@ -709,10 +746,10 @@ biz: S/imapsync_sold_by_country.txt docker_pull_count
auto_ci: docker_pull_count auto_ci: docker_pull_count
docker_pull_count: docker_pull_count:
cd W/ && rcsdiff docker_pull_count.txt || { echo | ci -l docker_pull_count.txt ; } rcsdiff W/docker_pull_count.txt || { echo | ci -l W/docker_pull_count.txt ; }
S/imapsync_sold_by_country.txt: /g/bin/imapsync_by_country S/imapsync_sold_by_country.txt: /g/bin/imapsync_by_country
cd S/ && /g/bin/imapsync_by_country && echo | ci -l imapsync_sold_by_country.txt cd S/ && /g/bin/imapsync_by_country && { echo | ci -l imapsync_sold_by_country.txt ; }
ks: ks:
@ -828,7 +865,7 @@ W/.valid.index.shtml: index.shtml S/*.shtml
S/template_xhtml1.shtml S/template_xhtml1.shtml
touch W/.valid.index.shtml touch W/.valid.index.shtml
.PHONY: upload_index upload_FAQ ci_imapsync upload_bin .PHONY: upload_index ci_imapsync upload_latest upload_FAQ upload_bin
upload_index: valid_index clean_permissions upload_index: valid_index clean_permissions
@ -855,16 +892,65 @@ upload_latest: unitests ci_imapsync bin
rsync -aHvzP --delete ../imapsync_website/ root@ks5.lamiral.info:/usr/local/www/apache24/data/imapsync/ rsync -aHvzP --delete ../imapsync_website/ root@ks5.lamiral.info:/usr/local/www/apache24/data/imapsync/
upload_cgi: unitests ks5tests ks5tests_root ci_imapsync
rsync -a imapsync ./INSTALL.d/prerequisites_imapsync ../imapsync_website/ .PHONY: upload_cgi upload_cgi_ks5 upload_cgi_memo upload_cgi_vp3 upload_cgi_vp4 upload_cgi_ks6
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/ upload_cgi: upload_cgi_ks5 upload_cgi_vp3 upload_cgi_vp4 upload_cgi_ks6
upload_cgi_ks5: ci_imapsync unitests ks5tests
rsync -P imapsync root@ks5.lamiral.info:/home/www/apache24/cgi-bin/imapsync_new
curl -v --data 'testslive=1' https://imapsync.lamiral.info/cgi-bin/imapsync_new | grep 'Exiting with return value 0'
rsync -P imapsync root@ks5.lamiral.info:/home/www/apache24/cgi-bin/imapsync
curl -v --data 'testslive=1' https://imapsync.lamiral.info/cgi-bin/imapsync | grep 'Exiting with return value 0'
upload_cgi_memo: upload_cgi_memo:
dos2unix X/stat_patterns.txt X/server_survey_patterns.txt dos2unix X/stat_patterns.txt X/server_survey_patterns.txt
sed -i".bak" '/^[[:space:]]*$$/d' X/stat_patterns.txt X/server_survey_patterns.txt sed -i".bak" '/^[[:space:]]*$$/d' X/stat_patterns.txt X/server_survey_patterns.txt
rsync -av X/cgi_memo X/stat_patterns.txt X/server_survey_patterns.txt root@ks5:/var/tmp/imapsync_cgi/ rsync -av X/cgi_memo X/stat_patterns.txt X/server_survey_patterns.txt root@ks5:/var/tmp/imapsync_cgi/
upload_cgi_memo_all:
rsync -av X/cgi_memo root@ks5:/var/tmp/imapsync_cgi/
rsync -av X/cgi_memo root@ks6:/var/tmp/imapsync_cgi/
rsync -av X/cgi_memo root@vp3:/var/tmp/imapsync_cgi/
rsync -av X/cgi_memo root@vp4:/var/tmp/imapsync_cgi/
# Debian
upload_cgi_vp3: ci_imapsync vp3tests
rsync -P imapsync root@vp3.lamiral.info:/usr/lib/cgi-bin/imapsync_new
curl -v --data 'testslive=1' https://vp3.lamiral.info/cgi-bin/imapsync_new | grep 'Exiting with return value 0'
rsync -P imapsync root@vp3.lamiral.info:/usr/lib/cgi-bin/imapsync
curl -v --data 'testslive=1' https://vp3.lamiral.info/cgi-bin/imapsync | grep 'Exiting with return value 0'
# Centos
upload_cgi_vp4: ci_imapsync vp4tests
rsync -P imapsync root@vp4.lamiral.info:/var/www/cgi-bin/imapsync_new
curl -v --data 'testslive=1' https://vp4.lamiral.info/cgi-bin/imapsync_new | grep 'Exiting with return value 0'
rsync -P imapsync root@vp4.lamiral.info:/var/www/cgi-bin/imapsync
curl -v --data 'testslive=1' https://vp4.lamiral.info/cgi-bin/imapsync | grep 'Exiting with return value 0'
# Debian
upload_cgi_ks6: ci_imapsync ks6tests
rsync -P imapsync root@ks6.lamiral.info:/usr/lib/cgi-bin/imapsync_new
curl -v --data 'testslive=1' https://ks6.lamiral.info/cgi-bin/imapsync_new | grep 'Exiting with return value 0'
rsync -P imapsync root@ks6.lamiral.info:/usr/lib/cgi-bin/imapsync
curl -v --data 'testslive=1' https://ks6.lamiral.info/cgi-bin/imapsync | grep 'Exiting with return value 0'
.PHONY: vp3tests vp4tests ks6tests
vp3tests:
rsync -P imapsync root@vp3.lamiral.info:imapsync
ssh root@vp3.lamiral.info ./imapsync --tests
ssh root@vp3.lamiral.info ./imapsync --testslive6
vp4tests:
rsync -P imapsync root@vp4.lamiral.info:imapsync
ssh root@vp4.lamiral.info ./imapsync --tests
ssh root@vp4.lamiral.info ./imapsync --testslive6
ks6tests:
rsync -P imapsync root@ks6.lamiral.info:imapsync
ssh root@ks6.lamiral.info ./imapsync --tests
ssh root@ks6.lamiral.info ./imapsync --testslive6
upload_X: 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 ./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

86
README
View file

@ -6,7 +6,7 @@ NAME
VERSION VERSION
This documentation refers to Imapsync $Revision: 2.178 $ This documentation refers to Imapsync $Revision: 2.200 $
USAGE USAGE
@ -38,7 +38,7 @@ DESCRIPTION
that are on the destination side but not on the source side stay as they that are on the destination side but not on the source side stay as they
are. See the --delete2 option to have strict sync and delete them. are. See the --delete2 option to have strict sync and delete them.
How imapsync know a message is already on both sides? Same specific How does imapsync know a message is already on both sides? Same specific
headers and the transfer is done only once. By default, the headers and the transfer is done only once. By default, the
identification headers are "Message-Id:" and "Received:" lines but this identification headers are "Message-Id:" and "Received:" lines but this
choice can be changed with the --useheader option, most often a choice can be changed with the --useheader option, most often a
@ -46,8 +46,8 @@ DESCRIPTION
All flags are preserved, unread messages will stay unread, read ones All flags are preserved, unread messages will stay unread, read ones
will stay read, deleted will stay deleted. In the IMAP protocol, a will stay read, deleted will stay deleted. In the IMAP protocol, a
deleted message is not really deleted, it is marked \Deleted and can be deleted message is not deleted, it is marked \Deleted and can be
undelete. Real destruction comes with the EXPUNGE or UIDEXPUNGE IMAP undeleted. Real destruction comes with the EXPUNGE or UIDEXPUNGE IMAP
commands. commands.
You can abort the transfer at any time and restart it later, imapsync You can abort the transfer at any time and restart it later, imapsync
@ -76,16 +76,35 @@ DESCRIPTION
There is no unidentified message on host1. There is no unidentified message on host1.
Detected 0 errors Detected 0 errors
Imapsync mentions the total sizes of both accounts at the beginning of
the sync and also at the end. Sometimes, even with a strict sync, those
total sizes differ, and sometimes they differ a lot. The difference is
not a good criterion to conclude the sync went wrong.
Why? That's because message sizes given by the imap servers are not
always accurate, they are not always the same as the actual message
sizes of the messages transferred by imapsync. Imapsync use the sizes
given by the imap servers to calculate the big total size. They can
differ. In the early days, Imapsync used the sizes of the messages as
one of the criteria to identify the messages, different sizes implied
different messages; but it was a mistake, the same message had different
sizes on both sides sometimes, depending on the imap servers.
Another explanation for a big total size difference is that Gmail
doesn't count the size of duplicate messages across folders twice, while
imapsync does.
A classical scenario is synchronizing a mailbox B from another mailbox A A classical scenario is synchronizing a mailbox B from another mailbox A
where you just want to keep a strict copy of A in B. Strict meaning all where you just want to keep a strict copy of A in B. Strict meaning all
messages in A will be in B but no more. messages in A will be in B but no more.
For this, option --delete2 can be used, it deletes messages in the host2 For a strict synchronization, use the option --delete2. The option
folder B that are not in the host1 folder A. If you also need to destroy --delete2 deletes the messages in the host2 folder B that are not in the
host2 folders that are not in host1 then use --delete2folders. See also host1 folder A. If you also need to destroy host2 folders that are not
--delete2foldersonly and --delete2foldersbutnot to set up exceptions on in host1 then use --delete2folders. See also --delete2foldersonly and
folders to destroy. INBOX will never be destroyed, it's a mandatory --delete2foldersbutnot to set up exceptions on folders to destroy. INBOX
folder in IMAP so imapsync doesn't even try to remove it. will never be destroyed, it's a mandatory folder in IMAP so imapsync
doesn't even try to remove it.
A different scenario is to delete the messages from the source mailbox A different scenario is to delete the messages from the source mailbox
after a successful transfer, it can be a good feature when migrating after a successful transfer, it can be a good feature when migrating
@ -114,18 +133,19 @@ OPTIONS
usage: imapsync [options] usage: imapsync [options]
The standard options are the six values forming the credentials. Three The standard options are the six values forming the credentials. Three
values on each side are needed in order to login into the IMAP servers. values on each side are needed to login into the IMAP servers. These six
These six values are a hostname, a username, and a password, two times. values are a hostname, a username, and a password, two times.
Conventions used in the following descriptions of the options: Here are the conventions used in the following descriptions of the
options:
str means string str means a string
int means integer number int means an integer number
flo means float number flo means a float number
reg means regular expression reg means a regular expression
cmd means command cmd means a command
--dry : Makes imapsync doing nothing for real; it just print what --dry : Makes imapsync do nothing for real; it just prints what
would be done without --dry. would be done without --dry.
OPTIONS/credentials OPTIONS/credentials
@ -237,9 +257,9 @@ OPTIONS
--nomixfolders : Do not merge folders when host1 is case-sensitive --nomixfolders : Do not merge folders when host1 is case-sensitive
while host2 is not (like Exchange). Only the first while host2 is not (like Exchange). Only the first
similar folder is synced (example: with folders similar folder is synced. Example: with folders
"Sent", "SENT" and "sent" "Sent", "SENT" and "sent" on host1, only "Sent"
on host1 only "Sent" will be synced to host2). will be synced to host2.
--skipemptyfolders : Empty host1 folders are not created on host2. --skipemptyfolders : Empty host1 folders are not created on host2.
@ -726,8 +746,8 @@ LICENSE AND COPYRIGHT
Imapsync is free, open, public but not always gratis software cover by Imapsync is free, open, public but not always gratis software cover by
the NOLIMIT Public License, now called NLPL. See the LICENSE file the NOLIMIT Public License, now called NLPL. See the LICENSE file
included in the distribution or just read this simple sentence as it IS included in the distribution or just read the following simple sentence
the licence text: as it IS the license text:
"No limits to do anything with this work and this license." "No limits to do anything with this work and this license."
@ -744,7 +764,7 @@ AUTHOR
Good feedback is always welcome. Bad feedback is very often welcome. Good feedback is always welcome. Bad feedback is very often welcome.
Gilles LAMIRAL earns his living by writing, installing, configuring and Gilles LAMIRAL earns his living by writing, installing, configuring and
sometimes teaching free, open and often gratis software. Imapsync used sometimes teaching free, open, and often gratis software. Imapsync used
to be "always gratis" but now it is only "often gratis" because imapsync to be "always gratis" but now it is only "often gratis" because imapsync
is sold by its author, your servitor, a good way to maintain and support is sold by its author, your servitor, a good way to maintain and support
free open public software tools over decades. free open public software tools over decades.
@ -796,19 +816,19 @@ INSTALL
Imapsync works under most Windows (2000, XP, Vista, Seven, Eight, Ten Imapsync works under most Windows (2000, XP, Vista, Seven, Eight, Ten
and all Server releases 2000, 2003, 2008 and R2, 2012 and R2, 2016) and all Server releases 2000, 2003, 2008 and R2, 2012 and R2, 2016)
as a standalone binary software called imapsync.exe, as a standalone binary software called imapsync.exe, usually launched
usually launched from a batch file in order to avoid always typing from a batch file in order to avoid always typing the options. There
the options. There is also a 32bit binary called imapsync_32bit.exe is also a 32bit binary called imapsync_32bit.exe
Imapsync works under OS X as a standalone binary Imapsync works under OS X as a standalone binary software called
software called imapsync_bin_Darwin imapsync_bin_Darwin
Purchase latest imapsync at Purchase latest imapsync at
https://imapsync.lamiral.info/ https://imapsync.lamiral.info/
You'll receive a link to a compressed tarball called imapsync-x.xx.tgz You'll receive a link to a compressed tarball called
where x.xx is the version number. Untar the tarball where imapsync-x.xx.tgz where x.xx is the version number.
you want (on Unix): Untar the tarball where you want (on Unix):
tar xzvf imapsync-x.xx.tgz tar xzvf imapsync-x.xx.tgz

View file

@ -1,4 +1,4 @@
# $Id: README_Windows.txt,v 1.26 2022/01/14 11:54:28 gilles Exp gilles $ # $Id: README_Windows.txt,v 1.27 2022/04/05 19:45:21 gilles Exp gilles $
# #
# This is the README_Windows.txt file for imapsync # This is the README_Windows.txt file for imapsync
# imapsync: IMAP syncing and migration tool. # imapsync: IMAP syncing and migration tool.
@ -43,13 +43,13 @@ A.0) Preamble for visual users looking for a visual tool.
A.1) Get imapsync. A.1) Get imapsync.
Get imapsync at https://imapsync.lamiral.info/ Get imapsync at https://imapsync.lamiral.info/
You'll then have access to a zip archive file named imapsync_2.178.zip You'll then have access to a zip archive file named imapsync_2.200.zip
where 2.178 is the imapsync release number. where 2.200 is the imapsync release number.
A.2) Extract the zip file in a folder where you will work with imapsync. 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 You can work on the Desktop since the zip file extraction creates
a unique folder named imapsync_2.178/ a unique folder named imapsync_2.200/
Do not unzip the archive in what is called a "system" directory since Do not unzip the archive in what is called a "system" directory since
you may encounter permission issues. you may encounter permission issues.
@ -62,7 +62,7 @@ In short, any user on your system can use imapsync.
A.3) Check the folder A.3) Check the folder
In the folder extracted and called imapsync_2.178, you see 7 files In the folder extracted and called imapsync_2.200, you see 7 files
and 2 directories. Those files and directories may be presented in a and 2 directories. Those files and directories may be presented in a
different order than the following, the order is not important different order than the following, the order is not important
anyway. There are only two important files to get your mailbox anyway. There are only two important files to get your mailbox

View file

@ -91,12 +91,11 @@
</h1> </h1>
<p>These services are similar to the <p>These services are similar to the
<a href="https://imapsync.lamiral.info/X/" title="Free online service under 1 GB">imapsync <b>online service</b></a> <a href="https://imapsync.lamiral.info/X/" title="Free online service under 3 GB">imapsync <b>online service</b></a>
I call /X. Some are an exact copy of /X, some are not, some use Imapsync, some don't.<br/> I call /X. Some are an exact copy of /X, some are not, some use Imapsync, some don't.<br/>
I have no share in these free or paid services. I have no share in these free or paid services.
Prices are given par mailbox and may be outdated Prices are given par mailbox and may be outdated (Last checked on Saturday 19 February 2022).
(Last checked on Tuesday 10th November 2020).
</p> </p>
<h2>Imapsync based</h2> <h2>Imapsync based</h2>
@ -122,29 +121,28 @@ this is a better choice to avoid duplicates with some imap servers.
</p> </p>
<ol> <ol>
<li> NameHero <b>0 USD</b>: <a href="https://imapsync.net/">https://imapsync.net/</a> (imapsync 2.140)</li>
<li> Slovenia Control Panel <b>0 USD</b>: <a href="https://tools.controlpanel.si/imapsync/">https://tools.controlpanel.si/imapsync/</a> (imapsync 1.810)</li> <li> Slovenia Control Panel <b>0 USD</b>: <a href="https://tools.controlpanel.si/imapsync/">https://tools.controlpanel.si/imapsync/</a> (imapsync 1.810)</li>
<li> Intertune Cloud <b>0 USD</b>: <a href="https://tools.intertune.io/imapsync/X/" >https://tools.intertune.io/imapsync/X/</a> (imapsync 1.882)</li> <li> Intertune Cloud <b>0 USD</b>: <a href="https://tools.intertune.io/imapsync/X/" >https://tools.intertune.io/imapsync/X/</a> (imapsync 1.882)</li>
<li> Web Hosting Canada <b>0 USD</b>: <a href="https://imapsync.whc.ca/" >https://imapsync.whc.ca/</a> (imapsync 1.882)</li> <li> Web Hosting Canada <b>0 USD</b>: <a href="https://imapsync.whc.ca/" >https://imapsync.whc.ca/</a> (imapsync 1.882)</li>
<li> BoomHost <b>0 USD</b>: <a href="https://imapsync.boomhost.com/" >https://imapsync.boomhost.com/</a> (imapsync 1.925)</li> <li> BoomHost <b>0 USD</b>: <a href="https://imapsync.boomhost.com/" >https://imapsync.boomhost.com/</a> (imapsync 1.925)</li>
<li> WebHosting|4u (greek) <b>0 USD</b>: <a href="https://imapcopy.webhosting4u.gr/" >https://imapcopy.webhosting4u.gr/</a> (imapsync 1.977)</li> <li> WebHosting|4u (greek) <b>0 USD</b>: <a href="https://imapcopy.webhosting4u.gr/" >https://imapcopy.webhosting4u.gr/</a> (imapsync 2.178)</li>
<li> Vimexx <b>0 USD</b>: <a href="https://imapsync.nl/" >https://imapsync.nl/</a> (imapsync 1.991)</li> <li> Vimexx <b>0 USD</b>: <a href="https://imapsync.nl/" >https://imapsync.nl/</a> (imapsync 1.991)</li>
<li> Timetakernet <b>0 USD</b>: <a href="https://mailsync.timetakernet.info/" >https://mailsync.timetakernet.info/</a> (imapsync 1.998)</li>
<li> KeurigOnline <b>0 USD</b>: <a href="https://imapsync.keurigonline.nl/" >https://imapsync.keurigonline.nl/</a> (imapsync 1.998)</li> <li> KeurigOnline <b>0 USD</b>: <a href="https://imapsync.keurigonline.nl/" >https://imapsync.keurigonline.nl/</a> (imapsync 1.998)</li>
<li> UK Migration Wizard <b>0 USD</b>: <a href="https://app.migrationwizard.co.uk/" >https://app.migrationwizard.co.uk/</a> (imapsync ?.???)</li>
</ol> </ol>
<h2>Not Imapsync based</h2> <h2>Not Imapsync based</h2>
<ol> <ol>
<li> Ovh migration <b>0 EUR</b>: <a href="https://omm.ovh.net/Migration/Create">https://omm.ovh.net/Migration/Create</a></li> <li> Ovh migration <b>0 EUR</b>: <a href="https://omm.ovh.net/Migration/Create">https://omm.ovh.net/Migration/Create</a></li>
<li> Rackspace migration <b>0 USD</b>: <a href="http://www.rackspace.com/email-hosting/migrations">http://www.rackspace.com/email-hosting/migrations</a></li> <li> Rackspace migration <b>0 USD</b>: <a href="http://www.rackspace.com/email-hosting/migrations">http://www.rackspace.com/email-hosting/migrations</a></li>
<li> Movemymail one free, 5 USD after: <a href="https://movemymail.net">https://movemymail.net/</a></li> <li> Movemymail one free, <a href="https://movemymail.net/faq.php">5 USD</a> after: <a href="https://movemymail.net">https://movemymail.net/</a></li>
<li> TransferMyEmail 1.50 USD for a day pass: <a href="https://transfermyemail.ca/">https://transfermyemail.ca/</a></li> <li> TransferMyEmail <a href="https://transfermyemail.ca/shop/">1.50 USD</a> for a day pass: <a href="https://transfermyemail.ca/">https://transfermyemail.ca/</a></li>
<li> Migrationwiz 11.99 USD: <a href="https://www.bittitan.com/products/migrationwiz/">https://www.bittitan.com/products/migrationwiz/</a> </li> <li> Migrationwiz <a href="https://www.bittitan.com/pricing/">12 USD</a>: <a href="https://www.bittitan.com/products/migrationwiz/">https://www.bittitan.com/products/migrationwiz/</a> </li>
<li> Audriga 11.90 EUR: <a href="https://www.groupware-migration.com/">https://www.groupware-migration.com/</a></li> <li> Audriga <a href="https://www.audriga.com/en/Self-service_migration/Pricing">11.90 EUR</a>: <a href="https://www.audriga.com/">https://www.audriga.com/</a></li>
<li> <del>Yippiemove 14.95 USD</del> (discontinued on April 2019): <a href="http://www.yippiemove.com">http://www.yippiemove.com/</a> <li> <del>Yippiemove 14.95 USD</del> (discontinued on April 2019): <a href="http://www.yippiemove.com">http://www.yippiemove.com/</a>
( See <a href="https://web.archive.org/web/20161027124328/https://www.yippiemove.com/help/faq_generic.html#imapsync">Yippiemove vs ImapSync</a> )</li> ( See <a href="https://web.archive.org/web/20161027124328/https://www.yippiemove.com/help/faq_generic.html#imapsync">Yippiemove vs ImapSync</a> )</li>
<li> ShuttleCloud one free, 19.95 USD after <a href="https://www.shuttlecloud.com/">https://www.shuttlecloud.com/</a></li> <li> ShuttleCloud one free, 19.95 USD after <a href="https://www.shuttlecloud.com/">https://www.shuttlecloud.com/</a></li>
<li> Cloudasta ??? USD: <a href="https://cloudasta.com/">https://cloudasta.com/</a></li>
</ol> </ol>
<h2>Imap to files services</h2> <h2>Imap to files services</h2>
@ -186,7 +184,7 @@ alt="Viewable With Any Browser" />
<!--#config timefmt="%D" --> <!--#config timefmt="%D" -->
<!--#config timefmt="%A %B %d, %Y" --> <!--#config timefmt="%A %B %d, %Y" -->
<b>This document last modified on <!--#echo var="LAST_MODIFIED" --></b> <b>This document last modified on <!--#echo var="LAST_MODIFIED" --></b>
($Id: external.shtml,v 1.59 2022/01/08 19:54:26 gilles Exp gilles $)<br/> ($Id: external.shtml,v 1.61 2022/02/19 20:26:25 gilles Exp gilles $)<br/>
<a href="#TOP">Top of the page</a> <a href="#TOP">Top of the page</a>
</p> </p>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

View file

@ -1,100 +1,108 @@
1 Bahrein_________________ 0.01 % 100 % 0 % 99 1 Bahrein_________________ 0.01 % 100 % 0 % 107
1 Bolivie_________________ 0.01 % 100 % 0 % 98 1 Bolivie_________________ 0.01 % 100 % 0 % 106
1 Burkina_Faso____________ 0.01 % 100 % 0 % 97 1 Botswana________________ 0.01 % 100 % 0 % 105
1 Cameroun________________ 0.01 % 100 % 0 % 96 1 Burkina_Faso____________ 0.01 % 100 % 0 % 104
1 Coree_du_Sud____________ 0.01 % 100 % 0 % 95 1 Cameroun________________ 0.01 % 100 % 0 % 103
1 Grenade_________________ 0.01 % 100 % 0 % 94 1 Coree_du_Sud____________ 0.01 % 100 % 0 % 102
1 Iles_Feroe______________ 0.01 % 100 % 0 % 93 1 Equateur________________ 0.01 % 100 % 0 % 101
1 Iles_Vierges_britanniques__ 0.01 % 100 % 0 % 92 1 Grenade_________________ 0.01 % 100 % 0 % 100
1 Jamaique________________ 0.01 % 100 % 0 % 91 1 Guatemala_______________ 0.01 % 100 % 0 % 99
1 Jordanie________________ 0.01 % 100 % 0 % 90 1 Honduras________________ 0.01 % 100 % 0 % 98
1 Kenya___________________ 0.01 % 100 % 0 % 89 1 Iles_Feroe______________ 0.01 % 100 % 0 % 97
1 Koweit__________________ 0.01 % 100 % 0 % 88 1 Iles_Vierges_britanniques__ 0.01 % 100 % 0 % 96
1 Maldives________________ 0.01 % 100 % 0 % 87 1 Jamaique________________ 0.01 % 100 % 0 % 95
1 Monaco__________________ 0.01 % 100 % 0 % 86 1 Jordanie________________ 0.01 % 100 % 0 % 94
1 Mongolie________________ 0.01 % 100 % 0 % 85 1 Koweit__________________ 0.01 % 100 % 0 % 93
1 Namibie_________________ 0.01 % 100 % 0 % 84 1 Madagascar______________ 0.01 % 100 % 0 % 92
1 Oman____________________ 0.01 % 100 % 0 % 83 1 Maldives________________ 0.01 % 100 % 0 % 91
1 Panama__________________ 0.01 % 100 % 0 % 82 1 Monaco__________________ 0.01 % 100 % 0 % 90
1 Qatar___________________ 0.01 % 100 % 0 % 81 1 Mongolie________________ 0.01 % 100 % 0 % 89
1 Republique_d'Azerbaidjan__ 0.01 % 100 % 0 % 80 1 Mozambique______________ 0.01 % 100 % 0 % 88
1 Saint_Christophe-Nevis-Anguilla__ 0.01 % 100 % 0 % 79 1 Namibie_________________ 0.01 % 100 % 0 % 87
1 Senegal_________________ 0.01 % 100 % 0 % 78 1 Polynesie_francaise_____ 0.01 % 100 % 0 % 86
1 Tanzanie________________ 0.01 % 100 % 0 % 77 1 Qatar___________________ 0.01 % 100 % 0 % 85
1 Trinite-et-Tobago_______ 0.01 % 100 % 0 % 76 1 Republique_d'Azerbaidjan__ 0.01 % 100 % 0 % 84
2 Albanie_________________ 0.03 % 100 % 0 % 75 1 Saint_Christophe-Nevis-Anguilla__ 0.01 % 100 % 0 % 83
2 Antilles_neerlandaises__ 0.03 % 100 % 0 % 74 1 Salvador________________ 0.01 % 100 % 0 % 82
2 Arabie_Saoudite_________ 0.03 % 100 % 0 % 73 1 Trinite-et-Tobago_______ 0.01 % 100 % 0 % 81
2 Bosnie-Herzegovine______ 0.03 % 100 % 0 % 72 2 Albanie_________________ 0.02 % 100 % 0 % 80
2 Colombie________________ 0.03 % 100 % 0 % 71 2 Antilles_neerlandaises__ 0.02 % 100 % 0 % 79
2 Ile_Maurice_____________ 0.03 % 100 % 0 % 70 2 Arabie_Saoudite_________ 0.02 % 100 % 0 % 78
2 Moldavie________________ 0.03 % 100 % 0 % 69 2 Bosnie-Herzegovine______ 0.02 % 100 % 0 % 77
2 Nouvelle-Caledonie______ 0.03 % 100 % 0 % 68 2 Ile_Maurice_____________ 0.02 % 100 % 0 % 76
2 Perou___________________ 0.03 % 99 % 1 % 67 2 Moldavie________________ 0.02 % 100 % 0 % 75
3 Costa_Rica______________ 0.04 % 99 % 1 % 66 2 Nouvelle-Caledonie______ 0.02 % 100 % 0 % 74
3 Maroc___________________ 0.04 % 99 % 1 % 65 2 Oman____________________ 0.02 % 100 % 0 % 73
3 Nigeria_________________ 0.04 % 99 % 1 % 64 2 Panama__________________ 0.02 % 100 % 0 % 72
3 Taiwan__________________ 0.04 % 99 % 1 % 63 2 Senegal_________________ 0.02 % 99 % 1 % 71
3 Ukraine_________________ 0.04 % 99 % 1 % 62 2 Tanzanie________________ 0.02 % 99 % 1 % 70
3 Venezuela_______________ 0.04 % 99 % 1 % 61 3 Colombie________________ 0.03 % 99 % 1 % 69
4 Indonesie_______________ 0.05 % 99 % 1 % 60 3 Kenya___________________ 0.03 % 99 % 1 % 68
4 Serbie__________________ 0.05 % 99 % 1 % 59 3 Maroc___________________ 0.03 % 99 % 1 % 67
4 Turquie_________________ 0.05 % 99 % 1 % 58 3 Taiwan__________________ 0.03 % 99 % 1 % 66
4 Uruguay_________________ 0.05 % 99 % 1 % 57 3 Ukraine_________________ 0.03 % 99 % 1 % 65
4 Vietnam_________________ 0.05 % 99 % 1 % 56 4 Costa_Rica______________ 0.04 % 99 % 1 % 64
5 Ireland_________________ 0.06 % 99 % 1 % 55 4 Nigeria_________________ 0.04 % 99 % 1 % 63
5 Philippines_____________ 0.06 % 99 % 1 % 54 4 Perou___________________ 0.04 % 99 % 1 % 62
6 Egypte__________________ 0.08 % 99 % 1 % 53 4 Serbie__________________ 0.04 % 99 % 1 % 61
6 Lituanie________________ 0.08 % 99 % 1 % 52 4 Turquie_________________ 0.04 % 99 % 1 % 60
7 Islande_________________ 0.09 % 99 % 1 % 51 4 Venezuela_______________ 0.04 % 99 % 1 % 59
7 Malte___________________ 0.09 % 99 % 1 % 50 4 Vietnam_________________ 0.04 % 99 % 1 % 58
7 Russie,_Federation______ 0.09 % 99 % 1 % 49 5 Indonesie_______________ 0.06 % 99 % 1 % 57
8 Bulgarie________________ 0.10 % 98 % 2 % 48 5 Ireland_________________ 0.06 % 99 % 1 % 56
8 Estonie_________________ 0.10 % 98 % 2 % 47 5 Uruguay_________________ 0.06 % 99 % 1 % 55
10 Chypre__________________ 0.13 % 98 % 2 % 46 6 Egypte__________________ 0.07 % 99 % 1 % 54
10 Lettonie________________ 0.13 % 98 % 2 % 45 6 Philippines_____________ 0.07 % 99 % 1 % 53
11 Croatie_________________ 0.14 % 98 % 2 % 44 8 Islande_________________ 0.09 % 99 % 1 % 52
11 Emirats_Arabes_Unis_____ 0.14 % 98 % 2 % 43 8 Malte___________________ 0.09 % 99 % 1 % 51
12 Thailande_______________ 0.15 % 98 % 2 % 42 9 Lituanie________________ 0.10 % 98 % 2 % 50
15 Israel__________________ 0.19 % 98 % 2 % 41 10 Bulgarie________________ 0.11 % 98 % 2 % 49
16 Chine___________________ 0.20 % 97 % 3 % 40 10 Estonie_________________ 0.11 % 98 % 2 % 48
18 Malaisie________________ 0.23 % 97 % 3 % 39 10 Russie,_Federation______ 0.11 % 98 % 2 % 47
18 Singapour_______________ 0.23 % 97 % 3 % 38 11 Lettonie________________ 0.12 % 98 % 2 % 46
20 Argentine_______________ 0.25 % 97 % 3 % 37 12 Croatie_________________ 0.13 % 98 % 2 % 45
20 Chili___________________ 0.25 % 96 % 4 % 36 12 Emirats_Arabes_Unis_____ 0.13 % 98 % 2 % 44
20 Luxembourg______________ 0.25 % 96 % 4 % 35 12 Thailande_______________ 0.13 % 98 % 2 % 43
20 Slovenie________________ 0.25 % 96 % 4 % 34 15 Chypre__________________ 0.17 % 98 % 2 % 42
23 Mexique_________________ 0.29 % 96 % 4 % 33 15 Israel__________________ 0.17 % 97 % 3 % 41
24 Slovaquie_______________ 0.30 % 95 % 5 % 32 16 Chine___________________ 0.18 % 97 % 3 % 40
26 Hong-Kong_______________ 0.33 % 95 % 5 % 31 19 Singapour_______________ 0.21 % 97 % 3 % 39
27 Inde____________________ 0.34 % 95 % 5 % 30 21 Argentine_______________ 0.23 % 97 % 3 % 38
27 Irlande_________________ 0.34 % 94 % 6 % 29 22 Luxembourg______________ 0.24 % 97 % 3 % 37
28 Grece___________________ 0.35 % 94 % 6 % 28 24 Chili___________________ 0.27 % 96 % 4 % 36
29 Afrique_du_Sud__________ 0.36 % 94 % 6 % 27 24 Malaisie________________ 0.27 % 96 % 4 % 35
30 Roumanie________________ 0.38 % 93 % 7 % 26 27 Hong-Kong_______________ 0.30 % 96 % 4 % 34
31 Russie__________________ 0.39 % 93 % 7 % 25 27 Slovenie________________ 0.30 % 96 % 4 % 33
32 Japon___________________ 0.40 % 93 % 7 % 24 28 Slovaquie_______________ 0.31 % 95 % 5 % 32
36 Nouvelle-Zelande________ 0.45 % 92 % 8 % 23 30 Inde____________________ 0.33 % 95 % 5 % 31
40 ________________________ 0.50 % 92 % 8 % 22 30 Mexique_________________ 0.33 % 95 % 5 % 30
41 Hongrie_________________ 0.52 % 91 % 9 % 21 31 Russie__________________ 0.34 % 94 % 6 % 29
45 Portugal________________ 0.57 % 91 % 9 % 20 32 Irlande_________________ 0.36 % 94 % 6 % 28
55 Finlande________________ 0.69 % 90 % 10 % 19 33 Japon___________________ 0.37 % 94 % 6 % 27
56 Norvege_________________ 0.70 % 90 % 10 % 18 34 Roumanie________________ 0.38 % 93 % 7 % 26
61 Republique_tcheque______ 0.77 % 89 % 11 % 17 39 Afrique_du_Sud__________ 0.43 % 93 % 7 % 25
85 Bresil__________________ 1.07 % 88 % 12 % 16 39 Grece___________________ 0.43 % 92 % 8 % 24
105 Danemark________________ 1.32 % 87 % 13 % 15 41 Nouvelle-Zelande________ 0.46 % 92 % 8 % 23
107 Pologne_________________ 1.35 % 86 % 14 % 14 49 Hongrie_________________ 0.55 % 91 % 9 % 22
122 Suede___________________ 1.53 % 84 % 16 % 13 58 Finlande________________ 0.65 % 91 % 9 % 21
135 Belgique________________ 1.70 % 83 % 17 % 12 60 Portugal________________ 0.67 % 90 % 10 % 20
170 Espagne_________________ 2.14 % 81 % 19 % 11 61 Norvege_________________ 0.68 % 90 % 10 % 19
186 Autriche________________ 2.34 % 79 % 21 % 10 65 ________________________ 0.72 % 89 % 11 % 18
249 Australie_______________ 3.13 % 77 % 23 % 9 69 Republique_tcheque______ 0.77 % 88 % 12 % 17
301 Suisse__________________ 3.79 % 73 % 27 % 8 102 Bresil__________________ 1.13 % 87 % 13 % 16
317 Canada__________________ 3.99 % 70 % 30 % 7 116 Danemark________________ 1.29 % 86 % 14 % 15
354 Pays-Bas________________ 4.45 % 66 % 34 % 6 127 Suede___________________ 1.41 % 85 % 15 % 14
407 France__________________ 5.12 % 61 % 39 % 5 148 Belgique________________ 1.65 % 84 % 16 % 13
498 Italie__________________ 6.26 % 56 % 44 % 4 150 Pologne_________________ 1.67 % 82 % 18 % 12
703 Royaume-Uni_____________ 8.84 % 50 % 50 % 3 206 Autriche________________ 2.29 % 80 % 20 % 11
1568 Allemagne_______________ 19.72 % 41 % 59 % 2 210 Espagne_________________ 2.34 % 78 % 22 % 10
1693 Etats-Unis______________ 21.29 % 21 % 79 % 1 275 Australie_______________ 3.06 % 76 % 24 % 9
TOTAL = 7951 sales 407161 EUR over 99 countries on Wed Dec 2 12:24:33 CET 2020 319 Suisse__________________ 3.55 % 73 % 27 % 8
347 Canada__________________ 3.86 % 69 % 31 % 7
404 Pays-Bas________________ 4.50 % 65 % 35 % 6
511 France__________________ 5.69 % 61 % 39 % 5
592 Italie__________________ 6.59 % 55 % 45 % 4
793 Royaume-Uni_____________ 8.82 % 48 % 52 % 3
1720 Allemagne_______________ 19.14 % 40 % 60 % 2
1837 Etats-Unis______________ 20.44 % 20 % 80 % 1
TOTAL = 8987 sales 467605 EUR over 107 countries on Mon Mar 28 11:40:45 CEST 2022

View file

@ -85,10 +85,39 @@ If you are very interrested in those projects, don't hesitate to solicit me!
</ul> </ul>
--> -->
<ul>
<li><b>2.200</b></li>
<li><b>Dependencies removed</b>: None </li>
<li><b>Dependencies added</b>: None </li>
<li><b>Enhancement</b>: Append a final email report on each account at the end of the synchronization. Use --noemailreport1 and --noemailreport2 to avoid final emails reports in each INBOX.</li>
<li><b>Enhancement</b>: Documented why total sizes can differ even when the sync is perfect.</li>
<li><b>Enhancement</b>: Added SERVER_NAME SERVER_ADDR SERVER_ADMIN variables and values to the output.</li>
<li><b>Enhancement</b>: Added the local ip address for the imap connexions. It can help configuring firewalls to allow the imap source IP.</li>
<li><b>Enhancement</b>: Added "Posta inviata" for \Sent with --automap</li>
<li><b>CGI context</b>: Upped ERRORS_MAX_CGI from 20 to 500.</li>
<li><b>CGI context</b>: Added --var to get values from proximapsync for variables REMOTE_ADDR REMOTE_HOST HTTP_REFERER HTTP_USER_AGENT SERVER_SOFTWARE SERVER_PORT HTTP_COOKIE</li>
<li><b>Usability</b>: Added warning "parsing headers of folder ... It can take time for huge folders. Be patient."</li>
<li><b>Bug fix</b>: Do not turn on --delete2duplicates when --syncduplicates is on, unless --delete2duplicates is given.</li>
<li><b>Bug fix</b>: Redirect STDERR to STDOUT in all cases, --log or --nolog</li>
<li><b>Bug fix</b>: Do not allow --skipcrossduplicates and --usecache. Exit EX_USAGE 64</li>
<li><b>Bug fix</b>: Dates were not displayed under Windows because POSIX::strftime %e is not portable. Fixed several other places where dates were wrong on Windows.</li>
<li><b>Bug fix</b>: --tests --testslive was listing 0 folders.</li>
<li><b>Refactoring</b>: Deglobalized $debuglist $debugflags </li>
<li><b>Refactoring</b>: Added sync->{ permanentflags2 }</li>
</ul>
<ul> <ul>
<li><b>2.178</b></li> <li><b>2.178</b></li>
<li><b>General</b>: </li>
<li><b>Dependencies removed</b>: None </li> <li><b>Dependencies removed</b>: None </li>
<li><b>Dependencies added</b>: Perl module Compress::Zlib</li> <li><b>Dependencies added</b>: Perl module Compress::Zlib</li>
@ -107,10 +136,9 @@ If you are very interrested in those projects, don't hesitate to solicit me!
--keepalive1 is on by default since imapsync release 2.169 --keepalive1 is on by default since imapsync release 2.169
Use --nokeepalive1 to disable it. Same thing for --keepalive2 but for --host2. See <a href="https://metacpan.org/pod/Mail::IMAPClient#Keepalive">https://metacpan.org/pod/Mail::IMAPClient#Keepalive</a></li> Use --nokeepalive1 to disable it. Same thing for --keepalive2 but for --host2. See <a href="https://metacpan.org/pod/Mail::IMAPClient#Keepalive">https://metacpan.org/pod/Mail::IMAPClient#Keepalive</a></li>
<li><b>Enhancement</b>: </li>
<li><b>Enhancement</b>: </li>
<li><b>Usability</b>: Removed --fast option. It didn't do anything anyway, it was a fake option.</li> <li><b>Usability</b>: Removed --fast option. It didn't do anything anyway, it was a fake option.</li>
<li><b>Usability</b>: Added advice inline advice on errors <li><b>Usability</b>: Added advice inline advice on errors
<ul> <ul>
<li>ERR_OVERQUOTA. "The destination mailbox is 100% full, get free space on it and then resume the sync."</li> <li>ERR_OVERQUOTA. "The destination mailbox is 100% full, get free space on it and then resume the sync."</li>
@ -125,10 +153,6 @@ If you are very interrested in those projects, don't hesitate to solicit me!
<li><b>Usability</b>: Bytes sizes human readable are now presented in KB MB GB TB PB (1000 base) instead of KiB MiB GiB TiB PiB (1024 base)</li> <li><b>Usability</b>: Bytes sizes human readable are now presented in KB MB GB TB PB (1000 base) instead of KiB MiB GiB TiB PiB (1024 base)</li>
<li><b>Usability</b>: Added README help for --truncmess</li> <li><b>Usability</b>: Added README help for --truncmess</li>
<li><b>Usability</b>: </li>
<li><b>Usability</b>: </li>
<li><b>Usability</b>: </li>
<li><b>Usability</b>: </li>
<li><b>CGI context</b>: Experimental loaddelay forced to 0 (no delay at all). So far a huge load is rarely a problem.</li> <li><b>CGI context</b>: Experimental loaddelay forced to 0 (no delay at all). So far a huge load is rarely a problem.</li>
@ -141,13 +165,10 @@ If you are very interrested in those projects, don't hesitate to solicit me!
<li><b>Bug fix</b>: Load average on Mac was sometimes buggy. locale float 3,14 instead of 3.14</li> <li><b>Bug fix</b>: Load average on Mac was sometimes buggy. locale float 3,14 instead of 3.14</li>
<li><b>Bug fix</b>: errors_incr() exited with CATCH_ALL</li> <li><b>Bug fix</b>: errors_incr() exited with CATCH_ALL</li>
<li><b>Bug fix</b>: Memory consumption on Mac was not relevant. Use RSS instead of VSZ, on Mac only. Linux stays with VSZ.</li> <li><b>Bug fix</b>: Memory consumption on Mac was not relevant. Use RSS instead of VSZ, on Mac only. Linux stays with VSZ.</li>
<li><b>Bug fix</b>: </li>
<li><b>Bug fix</b>: </li>
<li><b>Docker context</b>: Current working directory changed from /var/tmp to /var/tmp/uid_$EFFECTIVE_USER_ID</li> <li><b>Docker context</b>: Current working directory changed from /var/tmp to /var/tmp/uid_$EFFECTIVE_USER_ID</li>
</ul> </ul>
@ -1018,7 +1039,7 @@ by ignoring PERMANENTFLAGS (Exchange tests)</li>
<!--#config timefmt="%D" --> <!--#config timefmt="%D" -->
<!--#config timefmt="%A %B %d, %Y" --> <!--#config timefmt="%A %B %d, %Y" -->
<b>This document last modified on <!--#echo var="LAST_MODIFIED" --></b> <b>This document last modified on <!--#echo var="LAST_MODIFIED" --></b>
($Id: news.shtml,v 1.83 2022/01/13 18:36:12 gilles Exp gilles $)<br /> ($Id: news.shtml,v 1.84 2022/04/04 16:11:25 gilles Exp gilles $)<br />
<a href="#TOP">Top of the page</a> <a href="#TOP">Top of the page</a>
</p> </p>
</body></html> </body></html>

18
TODO
View file

@ -1,5 +1,5 @@
#!/bin/cat #!/bin/cat
# $Id: TODO,v 1.262 2022/01/11 12:56:18 gilles Exp gilles $ # $Id: TODO,v 1.265 2022/02/22 15:16:48 gilles Exp gilles $
This documentation is also at http://imapsync.lamiral.info/#doc This documentation is also at http://imapsync.lamiral.info/#doc
@ -9,9 +9,23 @@ TODO file for imapsync
https://imapsync.lamiral.info/TODO https://imapsync.lamiral.info/TODO
SUGGESTED 2022_02_19
Talk about size discrepencies.
Gmail doesn't count duplicates sizes twice.
Servers reported message sizes are always not the actual messages sizes.
Where put that information?
SUGGESTED 2022_01_26 by Kuch/Mitchell/D.
Make --delete1 be optionally "Move to Trash folder"
Use MOVE if possible
https://datatracker.ietf.org/doc/html/rfc6851
SUGGESTED 2022_01_09 by Neustradamus SUGGESTED 2022_01_09 by Neustradamus
Add SCRAM-SHA* support Add SCRAM-SHA* support
https://github.com/imapsync/imapsync/issues/313 https://github.com/imapsync/imapsync/issues/313
https://perldoc.perl.org/Digest::SHA
SUGGESTED 2021_06_13 by rotemes SUGGESTED 2021_06_13 by rotemes
https://github.com/imapsync/imapsync/issues/288 https://github.com/imapsync/imapsync/issues/288
@ -530,7 +544,7 @@ Write a Windows tutorial, TUTORIAL_Windows.html.
Write a good practices migration tips document, GOOD_PRACTICES.html Write a good practices migration tips document, GOOD_PRACTICES.html
Add uidexpunge with --delete if possible (like with --delete2). Add uidexpunge with --delete1 if possible (like with --delete2).
Add the possibility to specify a unity with --maxsize and --minsize Add the possibility to specify a unity with --maxsize and --minsize
Example --maxsize 10MB --minsize 10KB Example --maxsize 10MB --minsize 10KB

View file

@ -1 +1 @@
2.178 2.200

View file

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
# $Id: cgi_memo,v 1.74 2021/11/25 11:25:13 gilles Exp gilles $ # $Id: cgi_memo,v 1.78 2022/03/28 09:24:08 gilles Exp gilles $
if test -n "$1"; then if test -n "$1"; then
echoq() { echo "$@" ; } # not quiet mode echoq() { echo "$@" ; } # not quiet mode
@ -154,10 +154,10 @@ longest_transfer()
LC_ALL=C printf "%.0f\n" `datamash_file_op_index "$statsfile" max 4` LC_ALL=C printf "%.0f\n" `datamash_file_op_index "$statsfile" max 4`
} }
echoq number_and_pids_of_imapsync_running
number_and_pids_of_imapsync_running() echoq pids_of_imapsync_running
{ pids_of_imapsync_running() {
echo "`number_of_imapsync_running` : `pids_of_imapsync_running`" pgrep -d ' ' -f cgi-bin/imapsync
: # always return true : # always return true
} }
@ -168,12 +168,25 @@ number_of_imapsync_running()
: # always return true : # always return true
} }
echoq pids_of_imapsync_running echoq number_and_pids_of_imapsync_running
pids_of_imapsync_running() { number_and_pids_of_imapsync_running()
pgrep -d ' ' -f cgi-bin/imapsync {
echo "`number_of_imapsync_running` : `pids_of_imapsync_running`"
: # always return true : # always return true
} }
echoq memory_used_by_all_imapsync_KiB
memory_used_by_all_imapsync_KiB()
{
# Sum up all memory taken by imapsync runs, in KiB.
pids_of_imapsync_running=`pids_of_imapsync_running`
if test -n "$pids_of_imapsync_running" ; then
ps -o vsz -p $pids_of_imapsync_running | sed 1,1d | datamash sum 1
else
echo 0
fi
}
echoq oom_immune_imapsync_running echoq oom_immune_imapsync_running
oom_immune_imapsync_running() { oom_immune_imapsync_running() {
for pid in `pids_of_imapsync_running` for pid in `pids_of_imapsync_running`
@ -335,43 +348,41 @@ grep_all_stat_from_patterns_list() {
sum_first_column_G_HTTP_USER_AGENT_sorted() sum_first_column_G_HTTP_USER_AGENT_sorted()
{ {
awk '{sum += $1} END {print sum}' G_HTTP_USER_AGENT_sorted.txt awk '{sum += $1} END {print sum}' G_HTTP_USER_AGENT_${1}_sorted.txt
} }
stat_useragent_X() stat_useragent_X()
{ {
grep -o 'HTTP_USER_AGENT.*' G_HTTP_USER_AGENT.txt \ grep -o 'HTTP_USER_AGENT.*' G_HTTP_USER_AGENT_$1.txt \
| tail -10000000 | sort | egrep -o -w 'Mozilla/5.0 \([^;]+' \ | tail -10000000 | sort | egrep -o -w 'Mozilla/5.0 \([^;]+' \
| sort | egrep -o '\([a-zA-Z]+' | sort | uniq -c | sort -g \ | sort | egrep -o '\([a-zA-Z]+' | sort | uniq -c | sort -g \
| grep -v KHTML | tr -d '(' > G_HTTP_USER_AGENT_sorted.txt | grep -v KHTML | tr -d '(' > G_HTTP_USER_AGENT_${1}_sorted.txt
} }
echoq 'percent_stat_useragent_X' echoq 'percent_stat_useragent_X'
percent_stat_useragent_X() percent_stat_useragent_X()
{ {
stat_useragent_X stat_useragent_X "$1"
sum_first_column_G_HTTP_USER_AGENT=`sum_first_column_G_HTTP_USER_AGENT_sorted` sum_first_column_G_HTTP_USER_AGENT=`sum_first_column_G_HTTP_USER_AGENT_sorted $1`
{ while read num_useragent useragent ; do { while read num_useragent useragent ; do
#echo KK $num_useragent $useragent #echo KK $num_useragent $useragent
PerCent=`echo "scale=2; 100*$num_useragent/$sum_first_column_G_HTTP_USER_AGENT" | bc -l` PerCent=`echo "scale=2; 100*$num_useragent/$sum_first_column_G_HTTP_USER_AGENT" | bc -l`
echo "$useragent $PerCent % ( $num_useragent / $sum_first_column_G_HTTP_USER_AGENT )" echo "$useragent $PerCent % ( $num_useragent / $sum_first_column_G_HTTP_USER_AGENT )"
done done
} < G_HTTP_USER_AGENT_sorted.txt } < G_HTTP_USER_AGENT_${1}_sorted.txt
} }
stat_load() stat_load()
{ {
echo -n 'Load 1 min 5 min 15 min ' ; grep -o 'on.*cores' G_Load.txt|uniq echo -n 'Load 1 min 5 min 15 min ' ; grep -o 'on.*cores' G_Load_$1.txt | uniq
echo -n 'Load min: ' ; datamash --format=%3.1f -W min 3 min 4 min 5 < G_Load.txt echo -n 'Load min: ' ; datamash --format=%3.1f -W min 3 min 4 min 5 < G_Load_$1.txt
echo -n 'Load q1: ' ; datamash --format=%3.1f -W q1 3 q1 4 q1 5 < G_Load.txt echo -n 'Load q1: ' ; datamash --format=%3.1f -W q1 3 q1 4 q1 5 < G_Load_$1.txt
echo -n 'Load median: ' ; datamash --format=%3.1f -W median 3 median 4 median 5 < G_Load.txt echo -n 'Load median: ' ; datamash --format=%3.1f -W median 3 median 4 median 5 < G_Load_$1.txt
echo -n 'Load mean: ' ; datamash --format=%3.1f -W mean 3 mean 4 mean 5 < G_Load.txt echo -n 'Load mean: ' ; datamash --format=%3.1f -W mean 3 mean 4 mean 5 < G_Load_$1.txt
echo -n 'Load q3: ' ; datamash --format=%3.1f -W q3 3 q3 4 q3 5 < G_Load.txt echo -n 'Load q3: ' ; datamash --format=%3.1f -W q3 3 q3 4 q3 5 < G_Load_$1.txt
echo -n 'Load max: ' ; datamash --format=%3.1f -W max 3 max 4 max 5 < G_Load.txt echo -n 'Load max: ' ; datamash --format=%3.1f -W max 3 max 4 max 5 < G_Load_$1.txt
} }
echoq stat_exit_value echoq stat_exit_value
@ -432,49 +443,82 @@ stat_any() {
echoq stat_all echoq stat_all
stat_all() stat_all()
{ {
stat_load ; echo stat_load "$1" ; echo
echo G_REMOTE_ADDR_$1.txt
egrep -o 'REMOTE_ADDR is .*' G_REMOTE_ADDR_$1.txt | sort -g | uniq -c | sort -g | tail -5
echo
echo G_REMOTE_HOST_$1.txt
egrep -o 'REMOTE_HOST is .*' G_REMOTE_HOST_$1.txt | sort -g | uniq -c | sort -g | tail -5
echo
echo G_HTTP_COOKIE_$1.txt
egrep -o 'imapsync_runs=[0-9]+' G_HTTP_COOKIE_$1.txt | egrep -o '[0-9]+' | sort -n | tail -1
# stat_any G_REMOTE_ADDR.txt
# stat_any G_REMOTE_HOST.txt
# stat_any G_HTTP_COOKIE.txt
# stat_any G_HTTP_REFERER.txt # stat_any G_HTTP_REFERER.txt
echo
echo G_HTTP_REFERER_$1.txt
egrep -o 'HTTP_REFERER is .*' G_HTTP_REFERER_$1.txt | sort -g | uniq -c | sort -g
# See various_usefull() echo
# stat_any G_Host1_IMAP_server.txt echo G_Host1_IMAP_server_$1.txt
# stat_any G_Host2_IMAP_server.txt cat G_Host1_IMAP_server_$1.txt | datamash -s -W -g 4 count 4 | awk '{ print $2 " " $1 }' | sort -g | tail -5
# stat_any G_Host1_banner.txt echo
# stat_any G_Host2_banner.txt echo G_Host2_IMAP_server_$1.txt
cat G_Host2_IMAP_server_$1.txt | datamash -s -W -g 4 count 4 | awk '{ print $2 " " $1 }' | sort -g | tail -5
stat_any G_Host1_Nb_messages.txt
stat_any G_Host2_Nb_messages.txt echo
stat_any G_Messages_transferred.txt stat_any G_Host1_Nb_messages_$1.txt
stat_any G_Messages_skipped.txt stat_any G_Host2_Nb_messages_$1.txt
stat_any G_Messages_found_in_host1_not_in_host2.txt 9 stat_any G_Messages_transferred_$1.txt
stat_any G_Messages_found_in_host2_not_in_host1.txt 9 stat_any G_Messages_skipped_$1.txt
stat_any G_Messages_found_in_host1_not_in_host2_$1.txt 9
stat_any G_Messages_found_in_host2_not_in_host1_$1.txt 9
# stat_any G_Folders_synced.txt # stat_any G_Folders_synced.txt
egrep -o '[0-9]+/[0-9]+ synced' G_Folders_synced.txt | egrep -o '^[0-9]+' > G_Folders_synced_.txt egrep -o '[0-9]+/[0-9]+ synced' G_Folders_synced_$1.txt | egrep -o '^[0-9]+' > G_Folders_synced__$1.txt
egrep -o '[0-9]+/[0-9]+ synced' G_Folders_synced.txt | egrep -o '[0-9]+/[0-9]+' | egrep -o '[0-9]+$' > G_Folders_total_seen.txt egrep -o '[0-9]+/[0-9]+ synced' G_Folders_synced_$1.txt | egrep -o '[0-9]+/[0-9]+' | egrep -o '[0-9]+$' > G_Folders_total_seen_$1.txt
stat_any G_Folders_synced_.txt 1 stat_any G_Folders_synced__$1.txt 1
stat_any G_Folders_total_seen.txt 1 stat_any G_Folders_total_seen_$1.txt 1
# #
stat_any G_Transfer_time.txt stat_any G_Transfer_time_$1.txt
stat_any G_Host1_Total_size.txt stat_any G_Host1_Total_size_$1.txt
stat_any G_Host2_Total_size.txt stat_any G_Host2_Total_size_$1.txt
stat_any G_Total_bytes_transferred.txt 5 stat_any G_Total_bytes_transferred_$1.txt 5
stat_any G_Message_rate.txt stat_any G_Message_rate_$1.txt
stat_any G_Average_bandwidth_rate.txt 5 stat_any G_Average_bandwidth_rate_$1.txt 5
stat_any G_Biggest_message.txt stat_any G_Biggest_message_$1.txt
stat_any G_Detected_errors.txt 2 stat_any G_Detected_errors_$1.txt 2
#stat_any G_Exiting_with_return_value.txt 5 # GROUP #stat_any G_Exiting_with_return_value.txt 5 # GROUP
stat_any G_Memory_consumption_at_the_end.txt 7 stat_any G_Memory_consumption_at_the_end_$1.txt 7
#stat_any G_failure_Error_login.txt #stat_any G_failure_Error_login.txt
percent_stat_useragent_X ; echo
stat_exit_value
echo "Data made at" `date -r grep_stats.txt` echo cpu time
stat_any G_CPU_time_and_cpu_$1.txt 6
echo '%allcpus'
stat_any G_CPU_time_and_cpu_$1.txt 10
echo G_Host1_banner_$1.txt
server_survey_percent G_Host1_banner_$1.txt | tail -6
echo
echo G_Host2_banner_$1.txt
server_survey_percent G_Host2_banner_$1.txt | tail -6
echo
echo USER_AGENT
percent_stat_useragent_X $1 ;
echo
echo EXIT values
stat_exit_value $1
echo
echo "Data made at" `date -r grep_stats_$1.txt`
} }
stat_transfer_time_mean() stat_transfer_time_mean()
@ -1217,20 +1261,49 @@ div_1_by_2_or_zero()
fi fi
} }
load_1m_linux()
{
cat /proc/loadavg | cut -d' ' -f1
}
load_1m_freebsd()
{
/sbin/sysctl vm.loadavg | egrep -o '[0-9]+\.[0-9]++' | head -1
}
load_1m()
{
here_is_linux && load_1m_linux
here_is_freebsd && load_1m_freebsd
}
KiBytes_to_Bytes()
{
expr 1024 \* $1
}
echoq number_of_imapsync_running_bandwidth echoq number_of_imapsync_running_bandwidth
number_of_imapsync_running_bandwidth() number_of_imapsync_running_bandwidth()
{ {
# Maybe I could do two number_of_imapsync_running one before
# one after and average the two.
nir=`number_of_imapsync_running` nir=`number_of_imapsync_running`
load_1m=`load_1m`
nbsr=`number_of_bytes_sent_received_per_second_during ${1:-1}` nbsr=`number_of_bytes_sent_received_per_second_during ${1:-1}`
mubaiKiB=`memory_used_by_all_imapsync_KiB`
mubaiB=`KiBytes_to_Bytes $mubaiKiB`
mubai_human=`bytestohuman $mubaiB`
ratio=`div_1_by_2_or_zero $nbsr $nir` ratio=`div_1_by_2_or_zero $nbsr $nir`
date=`date_ymdhms` date=`date_ymdhms`
date_u=`LANG= date -u` date_u=`LANG= date -u`
nbsr_human=`bytestohuman $nbsr` nbsr_human=`bytestohuman $nbsr`
ratio_human=`bytestohuman $ratio` ratio_human=`bytestohuman $ratio`
echo "$date $nir $nbsr $ratio $nbsr_human$ratio_human" echo "$date $nir $nbsr $ratio $nbsr_human $ratio_human $load_1m $mubaiKiB"
echo "Current number of syncs: $nir; Current total bandwidth: $nbsr_human/s; Current bandwidth per sync: $ratio_human/s; Current date/time: $date_u; ">/var/tmp/imapsync_current.txt echo "Load: $load_1m; Mem: $mubai_human; Number of syncs: $nir; Total bandwidth: $nbsr_human/s; Bandwidth per sync: $ratio_human/s; Date/time: $date_u; ">/var/tmp/imapsync_current.txt
} }
echoq loop_number_of_imapsync_running_bandwidth echoq loop_number_of_imapsync_running_bandwidth
loop_number_of_imapsync_running_bandwidth() loop_number_of_imapsync_running_bandwidth()
{ {
@ -1249,35 +1322,30 @@ echoq various_usefull
various_usefull() { various_usefull() {
cat <<'EOF' cat <<'EOF'
strace -e trace=signal -f `pgrep /usr/sbin/apach | xargs -n1 echo -n " -p "` 2>&1 strace -e trace=signal -f `pgrep /usr/sbin/apach | xargs -n1 echo -n " -p "` 2>&1
egrep -o '[0-9]+/[0-9]+' G_Folders_synced.txt | sort -g
egrep -o '[0-9]+/[0-9]+' G_Folders_synced.txt | sort -t/ -g -k2 | uniq -c
egrep -o '* ID .*' G_Read___ID.txt | sort | uniq -c | sort -n egrep -o '* ID .*' G_Read___ID.txt | sort | uniq -c | sort -n
egrep -o 'imapsync_runs=[0-9]+' G_HTTP_COOKIE.txt | egrep -o '[0-9]+' | sort -n | uniq -c | sort -g -k1,2
egrep -o 'HTTP_REFERER is .*' G_HTTP_REFERER.txt | sort -g | uniq -c | sort -g
egrep -o 'REMOTE_HOST is .*' G_REMOTE_HOST.txt | sort -g | uniq -c | sort -g
egrep -o 'REMOTE_ADDR is .*' G_REMOTE_ADDR.txt | sort -g | uniq -c | sort -g
datamash -s -W -g 4 count 4 < G_Host1_IMAP_server.txt | awk '{ print $2 " " $1 }' | sort -g | tail -22
datamash -s -W -g 4 count 4 < G_Host2_IMAP_server.txt | awk '{ print $2 " " $1 }' | sort -g | tail -22
egrep -o '* ID .*' G_Read___ID.txt | sort | awk '{ print $1 " " $2 " " $3 " NIL" }' | datamash -s -W -g 3 count 3 | awk '{ print $2 " " $1 }' | sort -g egrep -o '* ID .*' G_Read___ID.txt | sort | awk '{ print $1 " " $2 " " $3 " NIL" }' | datamash -s -W -g 3 count 3 | awk '{ print $2 " " $1 }' | sort -g
locate perl.core | xargs -n 1 gdb -q -x /tmp/gdb_quit.txt -c locate perl.core | xargs -n 1 gdb -q -x /tmp/gdb_quit.txt -c
zcat /var/log/apache/httpd-access.log.*.gz|egrep -o -w 'Mozilla/5.0 \([^;]+' | sort | egrep -o '\([a-zA-Z]+' | sort | uniq -c | sort -g | grep -v KHTML zcat /var/log/apache/httpd-access.log.*.gz|egrep -o -w 'Mozilla/5.0 \([^;]+' | sort | egrep -o '\([a-zA-Z]+' | sort | uniq -c | sort -g | grep -v KHTML
zcat /var/log/apache/httpd-access.log.*.gz|grep 'POST /cgi-bin/imapsync' | egrep -o -w 'Mozilla/5.0 \([^;]+' | sort | egrep -o '\([a-zA-Z]+' | sort | uniq -c | sort -g | grep -v KHTML zcat /var/log/apache/httpd-access.log.*.gz|grep 'POST /cgi-bin/imapsync' | egrep -o -w 'Mozilla/5.0 \([^;]+' | sort | egrep -o '\([a-zA-Z]+' | sort | uniq -c | sort -g | grep -v KHTML
egrep -o '\[.+@[^]]+]' G_success_login.txt |head -222222 | sort | uniq -c | sort -g egrep -o '\[.+@[^]]+]' G_success_login.txt |head -222222 | sort | uniq -c | sort -g
cat G_success_login_on.txt | ./domains_servers_map | sort | uniq -c | sort -g
list_all_logs |tail -9999 | xargs grep -i 'Exiting with return value 112' | tee Error_112_last_9999_syncs.txt list_all_logs |tail -9999 | xargs grep -i 'Exiting with return value 112' | tee Error_112_last_9999_syncs.txt
cut -d: -f1 Error_112_last_30_days.txt | xargs grep -oih 'Invalid system flag.*' | sort | uniq -c cut -d: -f1 Error_112_last_30_days.txt | xargs grep -oih 'Invalid system flag.*' | sort | uniq -c
list_all_logs | xargs grep -i 'Exiting with return value 112' | tee Error_112_all_syncs.txt list_all_logs | xargs grep -i 'Exiting with return value 112' | tee Error_112_all_syncs.txt
cut -d: -f1 Error_112_all_syncs.txt | tail -100 | xargs egrep -oih 'Invalid system flag [^(]+' | sort | uniq -c cut -d: -f1 Error_112_all_syncs.txt | tail -100 | xargs egrep -oih 'Invalid system flag [^(]+' | sort | uniq -c
cat G_success_login_on.txt | ./domains_servers_map | sort | uniq -c | sort -g
logfiles_finished_recently -300| xargs grep -i 'Exiting with return value 10 ' | grep -v 'return value 0 ' | cut -d: -f1 | xargs tail -11 | grep 'failure: can not open imap connection on' | uniq -c | sort -g | grep http | tee ../http_host_failures.txt logfiles_finished_recently -300| xargs grep -i 'Exiting with return value 10 ' | grep -v 'return value 0 ' | cut -d: -f1 | xargs tail -11 | grep 'failure: can not open imap connection on' | uniq -c | sort -g | grep http | tee ../http_host_failures.txt
# Searching big messages copied over 500 MB # Searching big messages copied over 500 MB
list_all_logs|tail -50000 | xargs egrep '{.?[56789]........} copied' list_all_logs|tail -50000 | xargs egrep '{.?[56789]........} copied'
# online processes stats # online processes stats
cat /var/tmp/number_of_imapsync_running.txt | datamash -W min 2 max 2 mean 2 median 2 q1 2 q3 2 cat /var/tmp/number_of_imapsync_running_every_60s.txt | datamash -W min 2 max 2 mean 2 median 2 q1 2 q3 2
for v in 2 3 4; do cat /var/tmp/number_of_imapsync_running_every_6s.txt | datamash --format=%10.0f -W min $v max $v mean $v median $v q1 $v q3 $v ; done for v in 2 3 4; do cat /var/tmp/number_of_imapsync_running_every_6s.txt | datamash --format=%10.0f -W min $v max $v mean $v median $v q1 $v q3 $v ; done
netstat -I em0 -b -n -w 6 -q 1 netstat -I em0 -b -n -w 6 -q 1
while :; do ssh root@ks5 'cd /var/tmp/imapsync_cgi/ ; . cgi_memo ; loop_number_of_imapsync_running_bandwidth 6' ; echo $?; done while :; do ssh root@ks5 'cd /var/tmp/imapsync_cgi/ ; . cgi_memo ; loop_number_of_imapsync_running_bandwidth 6' ; echo $?; done
@ -1289,6 +1357,20 @@ cat G_Host1_Nb_messages.txt | sort -g -k4 | grep 202[01] |tail -100 | cut -f1 -
# Best bandwidth moments # Best bandwidth moments
cat /var/tmp/number_of_imapsync_running_every_60s.txt | sort -k3 -g| tail -66 cat /var/tmp/number_of_imapsync_running_every_60s.txt | sort -k3 -g| tail -66
# Sort by number of parallel runs and by load in case of equality
cat /var/tmp/number_of_imapsync_running_every_60s.txt | grep ^2022_ | sort -k2 -k9 -g | tail -666
# Sort by number of parallel runs and by bandwidth in case of equality
cat /var/tmp/number_of_imapsync_running_every_60s.txt | grep ^2022_ | sort -k2 -k3 -g | tail -666
# getrusage on FreeBSD, espacially disk i/o
procstat -r `pgrep -f cgi-bin/imapsync`
# Sum up all memory taken by imapsync runs, in KiB.
ps -o vsz -p `pgrep -f cgi-bin/imapsync` | sed 1,1d | datamash sum 1
memory_used_by_all_imapsync_KiB
EOF EOF
} }

View file

@ -1,5 +1,5 @@
// $Id: imapsync_form.js,v 1.26 2021/12/18 19:01:52 gilles Exp gilles $ // $Id: imapsync_form.js,v 1.27 2022/01/30 20:57:46 gilles Exp gilles $
/*jslint browser: true*/ /*global $*/ /*jslint browser: true*/ /*global $*/
@ -751,9 +751,9 @@ $(document).ready(
if ( "imapsync.lamiral.info" === location.hostname ) if ( "imapsync.lamiral.info" === location.hostname )
{ {
$( "#status_24h" ).attr('src', 'https://lstu.fr/imapsync_online_status_24h_1200x70') ; // $( "#status_24h" ).attr('src', 'https://lstu.fr/imapsync_online_status_24h_1200x70') ;
$( "#status_7d" ).attr('src', 'https://lstu.fr/imapsync_online_status_7d') ; // $( "#status_7d" ).attr('src', 'https://lstu.fr/imapsync_online_status_7d') ;
$( "#status_2m" ).attr('src', 'https://lstu.fr/imapsync_online_status_2months_1200x70') ; // $( "#status_2m" ).attr('src', 'https://lstu.fr/imapsync_online_status_2months_1200x70') ;
$( "#local_bandwidth" ).collapse( "show" ) ; $( "#local_bandwidth" ).collapse( "show" ) ;
$( "#local_status_dbmon" ).collapse( "show" ) ; $( "#local_status_dbmon" ).collapse( "show" ) ;
$( "#local_status_hetrix" ).collapse( "show" ) ; $( "#local_status_hetrix" ).collapse( "show" ) ;

View file

@ -1,6 +1,6 @@
<!DOCTYPE html> <!DOCTYPE html>
<!-- $Id: imapsync_form_extra.html,v 1.22 2021/12/18 19:03:46 gilles Exp gilles $ --> <!-- $Id: imapsync_form_extra.html,v 1.25 2022/02/18 17:06:24 gilles Exp gilles $ -->
<html lang="en" id="top"> <html lang="en" id="top">
@ -103,6 +103,9 @@
<datalist id="servers1"> <datalist id="servers1">
<option value="imap.gmail.com"> <option value="imap.gmail.com">
<option value="outlook.office365.com"> <option value="outlook.office365.com">
<option value="imap.hostinger.com">
<option value="ssl0.ovh.net">
<option value="email-ssl.com.br">
<option value="imap.mail.yahoo.com"> <option value="imap.mail.yahoo.com">
</datalist> </datalist>
</div> </div>
@ -231,6 +234,9 @@
<datalist id="servers2"> <datalist id="servers2">
<option value="imap.gmail.com"> <option value="imap.gmail.com">
<option value="outlook.office365.com"> <option value="outlook.office365.com">
<option value="imap.hostinger.com">
<option value="ssl0.ovh.net">
<option value="email-ssl.com.br">
<option value="imap.mail.yahoo.com"> <option value="imap.mail.yahoo.com">
</datalist> </datalist>
</div> </div>
@ -401,36 +407,9 @@
<hr> <hr>
<p class="text-center"> <p class="text-center">
Imapsync <b>Online Status</b> over the <b>last 24h</b><br> Imapsync <b>Online Status</b> over the <b>last 24h</b><br>
<img id="status_24h" class="img-responsive center-block" alt="Imapsync Online Status" src="imapsync_online_status_24h_1200x70.png"> <a href="imapsync_online_status.html"><img id="status_24h" class="img-responsive center-block" alt="Imapsync Online Status over the last 24h" src="https://sup.lamiral.info/dbmon/cgi-bin/rrdview.cgi?child=yes&rrdfile=%2Fvar%2Ftmp%2Fdbmon%2Ftests%2Frrdbases%2Flocalhost~2583~LAMIRAL~Imapsync_Online~LAMIRAL%2CImapsync_Online~opstatus~300~.rrd;interval_vue=p86400;date_given_by=now;date_means=end;dsname=opstatus;width=1200;hight=70;lower=0;upper=100;rigid=on;Beautiful%20Image%21.x=128;Beautiful%20Image%21.y=30;title=Service%20Status;owner=Imapsync_Online;caption=Status%20in%20%25;monitor=https.rrdrt.monitor%20--rrdrt%20imapsync.lamiral.info%2Fcgi-bin%2Fimapsync%20%3B%3B">
</a>
</p> </p>
<p class="text-center">
Imapsync <b>Online Status</b> over the <b>last week</b><br>
<img id="status_7d" class="img-responsive center-block" alt="Imapsync Online Status" src="imapsync_online_status_7d_1200x70.png">
</p>
<p class="text-center">
Imapsync <b>Online Status</b> over the <b>last two months</b><br>
<img id="status_2m" class="img-responsive center-block" alt="Imapsync Online Status" src="imapsync_online_status_2months_1200x70.png"><br>
</p>
<!--
Uncomment the following when the data are available
-->
<!--
<p class="text-center">
Imapsync <b>Online Status</b> over the <b>last year</b><br>
<img id="status_1y" class="img-responsive center-block" alt="Imapsync Online Status" src="https://lstu.fr/imapsync_online_status_1year_1200x70"><br>
</p>
<p class="text-center">
Imapsync <b>Online Status</b> over the <b>last 10 years</b><br>
<img id="status_10y" class="img-responsive center-block" alt="Imapsync Online Status" src="https://lstu.fr/imapsync_online_status_10years_1200x70-2"><br>
</p>
-->
</div> </div>
@ -463,7 +442,7 @@ monitor page powered by the <a href="https://hetrixtools.com/uptime-monitor/4143
<!-- <a href="#buttons" class="btn btn-info scripton" role="button">Consoles</a> --> <!-- <a href="#buttons" class="btn btn-info scripton" role="button">Consoles</a> -->
<a href="#bottom" title="Bottom of the page" class="btn btn-info active" role="button">Bottom</a> <a href="#bottom" title="Bottom of the page" class="btn btn-info active" role="button">Bottom</a>
<br> <br>
<small> ($Id: imapsync_form_extra.html,v 1.22 2021/12/18 19:03:46 gilles Exp gilles $) </small><br> <small> ($Id: imapsync_form_extra.html,v 1.25 2022/02/18 17:06:24 gilles Exp gilles $) </small><br>
Terms and conditions for anything: <a href="https://imapsync.lamiral.info/LICENSE">No limits to do anything with this work and this license!</a><br> Terms and conditions for anything: <a href="https://imapsync.lamiral.info/LICENSE">No limits to do anything with this work and this license!</a><br>
</div> </div>
</div> </div>

View file

@ -1,6 +1,6 @@
<!DOCTYPE html> <!DOCTYPE html>
<!-- $Id: imapsync_form_extra_free.html,v 1.23 2021/12/18 19:03:46 gilles Exp gilles $ --> <!-- $Id: imapsync_form_extra_free.html,v 1.27 2022/02/20 09:37:45 gilles Exp gilles $ -->
<html lang="en" id="top"> <html lang="en" id="top">
@ -161,6 +161,9 @@ It's <b>ok</b> if you <b>don't</b> have a VAT number.<br />
<datalist id="servers1"> <datalist id="servers1">
<option value="imap.gmail.com"> <option value="imap.gmail.com">
<option value="outlook.office365.com"> <option value="outlook.office365.com">
<option value="imap.hostinger.com">
<option value="ssl0.ovh.net">
<option value="email-ssl.com.br">
<option value="imap.mail.yahoo.com"> <option value="imap.mail.yahoo.com">
</datalist> </datalist>
</div> </div>
@ -289,6 +292,9 @@ It's <b>ok</b> if you <b>don't</b> have a VAT number.<br />
<datalist id="servers2"> <datalist id="servers2">
<option value="imap.gmail.com"> <option value="imap.gmail.com">
<option value="outlook.office365.com"> <option value="outlook.office365.com">
<option value="imap.hostinger.com">
<option value="ssl0.ovh.net">
<option value="email-ssl.com.br">
<option value="imap.mail.yahoo.com"> <option value="imap.mail.yahoo.com">
</datalist> </datalist>
</div> </div>
@ -460,36 +466,9 @@ It's <b>ok</b> if you <b>don't</b> have a VAT number.<br />
<hr> <hr>
<p class="text-center"> <p class="text-center">
Imapsync <b>Online Status</b> over the <b>last 24h</b><br> Imapsync <b>Online Status</b> over the <b>last 24h</b><br>
<img id="status_24h" class="img-responsive center-block" alt="Imapsync Online Status" src="imapsync_online_status_24h_1200x70.png"> <a href="imapsync_online_status.html"><img id="status_24h" class="img-responsive center-block" alt="Imapsync Online Status over the last 24h" src="https://sup.lamiral.info/dbmon/cgi-bin/rrdview.cgi?child=yes&rrdfile=%2Fvar%2Ftmp%2Fdbmon%2Ftests%2Frrdbases%2Flocalhost~2583~LAMIRAL~Imapsync_Online~LAMIRAL%2CImapsync_Online~opstatus~300~.rrd;interval_vue=p86400;date_given_by=now;date_means=end;dsname=opstatus;width=1200;hight=70;lower=0;upper=100;rigid=on;Beautiful%20Image%21.x=128;Beautiful%20Image%21.y=30;title=Service%20Status;owner=Imapsync_Online;caption=Status%20in%20%25;monitor=https.rrdrt.monitor%20--rrdrt%20imapsync.lamiral.info%2Fcgi-bin%2Fimapsync%20%3B%3B">
</a>
</p> </p>
<p class="text-center">
Imapsync <b>Online Status</b> over the <b>last week</b><br>
<img id="status_7d" class="img-responsive center-block" alt="Imapsync Online Status" src="imapsync_online_status_7d_1200x70.png">
</p>
<p class="text-center">
Imapsync <b>Online Status</b> over the <b>last two months</b><br>
<img id="status_2m" class="img-responsive center-block" alt="Imapsync Online Status" src="imapsync_online_status_2months_1200x70.png"><br>
</p>
<!--
Uncomment the following when the data are available
-->
<!--
<p class="text-center">
Imapsync <b>Online Status</b> over the <b>last year</b><br>
<img id="status_1y" class="img-responsive center-block" alt="Imapsync Online Status" src="https://lstu.fr/imapsync_online_status_1year_1200x70"><br>
</p>
<p class="text-center">
Imapsync <b>Online Status</b> over the <b>last 10 years</b><br>
<img id="status_10y" class="img-responsive center-block" alt="Imapsync Online Status" src="https://lstu.fr/imapsync_online_status_10years_1200x70-2"><br>
</p>
-->
</div> </div>
@ -522,7 +501,7 @@ monitor page powered by the <a href="https://hetrixtools.com/uptime-monitor/4143
<!-- <a href="#buttons" class="btn btn-info scripton" role="button">Consoles</a> --> <!-- <a href="#buttons" class="btn btn-info scripton" role="button">Consoles</a> -->
<a href="#bottom" title="Bottom of the page" class="btn btn-info active" role="button">Bottom</a> <a href="#bottom" title="Bottom of the page" class="btn btn-info active" role="button">Bottom</a>
<br> <br>
<small> ($Id: imapsync_form_extra_free.html,v 1.23 2021/12/18 19:03:46 gilles Exp gilles $) </small><br> <small> ($Id: imapsync_form_extra_free.html,v 1.27 2022/02/20 09:37:45 gilles Exp gilles $) </small><br>
Terms and conditions for anything: <a href="https://imapsync.lamiral.info/LICENSE">No limits to do anything with this work and this license!</a><br> Terms and conditions for anything: <a href="https://imapsync.lamiral.info/LICENSE">No limits to do anything with this work and this license!</a><br>
</div> </div>
</div> </div>

View file

@ -0,0 +1,50 @@
<!DOCTYPE html>
<!-- $Id: imapsync_online_status.html,v 1.1 2022/02/18 17:07:03 gilles Exp gilles $ -->
<html lang="en" id="top">
<head>
<title>Imapsync Online Status</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<h2>Imapsync Online Status over the last 24h</h2>
<p>
<img id="status_24h" class="img-responsive center-block" alt="Imapsync Online Status over the last 24h" src="https://sup.lamiral.info/dbmon/cgi-bin/rrdview.cgi?child=yes&rrdfile=%2Fvar%2Ftmp%2Fdbmon%2Ftests%2Frrdbases%2Flocalhost~2583~LAMIRAL~Imapsync_Online~LAMIRAL%2CImapsync_Online~opstatus~300~.rrd;interval_vue=p86400;date_given_by=now;date_means=end;dsname=opstatus;width=1200;hight=70;lower=0;upper=100;rigid=on;Beautiful%20Image%21.x=128;Beautiful%20Image%21.y=30;title=Service%20Status;owner=Imapsync%20Online;caption=Status%20in%20%25;monitor=https.rrdrt.monitor%20--rrdrt%20imapsync.lamiral.info%2Fcgi-bin%2Fimapsync%20%3B%3B">
</p>
<h2>Imapsync Online Status over the last week</h2>
<p>
<img id="status_7d" class="img-responsive center-block" alt="Imapsync Online Status over the last week" src="https://sup.lamiral.info/dbmon/cgi-bin/rrdview.cgi?child=yes&rrdfile=%2Fvar%2Ftmp%2Fdbmon%2Ftests%2Frrdbases%2Flocalhost~2583~LAMIRAL~Imapsync_Online~LAMIRAL%2CImapsync_Online~opstatus~300~.rrd;interval_vue=p604800;year=2021;mon=%205;mday=%209;hour=13;min=15;date_given_by=now;date_means=end;dsname=opstatus;width=1200;hight=70;lower=0;upper=100;rigid=on;Beautiful%20Image%21.x=571;Beautiful%20Image%21.y=67;title=Service%20Status;owner=Imapsync%20Online;caption=Status%20in%20%25;start=1619954142;end=1620558942;width_old=1200;hight_old=70;monitor=https.rrdrt.monitor%20--rrdrt%20imapsync.lamiral.info%2Fcgi-bin%2Fimapsync%20%3B%3B">
</p>
<h2>Imapsync Online Status over the last two months</h2>
<p>
<img id="status_2m" class="img-responsive center-block" alt="Imapsync Online Status over the last two months" src="https://sup.lamiral.info/dbmon/cgi-bin/rrdview.cgi?child=yes&rrdfile=%2Fvar%2Ftmp%2Fdbmon%2Ftests%2Frrdbases%2Flocalhost~2583~LAMIRAL~Imapsync_Online~LAMIRAL%2CImapsync_Online~opstatus~300~.rrd;interval_vue=p5270400;year=2021;mon=%205;mday=%209;hour=15;min=47;date_given_by=now;date_means=end;dsname=opstatus;width=1200;hight=70;lower=0;upper=100;rigid=on;Beautiful%20Image%21.x=156;Beautiful%20Image%21.y=83;title=Service%20Status;owner=Imapsync%20Online;caption=Status%20in%20%25;start=1615297666;end=1620568066;width_old=1200;hight_old=70;monitor=https.rrdrt.monitor%20--rrdrt%20imapsync.lamiral.info%2Fcgi-bin%2Fimapsync%20%3B%3B"><br>
</p>
<h2>Imapsync Online Status over the last year</h2>
<p>
<img id="status_1y" class="img-responsive center-block" alt="Imapsync Online Status" src="https://sup.lamiral.info/dbmon/cgi-bin/rrdview.cgi?child=yes&rrdfile=%2Fvar%2Ftmp%2Fdbmon%2Ftests%2Frrdbases%2Flocalhost~2583~LAMIRAL~Imapsync_Online~LAMIRAL%2CImapsync_Online~opstatus~300~.rrd;interval_vue=p31622400;year=2021;mon=%205;mday=%209;hour=15;min=50;date_given_by=now;date_means=end;dsname=opstatus;width=1200;hight=70;lower=0;upper=100;rigid=on;Beautiful%20Image%21.x=212;Beautiful%20Image%21.y=59;title=Service%20Status;owner=Imapsync%20Online;caption=Status%20in%20%25;start=1588945852;end=1620568252;width_old=1200;hight_old=70;monitor=https.rrdrt.monitor%20--rrdrt%20imapsync.lamiral.info%2Fcgi-bin%2Fimapsync%20%3B%3B"><br>
</p>
<!--
Uncomment the following when the data are available
-->
<!--
<p class="text-center">
Imapsync <b>Online Status</b> over the <b>last 10 years</b><br>
<img id="status_10y" class="img-responsive center-block" alt="Imapsync Online Status" src="https://lstu.fr/imapsync_online_status_10years_1200x70-2"><br>
</p>
-->
</body>
</html>

View file

@ -1,48 +1,51 @@
@REM $Id: imapsync_example.bat,v 1.11 2020/01/07 00:45:36 gilles Exp gilles $ @REM $Id: imapsync_example.bat,v 1.12 2022/02/12 11:00:09 gilles Exp gilles $
@REM imapsync example batch for Windows users @REM Here is an imapsync example batch for Windows users.
@REM lines beginning with @REM are just comments @REM Lines beginning with @REM are just comments.
@REM Please read them, they are written for you, human folk. @REM Please read the comments, they are written for you, human folk.
@REM Read also https://imapsync.lamiral.info/README_Windows.txt @REM Read also https://imapsync.lamiral.info/README_Windows.txt
@REM for more details on how to use imapsync on Windows. @REM for more details on how to use imapsync on Windows.
@REM Now let us enter the real work to fit your needs @REM Now let us enter the real work to fit your needs.
@REM Replace below the 6 parameters @REM Replace below the 6 parameters
@REM "test1.lamiral.info" "test1" "secret1" "test2.lamiral.info" "test2" "secret2" @REM "test1.lamiral.info" "test1" "secret1" "test2.lamiral.info" "test2" "secret2"
@REM with your own values @REM with your values.
@REM Double quotes are necessary if a value contain one or more blanks. @REM Double quotes are necessary if a value contains one or more blanks.
@REM value "test1.lamiral.info" for --host1 is the IMAP source server hostname or IP address @REM Value "test1.lamiral.info" for --host1 is the IMAP source server hostname or IP address.
@REM value "test1" for --user1 is the IMAP source user login @REM Value "test1" for --user1 is the IMAP source user login.
@REM value "secret1" for --password1 is the IMAP source user password @REM Value "secret1" for --password1 is the IMAP source user password.
@REM value "test2.lamiral.info" for --host2 is the IMAP destination server hostname or IP address @REM Value "test2.lamiral.info" for --host2 is the IMAP destination server hostname or IP address.
@REM value "test2" for --user2 is the IMAP destination user login @REM Value "test2" for --user2 is the IMAP destination user login.
@REM value "secret2" for --password2 is the IMAP destination user password @REM Value "secret2" for --password2 is the IMAP destination user password.
@REM Character ^ at the end of the first line is essential and means @REM Character ^ at the end of the first line is essential and means
@REM "this command continues on the next line". You can add other lines @REM "this command continues on the next line". You can add other lines
@REM but don't forget ^ character lasting each line, except the last one. @REM but don't forget ^ character lasting each line, except the last one.
@REM Also, there must be no other character after each lasting character ^
@REM not even a blank invisible character, or you'll end up with an
@REM error "Unknown command" with what you added.
@REM That is not all, keep on reading! @REM That is not all, keep on reading!
@REM Three other options are in this example because they are good to start with @REM Three other options are in this example because they are good to start with
@REM @REM
@REM --dry makes imapsync doing nothing, just print what would be done without --dry. @REM --dry makes imapsync doing nothing, just print what would be done without --dry.
@REM so if you leave --dry then imapsync will not sync your data. @REM So, if you keep --dry then imapsync will not sync your data.
@REM --justfolders does only folders creations, it ignores messages. @REM --justfolders does only folders creations, it ignores messages.
@REM This option is good to verify the folder mapping is good for you @REM This option is good to verify the folder mapping is good for you
@REM without starting to copy/pollute folders with messages. @REM without starting to copy/pollute folders with messages.
@REM @REM
@REM --automap guesses folders mapping, it wors for folders like @REM --automap guesses folders mapping, it works for folders like
@REM "Sent", "Junk", "Drafts", "All", "Archive", "Flagged". @REM "Sent", "Junk", "Drafts", "All", "Archive", "Flagged".
@REM @REM
@REM I suggest/impose to start with --automap --justfolders --dry. @REM I suggest/impose to start with --automap --justfolders --dry.
@REM If the folder mapping you see in the output is not good then add @REM If the folder mapping you see in the output is not good then add
@REM some options --f1f2 "folder1=folder2" @REM some options --f1f2 "folder1=folder2"
@REM in oder to fix it. @REM to fix the mapping.
@REM Once you are happy with the folder names on the destination, @REM Once you are happy with the folder names on the destination,
@REM remove --dry and have a run to create folders on host2. @REM remove --dry and have a run to create folders on host2.

7
i3
View file

@ -1,7 +0,0 @@
#!/bin/sh
# $Id: i3,v 1.20 2021/07/02 11:34:25 gilles Exp gilles $
BASE=`dirname $0`
perl -I${BASE}/W/Mail-IMAPClient-3.43/lib ${BASE}/imapsync "$@"

1493
imapsync

File diff suppressed because it is too large Load diff

View file

@ -74,7 +74,8 @@
</h1> </h1>
<h2>Afraid of losing all your precious emails?<br/> <h2>Afraid of losing all your precious emails?<br/>
It's time to copy all of them elsewhere!<br/> It's time to copy all of them elsewhere!<br/>
Safely. Safely.<br/>
And welcome to ex-Free Google Workspace people!
</h2> </h2>
<!-- I use SSI here only to pass a strict xhtml validation that facebook/twitter/coinbase can't pass --> <!-- I use SSI here only to pass a strict xhtml validation that facebook/twitter/coinbase can't pass -->
@ -880,6 +881,7 @@ you some struggling hours later</b>, believe me. So read the three columns main
<li> <a href="FAQ.d/FAQ.IceWarp.txt">IceWarp</a>. </li> <li> <a href="FAQ.d/FAQ.IceWarp.txt">IceWarp</a>. </li>
<li> <a href="FAQ.d/FAQ.DBmail.txt">DBmail</a>. </li> <li> <a href="FAQ.d/FAQ.DBmail.txt">DBmail</a>. </li>
<li> <a href="FAQ.d/FAQ.FirstClass.txt">FirstClass</a>. </li> <li> <a href="FAQ.d/FAQ.FirstClass.txt">FirstClass</a>. </li>
<li> <a href="FAQ.d/FAQ.James.txt">James</a>. </li>
<li> <a href="FAQ.d/FAQ.Various_Software_Servers.txt">Other various imap software servers</a>. </li> <li> <a href="FAQ.d/FAQ.Various_Software_Servers.txt">Other various imap software servers</a>. </li>
</ul> </ul>
@ -987,7 +989,7 @@ like written in the <a href="LICENSE">https://imapsync.lamiral.info/LICENSE</a>
<!--#config timefmt="%D" --> <!--#config timefmt="%D" -->
<!--#config timefmt="%A %B %d, %Y" --> <!--#config timefmt="%A %B %d, %Y" -->
<b>This document last modified on <!--#echo var="LAST_MODIFIED" --></b> <b>This document last modified on <!--#echo var="LAST_MODIFIED" --></b>
($Id: index.shtml,v 1.508 2021/12/20 17:49:51 gilles Exp gilles $)<br /> ($Id: index.shtml,v 1.511 2022/04/06 10:38:35 gilles Exp gilles $)<br />
<a href="#TOP">Top of the page</a> <a href="#TOP">Top of the page</a>
</p> </p>

114
tests.sh
View file

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
# $Id: tests.sh,v 1.367 2022/01/13 12:59:05 gilles Exp gilles $ # $Id: tests.sh,v 1.372 2022/04/06 10:07:32 gilles Exp gilles $
# To run these tests, you need a running imap server somewhere # To run these tests, you need a running imap server somewhere
# with several accounts. And be on Linux or Unix. # with several accounts. And be on Linux or Unix.
@ -239,14 +239,14 @@ option_tests_in_var_tmp_sub() {
( (
mkdir -p /var/tmp/imapsync_tests mkdir -p /var/tmp/imapsync_tests
cd /var/tmp/imapsync_tests cd /var/tmp/imapsync_tests
/g/public_html/imapsync/i3 --tests /g/public_html/imapsync/imapsync --tests
) )
} }
option_tests_in_var_tmp() { option_tests_in_var_tmp() {
( (
cd /var/tmp/ cd /var/tmp/
/g/public_html/imapsync/i3 --tests /g/public_html/imapsync/imapsync --tests
) )
} }
@ -420,6 +420,21 @@ ll() {
--passfile2 ../../var/pass/secret.titi --passfile2 ../../var/pass/secret.titi
} }
ll_diff_log_stdout_debugssl() {
$CMD_PERL ./imapsync \
--host1 $HOST1 --user1 tata \
--passfile1 ../../var/pass/secret.tata \
--host2 $HOST2 --user2 titi \
--passfile2 ../../var/pass/secret.titi \
--justlogin --debugssl 4 \
--logfile ll_diff_log_stdout_debugssl_1.txt 2>&1 \
| tee LOG_imapsync/ll_diff_log_stdout_debugssl_2.txt
echo
diff LOG_imapsync/ll_diff_log_stdout_debugssl_1.txt LOG_imapsync/ll_diff_log_stdout_debugssl_2.txt
}
ll_INBOX() { ll_INBOX() {
$CMD_PERL ./imapsync \ $CMD_PERL ./imapsync \
--host1 $HOST1 --user1 tata \ --host1 $HOST1 --user1 tata \
@ -552,6 +567,17 @@ ll_search_larger() {
--search 'LARGER 1000' --folder INBOX --search 'LARGER 1000' --folder INBOX
} }
ll_search_keyword() {
$CMD_PERL ./imapsync \
--host1 $HOST1 --user1 tata \
--passfile1 ../../var/pass/secret.tata \
--host2 $HOST2 --user2 titi \
--passfile2 ../../var/pass/secret.titi \
--search 'KEYWORD NonJunk' --folder INBOX.flagsetSeen --debugflags --debugimap1
}
ll_maxsize() { ll_maxsize() {
$CMD_PERL ./imapsync \ $CMD_PERL ./imapsync \
@ -1087,6 +1113,19 @@ pidfile_bad() {
test "$?" = "$EXIT_PID_FILE_ERROR" test "$?" = "$EXIT_PID_FILE_ERROR"
} }
ll_skipcrossduplicates_usecache() {
$CMD_PERL ./imapsync \
--host1 $HOST1 --user1 tata \
--passfile1 ../../var/pass/secret.tata \
--host2 $HOST2 --user2 titi \
--passfile2 ../../var/pass/secret.titi \
--skipcrossduplicates --usecache
test "$?" = "$EX_USAGE"
}
test_tail() { test_tail() {
$CMD_PERL ./imapsync \ $CMD_PERL ./imapsync \
--justbanner --simulong 15 \ --justbanner --simulong 15 \
@ -3145,7 +3184,7 @@ ll_f1f2_01()
--passfile2 ../../var/pass/secret.titi \ --passfile2 ../../var/pass/secret.titi \
--justfolders \ --justfolders \
--folder 'INBOX.yop.yap' --f1f2 'INBOX.yop.yap=INBOX/rha/lovely' --f1f2 'lalala=lululu' --debugfolders --folder 'INBOX.yop.yap' --f1f2 'INBOX.yop.yap=INBOX/rha/lovely' --f1f2 'lalala=lululu' --debugfolders
test "$EXIT_ERR_CREATE" = "$?"
} }
ll_regextrans2() ll_regextrans2()
@ -4855,6 +4894,8 @@ ll_duplicates_across_folders() {
--skipcrossduplicates --debugcrossduplicates --skipcrossduplicates --debugcrossduplicates
} }
ll_delete2_dev() { ll_delete2_dev() {
can_send && sendtestmessage titi can_send && sendtestmessage titi
can_send && sendtestmessage can_send && sendtestmessage
@ -4995,6 +5036,26 @@ ll_syncduplicates() {
--folder INBOX.duplicates --debug --syncduplicates # --dry --folder INBOX.duplicates --debug --syncduplicates # --dry
} }
ll_syncduplicates_delete2() {
$CMD_PERL ./imapsync \
--host1 $HOST1 --user1 tata \
--passfile1 ../../var/pass/secret.tata \
--host2 $HOST1 --user2 titi \
--passfile2 ../../var/pass/secret.titi \
--folder INBOX.duplicates --syncduplicates --delete2 # --dry
}
ll_syncduplicates_delete2_delete2duplicates() {
$CMD_PERL ./imapsync \
--host1 $HOST1 --user1 tata \
--passfile1 ../../var/pass/secret.tata \
--host2 $HOST1 --user2 titi \
--passfile2 ../../var/pass/secret.titi \
--folder INBOX.duplicates --syncduplicates --delete2 --delete2duplicates # --dry
}
ll_syncduplicates_noskipsize() { ll_syncduplicates_noskipsize() {
$CMD_PERL ./imapsync \ $CMD_PERL ./imapsync \
--host1 $HOST1 --user1 tata \ --host1 $HOST1 --user1 tata \
@ -5858,6 +5919,19 @@ gmail_gmail_9_search_X_GM_LABELS() {
--search 'X-GM-LABELS "Important"' --search 'X-GM-LABELS "Important"'
} }
gmail_gmail_10_search_drafts() {
! ping -c1 imap.gmail.com || $CMD_PERL ./imapsync \
--gmail1 \
--user1 gilles.lamiral@gmail.com \
--passfile1 ../../var/pass/secret.gilles_gmail \
--gmail2 \
--user2 imapsync.gl@gmail.com \
--passfile2 ../../var/pass/secret.imapsync.gl_gmail \
--nofoldersizes \
--folderfirst '[Gmail]/Drafts' --debuglabels --dry \
--folder Test --folder '[Gmail]/Drafts'
}
@ -5911,7 +5985,7 @@ gmail_gl1_gl2_labels()
--user2 imapsync.gl2@gmail.com \ --user2 imapsync.gl2@gmail.com \
--passfile2 ../../var/pass/secret.imapsync.gl2_gmail \ --passfile2 ../../var/pass/secret.imapsync.gl2_gmail \
--exclude "\[Gmail\]" \ --exclude "\[Gmail\]" \
--synclabels --resynclabels --debuglabels --dry --synclabels --resynclabels --debug --debuglabels # --dry
} }
gmail_gl1_gl2_labels_subfolder2() gmail_gl1_gl2_labels_subfolder2()
@ -6921,7 +6995,7 @@ huge_folder()
--host2 $HOST2 --user2 tete@est.belle \ --host2 $HOST2 --user2 tete@est.belle \
--passfile2 ../../var/pass/secret.tete \ --passfile2 ../../var/pass/secret.tete \
--include INBOX.Junk.2010 \ --include INBOX.Junk.2010 \
--nousecache --tmpdir /var/tmp --debugmemory || \ --tmpdir /var/tmp --debugmemory || \
true true
} }
date2=`date` date2=`date`
@ -7263,31 +7337,38 @@ dprof2_bigmail()
curl_online_args() curl_online_args()
{ {
curl -v -d 'host1=test1.lamiral.info;user1=test1;password1=secret1;host2=test2.lamiral.info;user2=test2;password2=secret2;simulong=2' \ curl -v --data 'host1=test1.lamiral.info;user1=test1;password1=secret1;host2=test2.lamiral.info;user2=test2;password2=secret2;simulong=2' \
https://imapsync.lamiral.info/cgi-bin/imapsync https://imapsync.lamiral.info/cgi-bin/imapsync
} }
curl_online_testslive()
{
curl -v --data 'testslive=1;simulong=2' https://imapsync.lamiral.info/cgi-bin/imapsync
}
curl_online_args_pidfile() curl_online_args_pidfile()
{ {
curl -v -d "host1=test1.lamiral.info;user1=test1;password1=secret1;host2=test2.lamiral.info;user2=test2;password2=secret2;pidfile=/tmp/curl_online_args_pidfile_$$.txt" \ curl -v --data"host1=test1.lamiral.info;user1=test1;password1=secret1;host2=test2.lamiral.info;user2=test2;password2=secret2;pidfile=/tmp/curl_online_args_pidfile_$$.txt" \
https://imapsync.lamiral.info/cgi-bin/imapsync https://imapsync.lamiral.info/cgi-bin/imapsync
} }
curl_online_args_nolog() curl_online_args_nolog()
{ {
curl -v -d 'host1=test1.lamiral.info;user1=test1;password1=secret1;host2=test2.lamiral.info;user2=test2;password2=secret2;justbanner=1;log=' \ curl -v --data 'host1=test1.lamiral.info;user1=test1;password1=secret1;host2=test2.lamiral.info;user2=test2;password2=secret2;justbanner=1;log=' \
https://lamiral.info/cgi-bin/imapsync https://lamiral.info/cgi-bin/imapsync
} }
curl_online_args_nolog_2() curl_online_args_nolog_2()
{ {
curl -v -d 'host1=test1.lamiral.info;user1=test1;password1=secret1;host2=test2.lamiral.info;user2=test2;password2=secret2;justbanner=1;log=0' \ curl -v --data 'host1=test1.lamiral.info;user1=test1;password1=secret1;host2=test2.lamiral.info;user2=test2;password2=secret2;justbanner=1;log=0' \
https://lamiral.info/cgi-bin/imapsync https://lamiral.info/cgi-bin/imapsync
} }
curl_online_justbanner() curl_online_justbanner()
{ {
curl -v -d 'host1=test1.lamiral.info;user1=test1;password1=secret1;host2=test2.lamiral.info;user2=test2;password2=secret2;simulong=0.7;justbanner=1' \ curl -v --data 'host1=test1.lamiral.info;user1=test1;password1=secret1;host2=test2.lamiral.info;user2=test2;password2=secret2;simulong=0.7;justbanner=1' \
https://lamiral.info/cgi-bin/imapsync https://lamiral.info/cgi-bin/imapsync
} }
@ -7305,14 +7386,14 @@ simulong=2;
dry=1; dry=1;
EOF EOF
curl -v -d '@W/tmp/cred.txt' \ curl -v --data '@W/tmp/cred.txt' \
https://imapsync.lamiral.info/cgi-bin/imapsync https://imapsync.lamiral.info/cgi-bin/imapsync
} }
curl_online_args_json() curl_online_args_json()
{ {
# DO NOT WORK AT ALL # DO NOT WORK AT ALL
! curl -v -d '{ "testslive":"1" }' -H "Content-Type: application/json" \ ! curl -v --data '{ "testslive":"1" }' -H "Content-Type: application/json" \
https://imapsync.lamiral.info/cgi-bin/imapsync https://imapsync.lamiral.info/cgi-bin/imapsync
} }
@ -7357,7 +7438,7 @@ curl_online_external()
https://web-tools.na.icb.cnr.it/cgi-bin/imapsync \ https://web-tools.na.icb.cnr.it/cgi-bin/imapsync \
https://140.164.23.4/cgi-bin/imapsync \ https://140.164.23.4/cgi-bin/imapsync \
; do ; do
curl -k -s -d 'justconnect=1;host1=mail.unionstrategiesinc.com;user1=a;user2=a;host2=mail5.unionstrategiesinc.com;simulong=2' \ curl -k -s --data 'justconnect=1;host1=mail.unionstrategiesinc.com;user1=a;user2=a;host2=mail5.unionstrategiesinc.com;simulong=2' \
$imapsync $imapsync
#sleep 2 #sleep 2
done done
@ -7416,6 +7497,7 @@ ll_unknow_option
ll_ask_password ll_ask_password
ll_env_password ll_env_password
ll_bug_folder_name_with_blank ll_bug_folder_name_with_blank
ll_skipcrossduplicates_usecache
ll_timeout ll_timeout
ll_timeout1_timeout2 ll_timeout1_timeout2
ll_timeout_very_small ll_timeout_very_small
@ -7436,6 +7518,7 @@ ll_buffersize
ll_justfolders ll_justfolders
ll_justfolders_delete1emptyfolders ll_justfolders_delete1emptyfolders
ll_justfolders_skipemptyfolders ll_justfolders_skipemptyfolders
ll_f1f2_01
ll_prefix12 ll_prefix12
ll_nosyncinternaldates ll_nosyncinternaldates
ll_idatefromheader ll_idatefromheader
@ -7558,6 +7641,7 @@ ll_abort_byfile_hand_made
ll_abort_byfile_imapsync_made ll_abort_byfile_imapsync_made
ll_abort_byfile_normal_run ll_abort_byfile_normal_run
ll_sigreconnect_INT ll_sigreconnect_INT
ll_diff_log_stdout_debugssl
curl_online_args curl_online_args
curl_online_file curl_online_file
ksks_reset_test1 ksks_reset_test1
@ -7590,7 +7674,7 @@ set_return_code_variables
if test $# -eq 0; then if test $# -eq 0; then
# mandatory tests # mandatory tests
if run_tests $mandatory_tests; then if run_tests $mandatory_tests; then
./i3 --version >> .test_3xx ./imapsync --version >> .tests_passed
return 0 return 0
fi fi
else else