diff --git a/ChangeLog b/ChangeLog
index e86a4b6..666a024 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,17 +1,225 @@
RCS file: RCS/imapsync,v
Working file: imapsync
-head: 1.684
+head: 1.727
branch:
locks: strict
- gilles: 1.684
+ gilles: 1.727
access list:
symbolic names:
keyword substitution: kv
-total revisions: 684; selected revisions: 684
+total revisions: 727; selected revisions: 727
description:
----------------------------
-revision 1.684 locked by: gilles;
+revision 1.727 locked by: gilles;
+date: 2016/08/19 10:30:36; author: gilles; state: Exp; lines: +53 -110
+Bugfix. Fall back separator to / even when host has no mailbox at all.
+Usability. Better warning about default ssl SSL_VERIFY_NONE
+----------------------------
+revision 1.726
+date: 2016/08/16 21:32:35; author: gilles; state: Exp; lines: +19 -19
+Changed "Checking --regexflag --skipmess --regexmess --maxlinelengthcmd --pipemess commands" with a space string instead of an empty one. Because pipemess() now fails when output is empty.
+----------------------------
+revision 1.725
+date: 2016/08/16 00:01:48; author: gilles; state: Exp; lines: +122 -83
+Some perl critics.
+----------------------------
+revision 1.724
+date: 2016/08/13 11:04:06; author: gilles; state: Exp; lines: +362 -150
+Refactor. No more global $pidfile, $pidfilelocking, $nb_errors, $errorsdump, @errors_log.
+Refactor. Changed exit_clean. From exit_clean( 0 ) to exit_clean( $sync, $EX_OK ) ;
+Refactor. Changed errors_incr. From errors_incr( $error ) to errors_incr( $sync, $error ).
+Refactor. From stats( ) to stats( $sync ).
+Added constants:
+ * $EXIT_WITH_ERRORS_MAX
+ * $EXIT_BY_SIGNAL
+ * $EXIT_WITH_ERRORS
+ * $EXIT_PID_FILE_ALREADY_EXIST
+ * $INTERVAL_TO_EXIT
+----------------------------
+revision 1.723
+date: 2016/07/29 21:57:03; author: gilles; state: Exp; lines: +12 -11
+Force Unconnected state with Ctrl-c.
+----------------------------
+revision 1.722
+date: 2016/07/29 21:14:11; author: gilles; state: Exp; lines: +20 -12
+Added sub debugsleep()
+Changed --debugsleep to take a float parameter. --debugsleep 4.5 add a sleep of 4.5 seconds every folder and before every copied message.
+----------------------------
+revision 1.721
+date: 2016/07/29 17:25:00; author: gilles; state: Exp; lines: +57 -29
+Do reconnections when hit by a signal Ctrl-c, aka INT signal.
+2 consecutive Ctrl-c within 1 second then exit the program.
+----------------------------
+revision 1.720
+date: 2016/07/29 15:01:38; author: gilles; state: Exp; lines: +324 -225
+Some Perl critics "not one of the allowed literal values". Now still 188 violations of ValuesAndExpressions::ProhibitMagicNumbers.
+----------------------------
+revision 1.719
+date: 2016/07/25 19:27:47; author: gilles; state: Exp; lines: +229 -152
+Change some print to myprint.
+Fixed some perlcritic level 4 & 5
+sub pipemess now abort on empty message generated.
+sub pipemess prints stderr
+----------------------------
+revision 1.718
+date: 2016/07/20 10:45:51; author: gilles; state: Exp; lines: +21 -13
+Added --inet4 to force AF_INET connextion in ssl mode.
+Added --inet6 too to force AF_INET6 in ssl mode. Might be useless.
+----------------------------
+revision 1.717
+date: 2016/07/13 14:05:20; author: gilles; state: Exp; lines: +130 -57
+Started tests_message_for_host2()
+Added cyrillic for hard part --automap
+--pipemess test with pipe (cat|cat)
+--pipemess tests with arrors
+----------------------------
+revision 1.716
+date: 2016/07/12 09:02:25; author: gilles; state: Exp; lines: +209 -81
+Added full mocked tests to sub tests_delete1emptyfolders(). Test::MockObject is really helpful!
+Changed pipemess() to return both message and stderr output, in list context. Scalar context stays the same, for now.
+Added list context tests to tests_pipemess()
+----------------------------
+revision 1.715
+date: 2016/07/05 21:17:48; author: gilles; state: Exp; lines: +10 -10
+Removed from errors list "ignoring folder because it is not in host1 whole folders list". Too hard too.
+----------------------------
+revision 1.714
+date: 2016/07/05 21:12:23; author: gilles; state: Exp; lines: +10 -10
+Remove "not selectable" folders from the errors list. Too hard.
+----------------------------
+revision 1.713
+date: 2016/07/05 12:50:35; author: gilles; state: Exp; lines: +21 -18
+Added "ignoring folder" in the errors list.
+----------------------------
+revision 1.712
+date: 2016/06/30 01:35:02; author: gilles; state: Exp; lines: +202 -21
+Added option --delete1emptyfolders ; 8 hours to write it.
+Added module dependency Test::MockObject for some tests. Only require for now.
+----------------------------
+revision 1.711
+date: 2016/06/22 20:23:33; author: gilles; state: Exp; lines: +10 -10
+Removed a useless debug output
+----------------------------
+revision 1.710
+date: 2016/06/22 14:47:23; author: gilles; state: Exp; lines: +28 -27
+Perlcritic fixes. ValuesAndExpressions::ProhibitMagicNumbers some 3 and is_a_release_number tests.
+----------------------------
+revision 1.709
+date: 2016/06/22 11:32:40; author: gilles; state: Exp; lines: +58 -37
+Perlcritic fixes. ValuesAndExpressions::ProhibitMagicNumbers -1 => $LAST or $MINUS_ONE.
+----------------------------
+revision 1.708
+date: 2016/06/22 10:32:45; author: gilles; state: Exp; lines: +193 -192
+Perlcritic fixes. ProhibitParensWithBuiltins, Last ones.
+----------------------------
+revision 1.707
+date: 2016/06/18 00:37:24; author: gilles; state: Exp; lines: +64 -81
+Perlcritic fixes. ProhibitParensWithBuiltins, exists() => exists. But not all. Need to examine precedence with not or and etc.
+Uncommented call to $test_builder->reset( ) Don't know why it was commented but it was bad for knowing tests go wrong.
+----------------------------
+revision 1.706
+date: 2016/06/17 13:34:09; author: gilles; state: Exp; lines: +13 -13
+Sugar. "return (" => "return("
+----------------------------
+revision 1.705
+date: 2016/06/17 13:28:23; author: gilles; state: Exp; lines: +422 -422
+Replaced all print( calls by myprint( calls.
+It prepares better output handling, I hope.
+----------------------------
+revision 1.704
+date: 2016/06/17 13:25:16; author: gilles; state: Exp; lines: +36 -36
+Replaced smyprintf by mysprintf
+----------------------------
+revision 1.703
+date: 2016/06/17 13:12:09; author: gilles; state: Exp; lines: +700 -697
+Perlcritic fixes. Rmoved parentheses, ProhibitParensWithBuiltins, for defined|scalar|push|keys|unshift|uc
+but added parentheses to print.
+Replaced printf by myprintf
+Replaced sprinf by smyprintf.
+----------------------------
+revision 1.702
+date: 2016/06/15 22:43:35; author: gilles; state: Exp; lines: +495 -495
+Fixed perl critic 458 violations of ValuesAndExpressions::ProhibitInterpolationOfLiterals. "Useless interpolation of literal string". 2 left but critic bugs on them. "\1foo" is not '\1foo' but critic suggests equality.
+----------------------------
+revision 1.701
+date: 2016/06/12 23:39:04; author: gilles; state: Exp; lines: +812 -812
+Fixed perlcritic "Don't use whitespace at the end of lines". Was 627 violations of CodeLayout::ProhibitTrailingWhitespace. Now 0. For now...
+----------------------------
+revision 1.700
+date: 2016/06/12 20:55:25; author: gilles; state: Exp; lines: +33 -33
+Fixed perlcritic latest ouble-sigil dereference $$foo => ${ $ffo } and $#$foo => $#{ $foo }
+----------------------------
+revision 1.699
+date: 2016/06/12 19:51:52; author: gilles; state: Exp; lines: +29 -29
+Fixed perlcritic Double-sigil dereference @$foo => @{ $foo }
+----------------------------
+revision 1.698
+date: 2016/06/12 19:39:15; author: gilles; state: Exp; lines: +33 -36
+Fixed perlcritic %$foo => %{ $ff }
+Double-sigil dereference
+----------------------------
+revision 1.697
+date: 2016/06/12 18:42:18; author: gilles; state: Exp; lines: +53 -24
+Perl critic fixes. 10 x "Unnamed numeric literals make code less maintainable.". use Readonly to fix them.
+----------------------------
+revision 1.696
+date: 2016/06/09 23:42:34; author: gilles; state: Exp; lines: +201 -201
+Fixed perlcritic 'Quotes used with a string containing no non-whitespace characters'.
+"" or '' => q{}
+" " or ' ' => q{ }
+----------------------------
+revision 1.695
+date: 2016/06/09 18:17:14; author: gilles; state: Exp; lines: +15 -10
+Check connected state in sub create_folder().
+----------------------------
+revision 1.694
+date: 2016/06/08 21:01:15; author: gilles; state: Exp; lines: +43 -17
+Added patch: [imapsync/imapsync] Update XOAUTH2 support to work with Google's newer .json files (#68).
+----------------------------
+revision 1.693
+date: 2016/06/07 21:13:03; author: gilles; state: Exp; lines: +38 -28
+CGI loaded when needed only.
+In CGI mode, Remove all content in unsafe evalued options.
+In CGI mode, help solving permission issues.
+----------------------------
+revision 1.692
+date: 2016/05/25 16:34:15; author: gilles; state: Exp; lines: +11 -11
+Small typo
+----------------------------
+revision 1.691
+date: 2016/05/24 20:56:34; author: gilles; state: Exp; lines: +25 -18
+Fixed -1 false output for big account %d => %s in printf.
+Wrote and use getpwuid_any_os. getpwuid breaks on Windows.
+----------------------------
+revision 1.690
+date: 2016/05/14 21:21:56; author: gilles; state: Exp; lines: +33 -23
+*** empty log message ***
+----------------------------
+revision 1.689
+date: 2016/05/09 17:58:11; author: gilles; state: Exp; lines: +155 -20
+Started to be CGI compatible.
+Started package Imapsync::Getopt::Long.
+----------------------------
+revision 1.688
+date: 2016/03/27 22:56:47; author: gilles; state: Exp; lines: +11 -11
+Check return code of message_to_file in sub message_for_host2.
+----------------------------
+revision 1.687
+date: 2016/03/24 20:39:33; author: gilles; state: Exp; lines: +10 -10
+Replaced message_string() call by message_to_file() and won 1x again.
+Now imapsync crunches only 2x biggest message size in memory.
+----------------------------
+revision 1.686
+date: 2016/03/24 20:21:57; author: gilles; state: Exp; lines: +27 -27
+Changed append_message_on_host2() to pass message string by reference.
+Memory usage passed from 5x to 3x. 3x remains from underlying Mail::IMAPClient module in Mail::IMAPClient::message_string()
+----------------------------
+revision 1.685
+date: 2016/03/24 17:02:13; author: gilles; state: Exp; lines: +65 -35
+Added memory debug in order to decrease the 5x message size in memory.
+----------------------------
+revision 1.684
date: 2016/03/17 08:35:03; author: gilles; state: Exp; lines: +24 -16
Bugfix. No more warning about "Use of uninitialized value $sockargs[7] in join or string at"
in ssl or tls mode. Was due to "'SSL_version' => undef".
diff --git a/FAQ b/FAQ
index 673e7b5..e2bd740 100644
--- a/FAQ
+++ b/FAQ
@@ -1,5 +1,5 @@
#!/bin/cat
-# $Id: FAQ,v 1.221 2016/03/07 02:55:01 gilles Exp gilles $
+# $Id: FAQ,v 1.224 2016/06/08 21:32:09 gilles Exp gilles $
+-------------------+
| FAQs for imapsync |
@@ -121,36 +121,6 @@ post to this list if you want to stay private.
Thank you for your participation.
-=======================================================================
-Q. Can I copy or sync Calendar or Contacts with imapsync?
-
-R. No. It's because most IMAP servers don't get contacts and calendar
-events via IMAP. In other words, messages synced by imapsync from
-Calendar or Contacts folders are not used by email servers to set
-or get the contacts or calendars.
-No way via IMAP, no way via imapsync.
-See next question.
-
-=======================================================================
-Q. How can I copy or synchronize Calendars or Contacts?
-
-R1. It can't be done with imapsync.
-
-R2. It can be done, depending on the email server softwares used.
-
-a) From Exchange to Exchange, export contacts and calendar to
- PST format files on host1 and import them on host2.
-
-b) From Gmail to Gmail, export and import calendars in ical format,
- extension for those files is .ics.
- Contacts can be copied using a csv file. See the help page
- http://support.google.com/mail/bin/topic.py?hl=en&topic=1669027
-
-c) Etc. Search the web. There's also specific tools and paid services.
- There's no silver bullet to migrate Calendars and Contacts,
- if you find one, tell me!
-
-
=======================================================================
Q. Where I can find old imapsync releases?
@@ -320,11 +290,11 @@ http://msdn.microsoft.com/en-us/library/windows/desktop/aa365247.aspx#maxpath
The workaround solution given at the previous link,
ie using \\?\D:", does not work for imapsync.
So this imapsync Windows bug is still pending and needs a fix using
-a different technic to cache, like a database file for example.
+a different technique to cache, like a database file for example.
A solution to fix the issue is to use a Linux virtual host on a
Windows box, with VirtualBox or VmWare etc. There is no bug this way,
-pathnames can be several thousands charaters long.
+pathnames can be several thousands characters long.
Better said that done but not so difficult nor expensive these days,
VirtualBox is free and VmWare Player is free for personal or test use.
@@ -400,14 +370,6 @@ Q. How can I use imapsync with Mail::IMAPClient 2.2.9 perl module?
R. Mail::IMAPClient 2.2.9 is no longer supported.
-=======================================================================
-Q. I get "Out of memory" errors. How to fix that?
-
-R. Usually "Out of memory" errors are related to old days,
-to old Mail::IMAPClient module releases, before 3.26.
-Look at imapsync output first lines to get the Mail::IMAPClient release used.
-Then upgrade Mail::IMAPClient Perl module if needed.
-
=======================================================================
Q. Can I use imapsync to migrate emails from pop3 server to imap server?
@@ -526,35 +488,6 @@ R. Use a backslash to escape the characters:
It works for the star * character,
I don't know if it works for the " character.
-=======================================================================
-Q. On Windows, some passwords contain $ characters. Login fails.
-R1. Enclose passwords between ""
-
- imapsync ... --password1 "zzz$zz$$z"
-
-R2. Prefix each $ character with a ^ since ^ is the escape character
- on Windows
-
- imapsync ... --password1 zzz^$zz^$^$z
-
-For a password that is exactly the 8 characters string $%&<>|^"
-you have to enter
-
- imapsync ... --password1 "$%%&<>|^"^"
-
-=======================================================================
-Q. On Windows, some passwords begin with an equal = character.
- Login fails. What can I do?
-
-R. Use twice equals == characters instead; For example, if =secret
- is the password then use:
-
- imapsync ... --password1 ==secret
-
-or even
-
- imapsync ... --password1 "==secret"
-
=======================================================================
Q. With huge account (many messages) when it comes to reading the
destination server it comes out this error:
@@ -587,16 +520,6 @@ R. Use the following syntax:
imapsync ... --user1="loginuser*admin_user" --password1 "admin_user_password"
-======================================================================
-Q. How to migrate to Dovecot with an admin/MasterUser account?
-
-R. Dovecot uses the same syntax as uw-imap
-
- imapsync ... --user2="loginuser*admin_user" --password2 "admin_user_password"
-
-To setup a Dovecot MasterUser see
-http://wiki2.dovecot.org/Authentication/MasterUsers
-
======================================================================
Q. How to migrate from cyrus with an admin account?
diff --git a/FAQ.d/.htaccess b/FAQ.d/.htaccess
deleted file mode 100644
index e78b875..0000000
--- a/FAQ.d/.htaccess
+++ /dev/null
@@ -1,20 +0,0 @@
-
-# $Id: .htaccess,v 1.1 2016/01/18 18:13:48 gilles Exp gilles $
-
-AddDescription "Domino." FAQ.Domino.txt
-AddDescription "Dovecot." FAQ.Dovecot.txt
-AddDescription "Duplicated messages issues." FAQ.Duplicates.txt
-AddDescription "Exchange 20xx and Office365." FAQ.Exchange.txt
-AddDescription "Changing folders names." FAQ.Folders_Mapping.txt
-AddDescription "Flags." FAQ.Flags.txt
-AddDescription "Gmail accounts." FAQ.Gmail.txt
-AddDescription "ISP." FAQ.ISP.txt
-AddDescription "Massive/bulk migrations." FAQ.Massive.txt
-AddDescription "Selecting messages." FAQ.Messages_selection.txt
-AddDescription "Oracle-UCS." FAQ.Oracle-UCS.txt
-AddDescription "Security." FAQ.Security.txt
-AddDescription "SmarterMail." FAQ.SmarterMail.txt
-AddDescription "Various imap server softwares." FAQ.Various_Server_Softwares.txt
-AddDescription "XOAUTH2 (Gmail)." FAQ.XOAUTH2.txt
-
-
diff --git a/FAQ.d/.htaccess b/FAQ.d/.htaccess
new file mode 120000
index 0000000..2fe3151
--- /dev/null
+++ b/FAQ.d/.htaccess
@@ -0,0 +1 @@
+htaccess.txt
\ No newline at end of file
diff --git a/FAQ.d/FAQ.Archiving.txt b/FAQ.d/FAQ.Archiving.txt
new file mode 100644
index 0000000..11dc6a6
--- /dev/null
+++ b/FAQ.d/FAQ.Archiving.txt
@@ -0,0 +1,23 @@
+#!/bin/cat
+$Id: FAQ.Archiving.txt,v 1.2 2016/05/09 13:03:14 gilles Exp gilles $
+
+This documentation is also at http://imapsync.lamiral.info/#doc
+
+============================================
+ Imapsync tips about archiving messages.
+============================================
+
+=======================================================================
+Q. How to move emails from one IMAP folder to another either on the
+ same IMAP server or a different one?
+ For example, all messages older than 1 year, move from INBOX to Archive.
+
+R1. Solution:
+
+ imapsync ... --minage 365 --folder Inbox --f1f2 INBOX=Archive --delete --noexpungeaftereach
+
+Add option --noexpungeaftereach if speed is a concern.
+Add option --delete if you want to move messages, instead of just copy/sync them.
+
+R2. See also file FAQ.Folders_Mapping.txt
+
diff --git a/FAQ.d/FAQ.Connection.txt b/FAQ.d/FAQ.Connection.txt
deleted file mode 100644
index db4c43e..0000000
--- a/FAQ.d/FAQ.Connection.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/cat
-$Id: FAQ.Connection.txt,v 1.2 2016/03/16 13:33:51 gilles Exp gilles $
-
-This documentation is also at http://imapsync.lamiral.info/#doc
-
-============================================
- Imapsync tips about connection issues.
-============================================
-
-
-=======================================================================
-Q.How to test a ssl imap connection without imapsync?
-
-R1.Use openssl command like the following,
- an example with imap.gmail.com server:
-
- openssl s_client -connect imap.gmail.com:993
-
-The previous command is an interactive connection, hit ctrl-c
-to finish it. If you want to finish it gently, then use:
-
- { sleep 1; echo "a LOGOUT"; } | openssl s_client -connect imap.gmail.com:993
-
-=======================================================================
-
diff --git a/FAQ.d/FAQ.Contacts_Calendars.txt b/FAQ.d/FAQ.Contacts_Calendars.txt
new file mode 100644
index 0000000..23c2391
--- /dev/null
+++ b/FAQ.d/FAQ.Contacts_Calendars.txt
@@ -0,0 +1,49 @@
+#!/bin/cat
+$Id: FAQ.Contacts_Calendars.txt,v 1.3 2016/05/09 13:37:21 gilles Exp gilles $
+
+This documentation is also at http://imapsync.lamiral.info/#doc
+
+=========================================================
+ Imapsync issues about syncing Contacts & Calendars.
+=========================================================
+
+
+=======================================================================
+Q. Can I copy or sync Calendar or Contacts with imapsync?
+
+R. No, Imapsync can't migrate Contacts and Calendars.
+ It's because most IMAP servers don't get contacts and calendars
+ events via IMAP. In other words, messages synced by imapsync from
+ Calendars or Contacts folders are not used by email servers to set
+ or get the contacts or calendars.
+ No way via IMAP, no way via imapsync.
+ But see next question.
+
+=======================================================================
+Q. How can I copy or synchronize Calendars or Contacts?
+
+R1. It can't be done with imapsync. See previous question for explanations.
+
+R2. It can be done, depending on the email server softwares used.
+
+a) From Exchange to Exchange, export contacts and calendar to
+ PST format files on host1 and import them on host2.
+
+b) From Gmail to Gmail, export and import calendars in ical format,
+ extension for those files is .ics.
+ Contacts can be copied using a csv file. See the help page
+ http://support.google.com/mail/bin/topic.py?hl=en&topic=1669027
+
+c) Etc. Search the web. There's also specific tools and paid services.
+ There's no silver bullet to migrate Calendars and Contacts,
+ if you find one, tell me!
+ Also consider asking experts at Sumatra company
+ https://twitter.com/sumatra_dev
+ http://sumatra.com/
+
+d) I plan to make tools for that but so far nothing has began
+ more than this discussion:
+http://www.linux-france.org/prj/imapsync_list/msg01797.html
+http://www.linux-france.org/prj/imapsync_list/msg01811.html
+
+=======================================================================
diff --git a/FAQ.d/FAQ.Dates.txt b/FAQ.d/FAQ.Dates.txt
index a159dde..8efcb7f 100644
--- a/FAQ.d/FAQ.Dates.txt
+++ b/FAQ.d/FAQ.Dates.txt
@@ -1,5 +1,5 @@
#!/bin/cat
-$Id: FAQ.Dates.txt,v 1.2 2016/03/07 02:08:12 gilles Exp gilles $
+$Id: FAQ.Dates.txt,v 1.3 2016/07/27 13:14:30 gilles Exp gilles $
This documentation is also at http://imapsync.lamiral.info/#doc
@@ -25,21 +25,26 @@ but not with:
A thing to keep in mind, imapsync does not touch any byte of messages
unless told to do so by option --regexmess or --pipemess
-Messages on both parts should be identical.
+Messages on both parts should be exactly identical.
Now I explain the whole picture about dates of messages.
There are several different dates for any message.
-First, there is the "Date:" header. Most of the time, this date is set
-by the MUA (MUA means Mail User Agent) it can be Outlook, Thunderbird,
-a webmail or Mutt. The Date header is usually the date the message was written
+First, there is the "Date:" header, which belongs to the message itself.
+You can see this "Date:" header line by asking View->Message Source
+in most email client software (Ctrl-u in Thunderbird).
+Most of the time, this date is set by the MUA, MUA stands for "Mail User Agent".
+MUA can be Outlook, Thunderbird, a webmail or Mutt etc.
+The Date header is usually the date the message was written
or sent the first time, at the writer side.
-This Date: header line is never changed by any transfer or copy.
+This "Date:" header line is never changed by any transfer or copy.
If an email reader uses the "Date:" header for displaying the date of a
message then no problem should arise.
Another date is the internal date. In IMAP, the internal date is handled
-by the server and normally it corresponds to the arrival date in the mailbox.
+by the server and normally it corresponds to the arrival date in the mailbox.
+This date is not part of the email message itself, it's a metadata kept
+by the imap server.
The IMAP protocol allows the internal date to be set by a email client
when a message is delivered by the imap APPEND command.
Imapsync synchronizes internal dates by default, internal dates on host2
diff --git a/FAQ.d/FAQ.Duplicates.txt b/FAQ.d/FAQ.Duplicates.txt
index 3c008c7..da15e30 100644
--- a/FAQ.d/FAQ.Duplicates.txt
+++ b/FAQ.d/FAQ.Duplicates.txt
@@ -1,5 +1,5 @@
#!/bin/cat
-$Id: FAQ.Duplicates.txt,v 1.9 2016/03/08 21:17:21 gilles Exp gilles $
+$Id: FAQ.Duplicates.txt,v 1.10 2016/04/17 19:06:39 gilles Exp gilles $
This documentation is also at http://imapsync.lamiral.info/#doc
@@ -20,21 +20,50 @@ R0.
Normally and by default, imapsync doesn't generate duplicates.
So if it does generate duplicates it means a problem occurs
with message identification. It happens sometimes with IMAP
-servers changing the "Message-Id" line or "Received:" in
-the header part of messages.
+servers changing the "Message-Id" header line or one or more
+of the "Received:" header lines in the header part of messages.
+Imapsync uses "Message-Id" header line and "Received:" header
+lines to identify messages on both sides.
R1.
-You can use option --useuid, with it, imapsync won't use
-header lines to compare messages in folders.
-Keep in mind it uses a local cache.
+A first solution is to use option --useuid.
+With option --useuid, imapsync doesn't use header lines
+to identify and compare messages in folders.
+Instead of some headers, --useuid tell imapsync to use
+the imap UIDs given by imap servers on bith sides.
+To avoid duplicates on next runs, imapsync uses a local cache
+where it keeps UIDs already transfered.
imapsync ... --useuid
+There is an issue when --useuid is not used the first time.
A big issue with --useuid is that it doesn't generate duplicates if
used from the first time but it does generate duplicates after a previous
-run without --useuid (because it uses a different method to identify
-the messages). A solution? it depends. --delete2 solves this problem
-if you are permitted to use it.
+run without --useuid (because then uses a different method to identify
+the messages).
+
+A solution? Two solutions.
+
+The easiest is --delete2
+if you are permitted to use it. Option --delete2 removes messages on host2
+that are not on host1 so with --delete2 you go for resyncing all
+messages again but all previously transferred messages are deleted,
+and also messages previously there without imapsync.
+So --useuid --delete2 is easy to remove duplicates but not for
+all context.
+
+A second solution, better if R2 works (see R2 below), is to build
+the cache before using --useuid
+
+First sync:
+
+ imapsync ... --useheader "Message-Id" --addheader --usecache
+
+Next syncs:
+
+ imapsync ... --useuid
+ imapsync ... --useuid
+ ...
R2.
Best way if you can follow it.
diff --git a/FAQ.d/FAQ.Emptying.txt b/FAQ.d/FAQ.Emptying.txt
new file mode 100644
index 0000000..92f149e
--- /dev/null
+++ b/FAQ.d/FAQ.Emptying.txt
@@ -0,0 +1,35 @@
+#!/bin/cat
+$Id: FAQ.Emptying.txt,v 1.4 2016/04/24 00:07:47 gilles Exp gilles $
+
+This documentation is also at http://imapsync.lamiral.info/#doc
+
+============================================
+ Imapsync tip to empty an account.
+============================================
+
+=======================================================================
+Q. How to delete all emails of all folders of an account with imapsync?
+
+R. Use the same account on both sides with option --delete
+ --noexpungeaftereach
+
+Option --noexpungeaftereach is just to speed up the deletion.
+
+Example:
+
+ ./imapsync \
+ --host1 test.lamiral.info --user1 test --password1 secret \
+ --host2 test.lamiral.info --user2 test --password2 secret \
+ --delete --noexpungeaftereach
+
+=======================================================================
+Q. How to delete all folders of an account with imapsync?
+
+R. Use an already empty account as source and sync this account
+ to the account you want to clear, with --delete2folders
+
+Example:
+
+ ./imapsync ... --delete2folders --foldersizes
+
+=======================================================================
diff --git a/FAQ.d/FAQ.Exchange.txt b/FAQ.d/FAQ.Exchange.txt
index 2524e10..3ed2d56 100644
--- a/FAQ.d/FAQ.Exchange.txt
+++ b/FAQ.d/FAQ.Exchange.txt
@@ -1,5 +1,5 @@
#!/bin/cat
-$Id: FAQ.Exchange.txt,v 1.20 2016/03/03 15:44:17 gilles Exp gilles $
+$Id: FAQ.Exchange.txt,v 1.23 2016/08/10 01:29:37 gilles Exp gilles $
This documentation is also at http://imapsync.lamiral.info/#doc
@@ -91,7 +91,6 @@ In case you don't have it you can still use
--regexmess 's,(.{9900}),$1\r\n,g'
instead of --maxlinelengthcmd 'reformime -r7'
-
=======================================================================
Q. How to sync from XXX to Office365
@@ -143,7 +142,7 @@ R3. Try with a classic email client like Thunderbird and the same
=======================================================================
Q. Exchange fails with "User is authenticated but not connected".
-R. "The message User is authenticated but not connected is due to a
+R1. "The message User is authenticated but not connected is due to a
bug in the Exchange server's IMAP implementation. If the client
presents a valid user name but an invalid password, the server
accepts the login, but subsequent commands fail with the
@@ -152,6 +151,10 @@ http://unix.stackexchange.com/questions/164823/user-is-authenticated-but-not-con
Thanks to James Abbottsmith for this link and explanation at
https://github.com/imapsync/imapsync/issues/32#issuecomment-153561647
+R2. Miguel Alameda reported understanding and solving this issue
+ like this, the context was admin/authuser:
+ "The admin user had not permission in the target mailbox."
+
=======================================================================
Q. Exchange fails with "BAD Command received in Invalid state".
@@ -276,7 +279,7 @@ R. It looks like limiting 4 messages per second is enough to never
imapsync ... --maxmessagespersecond 4
======================================================================
-Q. How to migrate from or to Exchange 2007/2010 with an
+Q. How to migrate from or to Exchange 2007/2010/2013 with an
admin/authuser account?
R. The tricks comes from Michele Marcionelli and Benjamin Priestman:
@@ -326,9 +329,6 @@ The command that I used for imapsync is:
--user2 "windows-domain\admin-user\aaaa" ^
--password2 admin-password ...
-
-
-
======================================================================
Q. How to migrate from or to Office 365 with an admin/authuser account?
@@ -336,8 +336,7 @@ Note from Yago Torres Fernandez:
(a working command using admin/authuser on host2 Office 365)
imapsync ... --authuser2 user_admin@domain.com --user2 user_to_be_migrated@domain.com ^
- --password2 XXXX --ssl2 --exclude "Shared Folders" ^
- --regextrans2 "s#Trash$#Papelera#" --regextrans2 "s#^Deleted Items$#Papelera#"
+ --password2 XXXX --ssl2 ^
but previous in Office365 you must do something like that, using powershell:
@@ -351,8 +350,6 @@ Same behavior with the --authuser2 option.
See also:
http://www.linux-france.org/prj/imapsync_list/msg02203.html
-
-
======================================================================
Q. How to migrate from or to Exchange 2003 with an admin/authuser
account?
@@ -387,8 +384,6 @@ In case you are not aware:
omitted in our case
- Use --debugimap when testing initial connectivity, if necessary
-
-
=======================================================================
Q. Couldn't create folder [trash] "Mailbox already exists".
diff --git a/FAQ.d/FAQ.Folders_Selection.txt b/FAQ.d/FAQ.Folders_Selection.txt
index 3d5afe5..9d874c8 100644
--- a/FAQ.d/FAQ.Folders_Selection.txt
+++ b/FAQ.d/FAQ.Folders_Selection.txt
@@ -1,5 +1,5 @@
#!/bin/cat
-$Id: FAQ.Folders_Selection.txt,v 1.3 2016/02/07 22:01:56 gilles Exp gilles $
+$Id: FAQ.Folders_Selection.txt,v 1.4 2016/06/07 22:19:04 gilles Exp gilles $
This documentation is also at http://imapsync.lamiral.info/#doc
@@ -9,6 +9,16 @@ This documentation is also at http://imapsync.lamiral.info/#doc
By default, Imapsync syncs all folders, one by one, in alphanumeric order.
+The IMAP protocol has a specific way to code folder names,
+when these names use non-ascii 7bit characters.
+Imapsync uses the same code as IMAP.
+In order to well specify them on the command line you will be
+helped by the complete folder list printed by imapsync at each run.
+The left column is what you have to use without the first enclosing
+square brackets, the right column is the human utf8 view.
+
+
+
======================================================================
Q. How can I sync only one folder?
diff --git a/FAQ.d/FAQ.Gmail.txt b/FAQ.d/FAQ.Gmail.txt
index 6bba3a7..ecf797d 100644
--- a/FAQ.d/FAQ.Gmail.txt
+++ b/FAQ.d/FAQ.Gmail.txt
@@ -1,5 +1,5 @@
#!/bin/cat
-$Id: FAQ.Gmail.txt,v 1.21 2016/03/17 20:14:14 gilles Exp gilles $
+$Id: FAQ.Gmail.txt,v 1.25 2016/07/22 00:18:35 gilles Exp gilles $
This documentation is also at http://imapsync.lamiral.info/#doc
@@ -11,6 +11,8 @@ Questions anwswered in this FAQ are:
Q. Can I use imapsync to transfer from or to Gmail accounts?
+Q. How many days does it take to transfer X GB?
+
Q. How to synchronize from Gmail to Gmail?
Q. How to synchronize from XXX to Gmail?
@@ -50,8 +52,18 @@ it has to be allowed in the Gmail configuration part:
-> Enable IMAP
=======================================================================
-Q. How to synchronize from Gmail to Gmail?
+Q. How many days does it take to transfer X GB?
+R. Basically it takes X days to transfer X GB per account.
+ Gmail has usage limits per day
+ http://support.google.com/a/bin/answer.py?hl=en&answer=1071518
+ From the previous link,
+ it's 2X days to upload X GB to Gmail
+ it's X/2 days to download X BG from Gmail
+ but that's the theory.
+
+=======================================================================
+Q. How to synchronize from Gmail to Gmail?
R. Use the following example:
@@ -64,7 +76,7 @@ R. Use the following example:
--ssl2 \
--user2 account2@gmail.com \
--password2 gmailsecret2 \
- --exitwhenover 500000000 \
+ --maxbytespersecond 10000 \
--automap \
--exclude "\[Gmail\]$"
@@ -74,17 +86,18 @@ Explanations:
--ssl1 --ssl2 are mandatory since Gmail only supports
imap ssl connections.
---exitwhenover 500000000 ( ~500 MB ) option is here to avoid
-locking or errors when imap transfers exceed maximum limit.
+--maxbytespersecond 10000 ( 10 kBytes/s ) option is here to avoid
+locking or errors when imap transfers exceed Gmail maximum limit.
See http://support.google.com/a/bin/answer.py?hl=en&answer=1071518
---exitwhenover is not mandatory in the sense Gmail may allow you
-to use an upper value than 500 MB without disconnections; I don't
-know the hard value, it seems to vary, so just have some tries
-and report me what you discover in case you detect something
-reliable.
+--maxbytespersecond 10000 is not mandatory in the sense Gmail may
+allow you to use an upper value than 1 GBytes per 24h without
+disconnections.
+
--automap is not mandatory but it's a feature to automatically
map folder names based on the Gmail user configuration itself, par account.
+It will save manual folder names changes or the use of --regextrans2
+or --f1f2 to map folder names.
For example, imap folder "[Gmail]/Sent Mail" may be mapped as one of
E-mails enviados
Enviada
@@ -97,7 +110,7 @@ Skickat
Verzonden
etc.
on both sides, host1 or host2, maybe differently, sometimes in
-incomprehensible alphabets, a headache for imap sysadmins.
+incomprehensible alphabets, a headache for imap sysadmins.
See a listing here:
http://stackoverflow.com/questions/2185391/localized-gmail-imap-folders/2185548#2185548
@@ -112,34 +125,32 @@ Q. How to synchronize from XXX to Gmail?
R. Use the following example:
-imapsync --host1 mail.oldhost.com \
+imapsync --host1 mail.oldhost.com \
--user1 my_email@oldhost.com \
- --password1 password \
+ --password1 password \
--host2 imap.gmail.com \
--user2 my_email@gmail.com \
--password2 password \
--ssl2 \
- --exitwhenover 500000000 \
+ --maxbytespersecond 10000 \
--maxsize 25000000 \
- --automap \
- --expunge1 \
+ --automap \
+ --expunge1 \
--addheader \
- --exclude "\[Gmail\]$" \
- --regextrans2 "s/[ ]+/_/g" \
- --regextrans2 "s/[\^]/_/g" \
- --regextrans2 "s/['\"\\\\]/_/g"
+ --exclude "\[Gmail\]$" \
+ --regextrans2 "s/[ ]+/_/g" \
+ --regextrans2 "s/['\^\"\\\\]/_/g"
Explanations:
--ssl2 is mandatory since Gmail only supports imap ssl connections.
---exitwhenover 500000000 option is here to avoid locking when
-transfers exceed maximum limit.
+--maxbytespersecond 10000 ( 10 kBytes/s ) option is here to avoid
+locking or errors when imap transfers exceed Gmail maximum limit.
See http://support.google.com/a/bin/answer.py?hl=en&answer=1071518
---exitwhenover is not mandatory in the sense you may be able to
-use an upper value than 500 MB without disconnections; I don't
-know the hard value, it seems to vary, so just have some tries
-and report me what you discover in case you detect something.
+--maxbytespersecond 10000 is not mandatory in the sense Gmail may
+allow you to use an upper value than 1 GBytes per 24h without
+disconnections.
--maxsize 25000000 is mandatory since Gmail limits messages size
up to 25 MB. This value increases over time, it was 10 MB some
@@ -147,7 +158,7 @@ years ago so you can try higher values. The Gmail page about
this limit is https://support.google.com/mail/answer/6584
--automap is optional but it will save manual folder names
-changes or the use of --regextrans2 to map folder names.
+changes or the use of --regextrans2 or --f1f2 to map folder names.
--expunge1 is optional. It deletes messages marked \Deleted on host1.
Imapsync syncs messages with all their flags, Gmail takes the messages
@@ -203,7 +214,7 @@ R. Use this example:
--user2 tata \
--password2 tatasecret \
--ssl1 \
- --exitwhenover 2500000000 \
+ --maxbytespersecond 20000 \
--useheader="X-Gmail-Received" \
--useheader "Message-Id" \
--automap \
@@ -219,14 +230,12 @@ Explanations:
--ssl1 is mandatory since Gmail only supports imap ssl connections.
---exitwhenover 2500000000 (2.5 GB) option is here to avoid
-locking when transfers exceed maximum limit.
-
+--maxbytespersecond 20000 ( 20 kBytes/s ) option is here to avoid
+locking or errors when imap transfers exceed Gmail maximum limit.
See http://support.google.com/a/bin/answer.py?hl=en&answer=1071518
---exitwhenover is not mandatory in the sense you may be able to
-use an upper value than 2.5 GB without disconnections; I don't
-know the hard value, it seems to vary, so just have some tries
-and report me what you discover in case you detect something.
+--maxbytespersecond 20000 is not mandatory in the sense Gmail may
+allow you to use an upper value than 2 GBytes per 24h without
+disconnections.
--useheader="X-Gmail-Received" --useheader "Message-Id" are not
mandatory. I use them because I found (several years ago, it may
@@ -245,10 +254,6 @@ get rid of this "[Gmail]" part with that.
You can select folders exported to imap within the gmail preferences,
for example you may unselect all "System labels".
---exitwhenover option is here to avoid locking when transfers
-exceed maximum limit.
-See http://support.google.com/a/bin/answer.py?hl=en&answer=1071518
-
--skipcrossduplicates is optional but it can save Gigabytes of hard
disk memory. Within imap protocol, Gmail presents Gmail labels as
folders, so a message labeled "Work" "ProjectX" "Urgent" ends up
@@ -270,37 +275,24 @@ label CanWait and only it.
--skipcrossduplicates, will only put in "[Gmail]/All Mail"
the messages that are not labeled at all.
-=======================================================================
-Q. Can I use the Extension of the SEARCH command: X-GM-RAW described at
- https://support.google.com/mail/answer/7190?hl=en
- https://developers.google.com/gmail/imap_extensions#extension_of_the_search_command_x-gm-raw
-
-R. Sure. Example, to search only emails with attachment and in unread state:
-
-On Unix:
-
- imapsync ... --search 'X-GM-RAW "has:attachment in:unread"'
-
-On Windows:
-
- imapsync.exe ... --search "X-GM-RAW ""has:attachment in:unread"""
-
-
-
-=======================================================================
-Q. How to avoid the [IMAP] prefix on Gmail side?
-How to stop creating folder with this prefix?
-Any switch we can use? e.g. [IMAP]/Archive
-
-R. No switch in imapsync since [IMAP]/ prefix is done by Gmail,
- it might be configurable within Gmail parameters configuration.
-
=======================================================================
Q. I can't authenticate with Gmail via IMAP
and Gmail says "Please log in via your web browser"
+R0. My current settings on two Gmail account are made
+with 0) 1) 2)
+
+0) Login via a browser to the Gmail account concerned.
+
+1) The 2-step verification is OFF
+https://myaccount.google.com/security?hl=en&pli=1&nlr=1#signin
+
+2) Access for less secure apps is turned ON
+https://www.google.com/settings/security/lesssecureapps
+https://support.google.com/accounts/answer/6010255?hl=en
+
R1. See Coert Grobbelaar solution:
-https://security.stackexchange.com/questions/86404/how-do-i-interact-with-google-to-import-email-via-imapsync
+https://web.archive.org/web/20150906230041/http://security.stackexchange.com/questions/86404/how-do-i-interact-with-google-to-import-email-via-imapsync
R2. I had the same issue one time (mars 2015) logging to Gmail
with imapsync.
@@ -309,9 +301,6 @@ so I logged for this account via a web browser,
it asked me to receive a code via a mobile, I said yes,
I entered the code and everything went ok.
-R3. Use https://www.google.com/settings/security/lesssecureapps
- (thanks to Flavio Zarur)
- See https://support.google.com/accounts/answer/6010255?hl=en
=======================================================================
Q. Can not open imap connection on [imap.gmail.com]:
@@ -353,6 +342,29 @@ https://support.google.com/mail/answer/78755?hl=en
To really remove messages in folder "[Gmail]/All Mail", they have to
be moved to the "Trash" folder and be deleted from "Trash".
+=======================================================================
+Q. Can I use the Extension of the SEARCH command: X-GM-RAW described at
+ https://support.google.com/mail/answer/7190?hl=en
+ https://developers.google.com/gmail/imap_extensions#extension_of_the_search_command_x-gm-raw
+
+R. Sure. Example, to search only emails with attachment and in unread state:
+
+On Unix:
+
+ imapsync ... --search 'X-GM-RAW "has:attachment in:unread"'
+
+On Windows:
+
+ imapsync.exe ... --search "X-GM-RAW ""has:attachment in:unread"""
+
+=======================================================================
+Q. How to avoid the [IMAP] prefix on Gmail side?
+How to stop creating folder with this prefix?
+Any switch we can use? e.g. [IMAP]/Archive
+
+R. No switch in imapsync since [IMAP]/ prefix is done by Gmail,
+ it might be configurable within Gmail parameters configuration.
+
=======================================================================
Q. Does imapsync have the capability to do 2 stage authentication?
diff --git a/FAQ.d/FAQ.Massive.txt b/FAQ.d/FAQ.Massive.txt
index cf2c0a3..30d4a94 100644
--- a/FAQ.d/FAQ.Massive.txt
+++ b/FAQ.d/FAQ.Massive.txt
@@ -1,5 +1,5 @@
#!/bin/cat
-$Id: FAQ.Massive.txt,v 1.8 2016/02/07 17:21:40 gilles Exp gilles $
+$Id: FAQ.Massive.txt,v 1.9 2016/03/25 19:59:45 gilles Exp gilles $
This documentation is also at http://imapsync.lamiral.info/#doc
diff --git a/FAQ.d/FAQ.Memory.txt b/FAQ.d/FAQ.Memory.txt
new file mode 100644
index 0000000..716c3e8
--- /dev/null
+++ b/FAQ.d/FAQ.Memory.txt
@@ -0,0 +1,30 @@
+#!/bin/cat
+$Id: FAQ.Memory.txt,v 1.3 2016/05/09 13:01:22 gilles Exp gilles $
+
+This documentation is also at http://imapsync.lamiral.info/#doc
+
+============================================
+ Imapsync tips about memory issues.
+============================================
+
+
+=======================================================================
+Q. I got an "Out of memory" error message then imapsync crashes.
+ How to fix that?
+
+R0. Add option --debugmemory to debug memory issues.
+
+R1. It's probably a very big message on the host1 account.
+ Before imapsync release 1.688 memory usage is at least 5 times
+ the biggest message size. then 2 times with release 1.688.
+ So a 700 MB message will crunch 3.5 GB of memory.
+ Starting with 1.688 it will crunch 1.4 GB of memory.
+
+
+R2. Usually "Out of memory" errors are related to old days,
+ to old Mail::IMAPClient module releases, before 3.26.
+ At that time memory usage was around 17 times the biggest message.
+ Look at imapsync output first lines to get the Mail::IMAPClient
+ release used. Then upgrade Mail::IMAPClient Perl module if needed.
+
+=======================================================================
\ No newline at end of file
diff --git a/FAQ.d/FAQ.Messages_Selection.txt b/FAQ.d/FAQ.Messages_Selection.txt
index 33a4470..d387264 100644
--- a/FAQ.d/FAQ.Messages_Selection.txt
+++ b/FAQ.d/FAQ.Messages_Selection.txt
@@ -1,5 +1,5 @@
#!/bin/cat
-$Id: FAQ.Messages_Selection.txt,v 1.5 2016/02/05 08:22:26 gilles Exp gilles $
+$Id: FAQ.Messages_Selection.txt,v 1.6 2016/04/18 12:45:20 gilles Exp gilles $
This documentation is also at http://imapsync.lamiral.info/#doc
@@ -65,12 +65,27 @@ Full explanation:
past|----maxage+++++minage---->now (intersection)
past|++++minage-----maxage++++>now (union)
+C.1 By default,
+ option --maxage is implemented as a --search SENTSINCE
+RFC 3501 says: SENTSINCE
+Messages whose [RFC-2822] Date: header (disregarding time and
+timezone) is within or later than the specified date.
+
+ Option --minage is implemented as a --search SENTBEFORE
+RFC 3501 says: SENTBEFORE
+Messages whose [RFC-2822] Date: header (disregarding time and
+timezone) is earlier than the specified date.
+
+If --noabletosearch is on then --minage and --maxage deal
+with the internal dates given by a FETCH imap command but
+not the Date: header. Internal date is the arrival date
+in the mailbox.
=======================================================================
Q. I want to sync messages based on their UID.
-R. First have in mind that UIDs are uniq only per folder, so work this
+R. First have in mind that UIDs are unique only per folder, so work this
way only with one folder at a time, with --folder option.
To show UIDs, there is the --debugLIST parameter.
@@ -91,7 +106,148 @@ UIDs 20000 20002 20004:
imapsync ... --search1 'NOT OR OR UID 20000 UID 20002 UID 20004' --folder INBOX
-If you search n UIDs then you have to put n-1 OR in the search line.
-That's IMAP.
+If you search n UIDs then you have to put n-1 OR in the search line,
+that's IMAP.
+=======================================================================
+Q. What is the selection criteria available with --search option?
+
+R. The list of search criteria are listed below, an excerpt from RFC3501.
+
+http://www.faqs.org/rfcs/rfc3501.html
+
+6.4.4. SEARCH Command
+...
+ ALL
+ All messages in the mailbox; the default initial key for
+ ANDing.
+
+ ANSWERED
+ Messages with the \Answered flag set.
+
+ BCC
+ Messages that contain the specified string in the envelope
+ structure's BCC field.
+
+ BEFORE
+ Messages whose internal date (disregarding time and timezone)
+ is earlier than the specified date.
+
+ BODY
+ Messages that contain the specified string in the body of the
+ message.
+
+ CC
+ Messages that contain the specified string in the envelope
+ structure's CC field.
+
+ DELETED
+ Messages with the \Deleted flag set.
+
+ DRAFT
+ Messages with the \Draft flag set.
+
+ FLAGGED
+ Messages with the \Flagged flag set.
+
+ FROM
+ Messages that contain the specified string in the envelope
+ structure's FROM field.
+
+ HEADER
+ Messages that have a header with the specified field-name (as
+ defined in [RFC-2822]) and that contains the specified string
+ in the text of the header (what comes after the colon). If the
+ string to search is zero-length, this matches all messages that
+ have a header line with the specified field-name regardless of
+ the contents.
+
+ KEYWORD
+ Messages with the specified keyword flag set.
+
+ LARGER
+ Messages with an [RFC-2822] size larger than the specified
+ number of octets.
+
+ NEW
+ Messages that have the \Recent flag set but not the \Seen flag.
+ This is functionally equivalent to "(RECENT UNSEEN)".
+
+ NOT
+ Messages that do not match the specified search key.
+
+ OLD
+ Messages that do not have the \Recent flag set. This is
+ functionally equivalent to "NOT RECENT" (as opposed to "NOT
+ NEW").
+
+ ON
+ Messages whose internal date (disregarding time and timezone)
+ is within the specified date.
+
+ OR
+ Messages that match either search key.
+
+ RECENT
+ Messages that have the \Recent flag set.
+
+ SEEN
+ Messages that have the \Seen flag set.
+
+ SENTBEFORE
+ Messages whose [RFC-2822] Date: header (disregarding time and
+ timezone) is earlier than the specified date.
+
+ SENTON
+ Messages whose [RFC-2822] Date: header (disregarding time and
+ timezone) is within the specified date.
+
+ SENTSINCE
+ Messages whose [RFC-2822] Date: header (disregarding time and
+ timezone) is within or later than the specified date.
+
+ SINCE
+ Messages whose internal date (disregarding time and timezone)
+ is within or later than the specified date.
+
+ SMALLER
+ Messages with an [RFC-2822] size smaller than the specified
+ number of octets.
+
+ SUBJECT
+ Messages that contain the specified string in the envelope
+ structure's SUBJECT field.
+
+ TEXT
+ Messages that contain the specified string in the header or
+ body of the message.
+
+ TO
+ Messages that contain the specified string in the envelope
+ structure's TO field.
+
+ UID
+ Messages with unique identifiers corresponding to the specified
+ unique identifier set. Sequence set ranges are permitted.
+
+ UNANSWERED
+ Messages that do not have the \Answered flag set.
+
+ UNDELETED
+ Messages that do not have the \Deleted flag set.
+
+ UNDRAFT
+ Messages that do not have the \Draft flag set.
+
+ UNFLAGGED
+ Messages that do not have the \Flagged flag set.
+
+ UNKEYWORD
+ Messages that do not have the specified keyword flag set.
+
+ UNSEEN
+ Messages that do not have the \Seen flag set.
+
+=======================================================================
+
diff --git a/FAQ.d/FAQ.Passwords_on_Windows.txt b/FAQ.d/FAQ.Passwords_on_Windows.txt
new file mode 100644
index 0000000..ac46c33
--- /dev/null
+++ b/FAQ.d/FAQ.Passwords_on_Windows.txt
@@ -0,0 +1,44 @@
+#!/bin/cat
+$Id: FAQ.Passwords_on_Windows.txt,v 1.2 2016/05/10 19:19:16 gilles Exp gilles $
+
+This documentation is also at http://imapsync.lamiral.info/#doc
+
+======================================================
+ Imapsync issues with passwords on Windows.
+======================================================
+
+
+http://www.robvanderwoude.com/escapechars.php
+http://stackoverflow.com/questions/3288552/how-can-i-escape-an-exclamation-mark-in-cmd-scripts
+
+
+=======================================================================
+Q. On Windows, some passwords contain $ characters. Login fails.
+
+R1. Enclose passwords between ""
+
+ imapsync ... --password1 "zzz$zz$$z"
+
+R2. Prefix each $ character with a ^ since ^ is the escape character
+ on Windows
+
+ imapsync ... --password1 zzz^$zz^$^$z
+
+For a password that is exactly the 8 characters string $%&<>|^"
+you have to enter
+
+ imapsync ... --password1 "$%%&<>|^"^"
+
+=======================================================================
+Q. On Windows, some passwords begin with an equal = character.
+ Login fails. What can I do?
+
+R. Use twice equals == characters instead; For example, if =secret
+ is the password then use:
+
+ imapsync ... --password1 ==secret
+
+or even
+
+ imapsync ... --password1 "==secret"
+
diff --git a/FAQ.d/FAQ.Security.txt b/FAQ.d/FAQ.Security.txt
index 8f857e7..17537a6 100644
--- a/FAQ.d/FAQ.Security.txt
+++ b/FAQ.d/FAQ.Security.txt
@@ -1,5 +1,5 @@
#!/bin/cat
-# $Id: FAQ.Security.txt,v 1.6 2016/02/07 21:49:52 gilles Exp gilles $
+# $Id: FAQ.Security.txt,v 1.9 2016/08/19 17:53:21 gilles Exp gilles $
This documentation is also at http://imapsync.lamiral.info/#doc
@@ -64,32 +64,40 @@ b OK 73 good day (Success)
The client part to type is "a LOGIN ..." and "b LOGOUT" without
the double-quotes.
+=======================================================================
+Q.How to test a ssl imap connection without imapsync?
+
+R1.Use openssl command like the following,
+ an example with imap.gmail.com server:
+
+ openssl s_client -crlf -connect imap.gmail.com:993
+
+The previous command is an interactive connection, hit ctrl-c
+to finish it. If you want to finish it gently, then use:
+
+ { sleep 2; echo "a logout"; sleep 1; } | openssl s_client -crlf -connect imap.gmail.com:993
======================================================================
Q. Imapsync used to use SSL_VERIFY_PEER now it uses SSL_VERIFY_NONE.
How can I change this back to the more secure SSL_VERIFY_PEER?
-R1. In function "sub set_ssl", replace
- IO::Socket::SSL::SSL_VERIFY_NONE()
-by
- IO::Socket::SSL::SSL_VERIFY_PEER()
-
-R2. After imapsync 1.673, for example
+R2. After imapsync 1.673,
to set SSL_verify_mode to SSL_VERIFY_PEER on host1
and SSL_verify_mode to SSL_VERIFY_NONE on host2
imapsync ... --ssl1 --ssl2 \
--sslargs1 SSL_verify_mode=1 \
- --sslargs2 SSL_verify_mode=0 \
+ --sslargs2 SSL_verify_mode=0
See perldoc IO::Socket::SSL for all possibilities, also at
http://search.cpan.org/perldoc?IO%3A%3ASocket%3A%3ASSL
-C1. Don't do this manual change in function "sub set_tls",
- it won't work by principle, because tls is done AFTER
- the application level connexion is established.
-
+It might be possible you need an extra:
+ --sslargs1 SSL_ca_file=/etc/ssl/certs/ca-certificates.crt
+to help the ssl software verifying the server certificate.
+The file ca-certificates.crt may be elsewhere on your system, even
+named differently.
=======================================================================
Q. How can I manually test a login via ssl?
diff --git a/FAQ.d/FAQ.Use_addheader.txt b/FAQ.d/FAQ.Use_addheader.txt
new file mode 100644
index 0000000..61bca11
--- /dev/null
+++ b/FAQ.d/FAQ.Use_addheader.txt
@@ -0,0 +1,30 @@
+#!/bin/cat
+$Id: FAQ.Use_addheader.txt,v 1.1 2016/06/01 12:25:56 gilles Exp gilles $
+
+This documentation is also at http://imapsync.lamiral.info/#doc
+
+============================================
+ Imapsync --addheader suggestion.
+============================================
+
+=======================================================================
+Q. What means this log message:
+ "Host1 Sent/1234 ignored (no wanted headers so we ignore this message.
+ To solve this: use --addheader)"
+
+R. In order to sync messages from one account to another Imapsync has
+ to identify messages on both sides, and compare them.
+ Imapsync can use two completely different methods to identify
+ messages on each account.
+ The first one, the default one, uses some headers of messages,
+ Real world syncs with various imap servers have bring to use
+ two headers "Message-Id:" and "Received:". It works for most
+ messages except for special folders like Sent or Draft where
+ messages in those folders don't have "Message-Id:" nor
+ "Received:" headers.
+ Here comes -addheader option. Option --addheader adds
+ a "Message-Id" header consisting of the imap UID of the message
+ on the host1 folder, like "Message-Id: 12345@imapsync".
+ This way, messages are well identified on both sides.
+
+=======================================================================
diff --git a/FAQ.d/FAQ.User_Concurrent_Access.txt b/FAQ.d/FAQ.User_Concurrent_Access.txt
new file mode 100644
index 0000000..b5d2e6a
--- /dev/null
+++ b/FAQ.d/FAQ.User_Concurrent_Access.txt
@@ -0,0 +1,35 @@
+#!/bin/cat
+$Id: FAQ.User_Concurrent_Access.txt,v 1.1 2016/07/22 00:00:08 gilles Exp gilles $
+
+This documentation is also at http://imapsync.lamiral.info/#doc
+
+=======================================
+ Imapsync and user concurrent access.
+=======================================
+
+=======================================================================
+Q. What happens if a user access the mailbox during the transfer process?
+
+R. Think all potential problems with a sync between
+ a master/source/host1 and a slave/destination/host2
+
+What happens when a user access syncing accounts depends
+on what he does, where he does and when:
+
+* Reading: no problem anywhere, anytime.
+
+* Writing at source/host1:
+ * adding folder => will need a resync after
+ * deleting folder => deletion not synced unless --delete2folders
+ * deleting message => deletion not synced unless --delete2
+ * adding message => will need a resync
+ * message flag change => will need a resync
+
+* Writing at destination/host2:
+ * adding folder => no problem, unless --delete2folders is used
+ * deleting folder => might reappear by the sync
+ * adding message => no problem, unless --delete2 is used
+ * deleting message => might reappear by the sync
+ * message flag change => might be canceled by the sync
+
+=======================================================================
diff --git a/FAQ.d/FAQ.XOAUTH2.txt b/FAQ.d/FAQ.XOAUTH2.txt
index 16442ce..ba25ffc 100644
--- a/FAQ.d/FAQ.XOAUTH2.txt
+++ b/FAQ.d/FAQ.XOAUTH2.txt
@@ -1,5 +1,5 @@
#!/bin/cat
-$Id: FAQ.XOAUTH2.txt,v 1.9 2016/01/28 14:34:15 gilles Exp gilles $
+$Id: FAQ.XOAUTH2.txt,v 1.11 2016/07/27 23:08:19 gilles Exp gilles $
This documentation is also at http://imapsync.lamiral.info/#doc
@@ -14,8 +14,64 @@ Q. Is XOAUTH2 authentication available with imapsync?
R. Yes, but XOAUTH2 has been really tested on Unix systems,
less profund on Windows but it should work.
+ Two file formats are available from Gmail: json and pk12.
+ json is easier to manage than pk12.
+
=======================================================================
-Q. How to use XOAUTH2 to globally authenticate gmail users?
+Q. Imapsync XOAUTH2 fails with the following message, how to fix that?
+{
+ "error": "unauthorized_client",
+ "error_description": "Unauthorized client or scope in request."
+}
+
+R. In order to work you also have to allow the service https://mail.google.com/
+ in the Google client API manager for OAUTH2.
+ "Select OAuth 2.0 scopes:"
+
+=======================================================================
+Q. How to use XOAUTH2 via a json file to globally authenticate gmail users?
+
+R. Unless you use an imapsync binary like imapsync.exe or imapsync_bin_Darwin,
+ Perl modules needed for xoauth2 are:
+
+ Crypt::OpenSSL::RSA
+ JSON
+ JSON::WebToken
+ LWP
+ HTML::Entities
+ Encode::Byte
+
+A easy way to install or upgrade Perl modules is to use cpanm command,
+also called cpanminus. On Linux it is something like
+
+ sudo cpanm JSON::WebToken JSON Crypt::OpenSSL::RSA LWP HTML::Entities Encode::Byte
+
+The json file patch code and explanation comes from Secretion at
+https://github.com/imapsync/imapsync/pull/68
+
+Here is a complete example for Gmail. It is a little stupid
+since it is the same account as source and destination but
+it's just to get the picture for xoauth2 authentication.
+
+All xoauth2 config is given via the --password1 parameter.
+It has the form:
+
+ --password1 secret.xoauth2.json
+
+where secret.xoauth2.json is the json file given by Gmail.
+
+
+imapsync \
+ --host1 imap.gmail.com --ssl1 --user1 gilles.lamiral@gmail.com \
+ --password1 secret.xoauth2.json --authmech1 XOAUTH2 \
+ --host2 imap.gmail.com --ssl2 --user2 gilles.lamiral@gmail.com \
+ --password2 secret.xoauth2.json --authmech2 XOAUTH2 \
+ --justlogin --debug
+
+Use your own xoauth2 values.
+
+=======================================================================
+Q. How to use XOAUTH2 via pk12 file to globally authenticate gmail users?
R. First, consider the XOAUTH2 feature at a prototype level.
@@ -115,7 +171,8 @@ R2. In case you still have to use XOAUTH, here is the method:
--password2 secret2 \
--authmech2 XOAUTH
-Google Apps is a paid service, but you can try it for 30 days without any cost.
+Google Apps is a paid service, but you can try it for 30 days without any cost,
+or you could try, time goes on on free trial offers.
Some notes about configuring the Google Apps XOAUTH:
diff --git a/FAQ.d/htaccess.txt b/FAQ.d/htaccess.txt
new file mode 100644
index 0000000..46d7ab8
--- /dev/null
+++ b/FAQ.d/htaccess.txt
@@ -0,0 +1,31 @@
+
+# $Id: htaccess.txt,v 1.10 2016/07/22 00:20:13 gilles Exp gilles $
+
+AddDescription "Back to Imapsync main page." ..
+AddDescription "Archiving tips." FAQ.Archiving.txt
+AddDescription "Connection issues." FAQ.Connection.txt
+AddDescription "Contacts & Calendars issues." FAQ.Contacts_Calendars.txt
+AddDescription "Dates issues." FAQ.Dates.txt
+AddDescription "Domino." FAQ.Domino.txt
+AddDescription "Dovecot." FAQ.Dovecot.txt
+AddDescription "Duplicated messages issues." FAQ.Duplicates.txt
+AddDescription "Emptying an account." FAQ.Emptying.txt
+AddDescription "Exchange 20xx and Office365." FAQ.Exchange.txt
+AddDescription "Changing folders names." FAQ.Folders_Mapping.txt
+AddDescription "Selecting folders." FAQ.Folders_Selection.txt
+AddDescription "Flags." FAQ.Flags.txt
+AddDescription "Gmail accounts." FAQ.Gmail.txt
+AddDescription "ISP tips." FAQ.ISP.txt
+AddDescription "Massive/bulk migrations." FAQ.Massive.txt
+AddDescription "Memory issues." FAQ.Memory.txt
+AddDescription "Password & special characters on Windows." FAQ.Passwords_on_Windows.txt
+AddDescription "Selecting messages." FAQ.Messages_Selection.txt
+AddDescription "Oracle-UCS." FAQ.Oracle-UCS.txt
+AddDescription "Security." FAQ.Security.txt
+AddDescription "SmarterMail." FAQ.SmarterMail.txt
+AddDescription "User concurrent access." FAQ.User_Concurrent_Access.txt
+AddDescription "Why use --addheader?." FAQ.Use_addheader.txt
+AddDescription "Various imap server softwares." FAQ.Various_Server_Softwares.txt
+AddDescription "XOAUTH2 (Gmail)." FAQ.XOAUTH2.txt
+AddDescription "Where this Description column comes from." htaccess.txt
+
diff --git a/INSTALL.d/INSTALL.Darwin.txt b/INSTALL.d/INSTALL.Darwin.txt
index ade5e43..39f5127 100644
--- a/INSTALL.d/INSTALL.Darwin.txt
+++ b/INSTALL.d/INSTALL.Darwin.txt
@@ -1,11 +1,12 @@
#!/bin/cat
-# $Id: INSTALL.Darwin.txt,v 1.11 2016/01/05 23:43:26 gilles Exp gilles $
+# $Id: INSTALL.Darwin.txt,v 1.14 2016/06/22 19:57:00 gilles Exp gilles $
===================================================
= Installing imapsync binary on Darwin / Mac OS X =
===================================================
-There is a standalone imapsync binary for Mac OS X called imapsync_bin_Darwin,
+There is a standalone imapsync binary for Mac OS X
+called "imapsync_bin_Darwin" (without the quotes),
available in the compressed tarball called imapsync-1.xxx.tgz
where 1.xxx is the version number. I suppose this tarball is put
under your $HOME directory, let say /Users/gilles/, but you can
@@ -35,7 +36,21 @@ real IMAP server accounts:
./imapsync_bin_Darwin --testslive
If this sync works fine then imapsync_bin_Darwin is ready for any
-imap account synchronization.
+imap account synchronization.
+
+When reading the documentation with imapsync command lines
+examples, you have to replace the command "imapsync" by "imapsync_bin_Darwin"
+For example, instead of the command:
+
+ ./imapsync \
+ --host1 test1.lamiral.info --user1 test1 --password1 secret1 \
+ --host2 test2.lamiral.info --user2 test2 --password2 secret2
+
+you have to use:
+
+ ./imapsync_bin_Darwin \
+ --host1 test1.lamiral.info --user1 test1 --password1 secret1 \
+ --host2 test2.lamiral.info --user2 test2 --password2 secret2
===================================================
@@ -59,6 +74,7 @@ sh prerequisites_imapsync
cpanm Authen::NTLM
cpanm File::Copy::Recursive IO::Tee
cpanm Mail::IMAPClient
+cpanm Readonly
cpanm Unicode::String
wget -c http://imapsync.lamiral.info/imapsync
@@ -94,7 +110,6 @@ pp -o imapsync.bin imapsync
./imapsync.bin --module
-
==========================================
== Installing imapsync Mac OS X Leopard ==
==========================================
diff --git a/INSTALL.d/INSTALL.Debian.txt b/INSTALL.d/INSTALL.Debian.txt
index 0b3cb12..8a347d1 100644
--- a/INSTALL.d/INSTALL.Debian.txt
+++ b/INSTALL.d/INSTALL.Debian.txt
@@ -1,5 +1,5 @@
#!/bin/cat
-# $Id: INSTALL.Debian.txt,v 1.6 2016/01/21 15:10:01 gilles Exp gilles $
+# $Id: INSTALL.Debian.txt,v 1.7 2016/06/22 19:58:32 gilles Exp gilles $
There is one section for Debian 7 and one for Debian 6.
@@ -24,6 +24,7 @@ libio-tee-perl \
libmodule-scandeps-perl \
libnet-ssleay-perl \
libpar-packer-perl \
+libreadonly-perl \
libterm-readkey-perl \
libtest-pod-perl \
libtest-simple-perl \
@@ -87,6 +88,7 @@ libio-tee-perl \
libmodule-scandeps-perl \
libnet-ssleay-perl \
libpar-packer-perl \
+libreadonly-perl \
libterm-readkey-perl \
libtest-pod-perl \
libtest-simple-perl \
diff --git a/INSTALL.d/INSTALL.Ubuntu.txt b/INSTALL.d/INSTALL.Ubuntu.txt
index 7620f08..38e9781 100644
--- a/INSTALL.d/INSTALL.Ubuntu.txt
+++ b/INSTALL.d/INSTALL.Ubuntu.txt
@@ -1,5 +1,5 @@
#!/bin/cat
-# $Id: INSTALL.Ubuntu.txt,v 1.5 2016/01/21 15:10:01 gilles Exp gilles $
+# $Id: INSTALL.Ubuntu.txt,v 1.7 2016/06/22 19:58:32 gilles Exp gilles $
=================================================
= Installing imapsync on Ubuntu 12.04 or higher =
@@ -23,6 +23,7 @@ libio-tee-perl \
libmodule-scandeps-perl \
libnet-ssleay-perl \
libpar-packer-perl \
+libreadonly-perl \
libterm-readkey-perl \
libtest-pod-perl \
libtest-simple-perl \
@@ -35,7 +36,7 @@ because Debian hasn't made it available via a package yet.
It also install manually Perl module Mail::IMAPClient because
it is good to be up to date:
- cpanm Data::Uniqid Mail::IMAPClient
+ sudo cpanm Data::Uniqid Mail::IMAPClient
After installing the dependencies, imapsync should be working.
diff --git a/INSTALL.d/prerequisites_imapsync b/INSTALL.d/prerequisites_imapsync
index 29a2eea..a79d384 100755
--- a/INSTALL.d/prerequisites_imapsync
+++ b/INSTALL.d/prerequisites_imapsync
@@ -1,13 +1,13 @@
#!/bin/sh
-# $Id: prerequisites_imapsync,v 1.12 2015/07/06 03:12:43 gilles Exp gilles $
+# $Id: prerequisites_imapsync,v 1.16 2016/08/16 16:25:01 gilles Exp gilles $
MODULES_MANDATORY='
-Digest::HMAC_MD5
Authen::NTLM
Compress::Zlib
Data::Dumper
Data::Uniqid
+Digest::HMAC_MD5
Digest::HMAC
Digest::MD5
File::Copy::Recursive
@@ -15,9 +15,12 @@ IO::Socket::INET
IO::Socket::INET6
IO::Socket::SSL
IO::Tee
+JSON::WebToken
Mail::IMAPClient
Parse::RecDescent
+Readonly
Term::ReadKey
+Test::MockObject
Test::More
Test::Pod
Unicode::String
@@ -53,6 +56,7 @@ test_module() {
echo "Failure: Not found Perl module $M_tested $@"
LIST_TO_INSTALL="$LIST_TO_INSTALL $M_tested"
fi
+ return
}
test_mandatory_modules() {
@@ -79,15 +83,15 @@ search_modules_any() {
# no yum, no apt-get
{
- search_modules_cpan "$@"
+ search_modules_cpanm "$@"
return
}
}
-search_modules_cpan() {
+search_modules_cpanm() {
cat </dev/null || cat VERSION)
+VERSION_PREVIOUS=$(shell perl -I$(IMAPClient) ./dist/imapsync --version 2>/dev/null || echo ERROR)
VERSION_EXE=$(shell cat ./VERSION_EXE)
HELLO=$(shell date;uname -a)
@@ -66,7 +72,7 @@ hello:
@echo "$(BIN_NAME)"
-all: doc VERSION biz prereq allcritic bin mac imapsync.exe VERSION_EXE
+all: doc VERSION biz prereq allcritic bin VERSION_EXE
testp :
sh INSTALL.d/prerequisites_imapsync
@@ -142,7 +148,7 @@ install: testp W/imapsync.1
ci: cidone
cidone:
- rcsdiff W/*.bat W/*.out W/*.txt W/*.htaccess
+ rcsdiff W/*.bat W/*.sh W/*.out W/*.txt W/*.htaccess
rcsdiff S/*.txt S/*.shtml S/*.html
rcsdiff doc/*.t2t
rcsdiff INSTALL.d/*.txt INSTALL.d/prerequisites_imapsync
@@ -154,12 +160,20 @@ cidone:
# Local goals
###############
-.PHONY: prereq test tests testp testf test3xx testv3 perlcritic allcritic
+.PHONY: prereq test tests testp testf test3xx testv3 perlcritic allcritic compok
+
+compok: W/.compok
+
+
+W/.compok: imapsync
+ perl -c imapsync
+ touch W/.compok
prereq: W/prereq.scandeps
W/prereq.scandeps: INSTALL.d/prerequisites_imapsync imapsync
scandeps -c -x imapsync | tee W/prereq.scandeps
+ rcsdiff W/prereq.scandeps || { echo 'rcsdiff detected a diff' | ci -l W/prereq.scandeps ; }
./INSTALL.d/prerequisites_imapsync | tee W/prereq.`lsb_release -i -s || echo Unknown`
@@ -168,20 +182,20 @@ perlcritic: W/perlcritic_3.out W/perlcritic_2.out
allcritic: W/perlcritic_4.out W/perlcritic_3.out W/perlcritic_2.out W/perlcritic_1.out
-W/perlcritic_1.out: imapsync
- perlcritic -1 imapsync > W/perlcritic_1.out || :
+W/perlcritic_1.out: imapsync W/.compok
+ perlcritic --statistics -1 imapsync > W/perlcritic_1.out || :
echo | ci -l W/perlcritic_1.out
-W/perlcritic_2.out: imapsync
- perlcritic -2 imapsync > W/perlcritic_2.out || :
+W/perlcritic_2.out: imapsync W/.compok
+ perlcritic --statistics -2 imapsync > W/perlcritic_2.out || :
echo | ci -l W/perlcritic_2.out
-W/perlcritic_3.out: imapsync
- perlcritic -3 imapsync > W/perlcritic_3.out || :
+W/perlcritic_3.out: imapsync W/.compok
+ perlcritic --statistics -3 imapsync > W/perlcritic_3.out || :
echo | ci -l W/perlcritic_3.out
-W/perlcritic_4.out: imapsync
- perlcritic -4 imapsync > W/perlcritic_4.out || :
+W/perlcritic_4.out: imapsync W/.compok
+ perlcritic --statistics -4 imapsync > W/perlcritic_4.out || :
echo | ci -l W/perlcritic_4.out
@@ -218,7 +232,7 @@ copy_win32:
W/test.bat:
unix2dos W/test.bat
scp imapsync W/test.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
-# ssh Admin@c 'perl C:/msys/1.0/home/Admin/imapsync/imapsync --tests_debug'
+# ssh Admin@c 'perl C:/msys/1.0/home/Admin/imapsync/imapsync --testsdebug'
ssh Admin@c 'perl C:/msys/1.0/home/Admin/imapsync/imapsync --tests'
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/test.bat'
# ssh Admin@c 'tasklist /FI "PID eq 0"'
@@ -229,6 +243,15 @@ W/test_tests.bat:
unix2dos W/test_tests.bat
scp imapsync W/test_tests.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/test_tests.bat'
+ ./W/check_winerr test_tests.bat
+
+W/test_testsdebug.bat:
+ unix2dos W/test_testsdebug.bat
+ scp imapsync W/test_testsdebug.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
+ ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/test_testsdebug.bat'
+ ./W/check_winerr test_testsdebug.bat
+
+
.PHONY: W/*.bat examples/*
@@ -271,15 +294,35 @@ W/test3_gmail.bat:
scp imapsync W/test3_gmail.bat /g/var/pass/secret.gilles_gmail Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/test3_gmail.bat'
-test_exe:
+test_exe: W/test_exe.bat
+
+W/test_exe.bat:
unix2dos W/test_exe.bat
scp W/test_exe.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/test_exe.bat'
+ ./W/check_winerr test_exe.bat
-win32_prereq:
+W/build_exe.bat:
+ unix2dos W/build_exe.bat
+ scp W/build_exe.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
+ ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/build_exe.bat'
+ ./W/check_winerr build_exe.bat
+
+
+W/learn_func.bat:
+ unix2dos W/learn_func.bat
+ scp W/learn_func.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
+ ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/learn_func.bat'
+ ./W/check_winerr learn_func.bat
+
+win32_prereq: W/install_modules.bat
+
+W/install_modules.bat:
unix2dos W/install_modules.bat
scp W/install_modules.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/install_modules.bat'
+ ./W/check_winerr install_modules.bat
+
win32_update_ssl:
scp W/install_module_ssl.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
@@ -295,24 +338,28 @@ imapsync.exe: imapsync
ssh Admin@c 'perl -V'
(date "+%s"| tr "\n" " "; echo -n "BEGIN " $(VERSION) ": "; date) >> W/.BUILD_EXE_TIME
unix2dos W/build_exe.bat W/test_exe.bat W/install_modules.bat
- scp W/install_modules.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
- scp imapsync W/build_exe.bat W/test_exe.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
+ scp imapsync W/build_exe.bat W/test_exe.bat W/install_modules.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/build_exe.bat'
+ ./W/check_winerr build_exe.bat
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/test_exe.bat'
+ ./W/check_winerr test_exe.bat
rm -f imapsync.exe
scp Admin@c:'C:/msys/1.0/home/Admin/imapsync/imapsync.exe' .
(date "+%s"| tr "\n" " "; echo -n "END " $(VERSION) ": "; date) >> W/.BUILD_EXE_TIME
-exe: imapsync W/build_exe.bat dosify_bat
+exe: imapsync
(date "+%s"| tr "\n" " "; echo -n "BEGIN " $(VERSION) ": "; date) >> W/.BUILD_EXE_TIME
- scp imapsync W/build_exe.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
+ scp imapsync W/build_exe.bat W/install_modules.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/build_exe.bat'
- ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/imapsync.exe --modules_version'
+ ./W/check_winerr build_exe.bat
+ ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/imapsync.exe --justbanner'
rm -f imapsync.exe
scp Admin@c:'C:/msys/1.0/home/Admin/imapsync/imapsync.exe' .
(date "+%s"| tr "\n" " "; echo -n "END " $(VERSION) ": "; date) >> W/.BUILD_EXE_TIME
+
+
zip: dosify_bat
rm -rfv ../prepa_zip/imapsync_$(VERSION_EXE)/
mkdir -p ../prepa_zip/imapsync_$(VERSION_EXE)/FAQ.d/ ../prepa_zip/imapsync_$(VERSION_EXE)/Cook/
@@ -329,17 +376,21 @@ zip: dosify_bat
# C:\Users\mansour\Desktop\imapsync
-.PHONY: mac bin
+.PHONY: mac bin win lin
mac: imapsync_bin_Darwin
-imapsync_bin_Darwin: imapsync
+imapsync_bin_Darwin: imapsync W/build_mac.sh INSTALL.d/prerequisites_imapsync
rcsdiff imapsync
- rsync -p -e 'ssh -p 995' imapsync W/build_mac.sh gilleslamira@gate.polarhome.com:
+ rsync -p -e 'ssh -p 995' imapsync W/build_mac.sh INSTALL.d/prerequisites_imapsync gilleslamira@gate.polarhome.com:
ssh -p 995 gilleslamira@gate.polarhome.com 'sh build_mac.sh'
rsync -P -e 'ssh -p 995' gilleslamira@gate.polarhome.com:imapsync_bin_Darwin .
-bin: $(BIN_NAME)
+bin: lin mac win
+
+lin: $(BIN_NAME)
+
+win: imapsync.exe
$(BIN_NAME): imapsync
rcsdiff imapsync
@@ -359,6 +410,7 @@ lfo: upload_lfo
tarball: ../prepa_dist/$(DIST_FILE)
+
../prepa_dist/$(DIST_FILE): imapsync
echo making tarball ../prepa_dist/$(DIST_FILE)
rcsdiff RCS/*
@@ -373,6 +425,7 @@ tarball: ../prepa_dist/$(DIST_FILE)
ls -l ../prepa_dist/$(DIST_FILE)
+
DIST_PATH := ./dist/
dist: cidone test clean all perlcritic dist_prepa dist_zip README_dist.txt
@@ -384,11 +437,17 @@ md5:
sha:
cd $(DIST_PATH)/ && sha512sum *
+.PHONY: moveoldrelease
-dist_prepa: tarball
+moveoldrelease:
+ ls -dl dist/imapsync dist/imapsync-$(VERSION_PREVIOUS).tgz dist/imapsync_$(VERSION_PREVIOUS).zip
+ test -d dist/old_releases/$(VERSION_PREVIOUS) || mkdir dist/old_releases/$(VERSION_PREVIOUS) && cd dist/old_releases/$(VERSION_PREVIOUS)
+ mv -vf dist/imapsync dist/imapsync-$(VERSION_PREVIOUS).tgz dist/imapsync_$(VERSION_PREVIOUS).zip dist/old_releases/$(VERSION_PREVIOUS)
+
+dist_prepa: tarball moveoldrelease
ln -f ../prepa_dist/$(DIST_FILE) $(DIST_PATH)/
rcsdiff imapsync
- cp -a imapsync $(DIST_PATH)/
+ cp -a ../prepa_dist/$(DIST_NAME)/imapsync $(DIST_PATH)/
#cd $(DIST_PATH)/ && md5sum $(DIST_FILE) > $(DIST_FILE).md5.txt
#cd $(DIST_PATH)/ && md5sum -c $(DIST_FILE).md5.txt
ls -l $(DIST_PATH)/
@@ -454,28 +513,37 @@ upload_lfo:
/home/gilles/public_html/www.linux-france.org/html/prj/imapsync/.htaccess
sh ~/memo/lfo-rsync
-valid_index: .valid.index.shtml
+valid_index: W/.valid.index.shtml
-checklink: index.shtml
- checklink -b -q http://lamiral.info/~gilles/imapsync/
+cl: ./W/checklink.txt
-checklinkext: S/news.shtml S/external.shtml S/imapservers.shtml S/template.shtml
+./W/checklink.txt: index.shtml
+ checklink -b -q http://lamiral.info/~gilles/imapsync/ |tee ./W/checklink.txt
+
+cle: ./W/checklinkext.txt
+
+./W/checklinkext.txt: S/news.shtml S/external.shtml S/imapservers.shtml S/template_xhtml1.shtml
checklink -b -q \
- http://lamiral.info/~gilles/imapsync/S/template.shtml \
+ http://lamiral.info/~gilles/imapsync/S/template_xhtml1.shtml \
http://lamiral.info/~gilles/imapsync/S/news.shtml \
http://lamiral.info/~gilles/imapsync/S/external.shtml \
- http://lamiral.info/~gilles/imapsync/S/imapservers.shtml
-
-.valid.index.shtml: index.shtml S/*.shtml
+ http://lamiral.info/~gilles/imapsync/S/imapservers.shtml \
+ | tee ./W/checklinkext.txt
+
+W/.valid.index.shtml: index.shtml S/*.shtml
for f in index.shtml S/*.shtml; do echo tidy -q $$f; tidy -q $$f > /dev/null; done
- validate --verbose index.shtml S/*.shtml
- touch .valid.index.shtml
+ ./W/tools/validate_xml_html5 index.shtml S/*.shtml
+ touch W/.valid.index.shtml
-.PHONY: upload_index upload_FAQ
+.PHONY: upload_index upload_FAQ ci_imapsync upload_bin
-upload_index: .valid.index.shtml
- rcsdiff index.shtml S/*.shtml FAQ FAQ.d/*.txt INSTALL LICENSE CREDITS TODO W/*.bat examples/*.bat index.shtml INSTALL.d/*.txt imapsync
- rsync -avH index.shtml FAQ INSTALL OPTIONS NOLIMIT LICENSE CREDITS TODO imapsync imapsync.exe $(BIN_NAME) imapsync_bin_Darwin ../imapsync_website/
+upload_bin:
+ rsync -a imapsync.exe imapsync_bin_Darwin imapsync_bin_Linux_i686 imapsync ../imapsync_website/
+ rsync -aHvz --delete ../imapsync_website/ root@ks.lamiral.info:/var/www/imapsync/
+
+upload_index: W/.valid.index.shtml
+ rcsdiff index.shtml S/*.shtml FAQ FAQ.d/*.txt INSTALL LICENSE CREDITS TODO W/*.bat examples/*.bat index.shtml INSTALL.d/*.txt
+ rsync -avH index.shtml FAQ INSTALL OPTIONS NOLIMIT LICENSE CREDITS TODO ../imapsync_website/
rsync -avH S/ ../imapsync_website/S/
rsync -aHv --delete ./examples/ ../imapsync_website/examples/
rsync -aHv --delete ./INSTALL.d/ ../imapsync_website/INSTALL.d/
@@ -484,6 +552,13 @@ upload_index: .valid.index.shtml
rsync -aHvz --delete ../imapsync_website/ root@ks.lamiral.info:/var/www/imapsync/
+ci_imapsync:
+ rcsdiff imapsync
+
+upload_latest: ci_imapsync bin
+ rsync -a imapsync imapsync_bin_Linux_i686 imapsync_bin_Darwin imapsync.exe ../imapsync_website/
+ rsync -aHvz --delete ../imapsync_website/ root@ks.lamiral.info:/var/www/imapsync/
+
upload_FAQ:
rcsdiff FAQ FAQ.d/*.txt INSTALL LICENSE CREDITS TODO INSTALL.d/*.txt
rsync -avH FAQ INSTALL OPTIONS CREDITS TODO ../imapsync_website/
@@ -495,7 +570,6 @@ upload_FAQ:
upload_ks: ci tarball
rsync -aHv $(PUBLIC) ../imapsync_website/
- rsync -aHv $(PUBLIC_W) ../imapsync_website/W/
rsync -aHv --delete ./W/ks.htaccess ../imapsync_website/.htaccess
rsync -avH ./S/ ../imapsync_website/S/
rsync -aHv --delete ./dist/ ../imapsync_website/dist/
diff --git a/OPTIONS b/OPTIONS
index 08a2dc9..e637ced 100644
--- a/OPTIONS
+++ b/OPTIONS
@@ -36,8 +36,8 @@
See all possibilities in the new() method of IO::Socket::SSL
http://search.cpan.org/perldoc?IO::Socket::SSL#Description_Of_Methods
--sslargs2 str : Pass any ssl parameter for host2 ssl or tls connection.
- See --sslargs1
-
+ See --sslargs1
+
--timeout1 int : Connection timeout in seconds for host1.
Default is 120 and 0 means no timeout at all.
--timeout2 int : Connection timeout in seconds for host2.
@@ -91,9 +91,9 @@
It does it by adding two --regextrans2 options before
all others. Add --debug to see what's really going on.
- --automap : guesses folders mapping, for folders like
+ --automap : guesses folders mapping, for folders like
"Sent", "Junk", "Drafts", "All", "Archive", "Flagged".
- --f1f2 str1=str2 : Force folder str1 to be synced to str2,
+ --f1f2 str1=str2 : Force folder str1 to be synced to str2,
--f1f2 overrides --automap and --regextrans2.
--regextrans2 reg : Apply the whole regex to each destination folders.
--regextrans2 reg : and this one. etc.
@@ -134,7 +134,7 @@
--pipemess cmd : Apply this cmd command to each message content
before the copy.
--pipemess cmd : and this one, etc.
-
+
--disarmreadreceipts : Disarms read receipts (host2 Exchange issue)
--regexmess reg : Apply the whole regex to each message before transfer.
@@ -274,10 +274,10 @@
--host1 test1.lamiral.info --user1 test1 --password1 secret1 \
--host2 test2.lamiral.info --user2 test2 --password2 secret2
-Here is a [linux] system (Linux petite 3.2.0-97-generic #137-Ubuntu SMP Thu Dec 17 21:14:00 UTC 2015 i686)
-With perl 5.14.2 Mail::IMAPClient 3.38
-$Id: imapsync,v 1.684 2016/03/17 08:35:03 gilles Exp gilles $
-This current imapsync is up to date
+Here is a [linux] system (Linux petite 3.13.0-92-generic #139-Ubuntu SMP Tue Jun 28 20:42:32 UTC 2016 i686)
+with Perl 5.18.2 Mail::IMAPClient 3.38
+$Id: imapsync,v 1.727 2016/08/19 10:30:36 gilles Exp gilles $
+This imapsync is up to date
Homepage: http://imapsync.lamiral.info/
diff --git a/README b/README
index 5e929f9..0a1b132 100644
--- a/README
+++ b/README
@@ -1,15 +1,17 @@
NAME
- imapsync - IMAP synchronisation, sync, copy or migration tool.
- Synchronises mailboxes between two imap servers. Good at IMAP migration.
- More than 66 different IMAP server softwares supported with success, few
+ imapsync - Email IMAP tool for syncing, copying and migrating email
+ mailboxes.
+
+ The imapsync command synchronises mailboxes between two imap servers.
+ More than 69 different IMAP server softwares supported with success, few
failures.
- $Revision: 1.684 $
+ $Revision: 1.727 $
SYNOPSIS
- To synchronize the source imap account
- "test1" on server "test1.lamiral.info" with password "secret1"
- to the destination imap account
+ To synchronize the source imap account
+ "test1" on server "test1.lamiral.info" with password "secret1"
+ to the destination imap account
"test2" on server "test2.lamiral.info" with password "secret2"
do:
@@ -17,11 +19,16 @@ SYNOPSIS
--host1 test1.lamiral.info --user1 test1 --password1 secret1 \
--host2 test2.lamiral.info --user2 test2 --password2 secret2
+REQUIRED ARGUMENTS
+ The required argmuments are the six values, three on each sides, needed
+ to login into the IMAP servers, a host, a username, and a password, two
+ times.
+
INSTALL
Imapsync works under any Unix with perl.
- Imapsync works under Windows (2000, XP, Vista, Seven)
+ Imapsync works under Windows (2000, XP, Vista, Seven)
as a standalone binary software called imapsync.exe
- Imapsync works under OS X as a standalone binary
+ Imapsync works under OS X as a standalone binary
software called imapsync_bin_Darwin.
Purchase latest imapsync at
@@ -35,11 +42,15 @@ INSTALL
Go into the directory imapsync-x.xx and read the INSTALL file.
As mentioned at http://imapsync.lamiral.info/#install
- the INSTALL file can also be found at
+ the INSTALL file can also be found at
http://imapsync.lamiral.info/INSTALL
It is now split in several files for each system
http://imapsync.lamiral.info/INSTALL.d/
+CONFIGURATION
+ There is no specific configuration file for imapsync, everything is
+ specified by the command line parameteres and the default behavior.
+
USAGE
To get a description of each option just run imapsync with no argument,
like this:
@@ -50,16 +61,16 @@ USAGE
http://imapsync.lamiral.info/OPTIONS and is reproduced here:
usage: ./imapsync [options]
-
- Several options are mandatory.
+
+ Several options are mandatory.
str means string
int means integer
reg means regular expression
cmd means command
-
- --dry : Makes imapsync doing nothing, just print what would
+
+ --dry : Makes imapsync doing nothing, just print what would
be done without --dry.
-
+
--host1 str : Source or "from" imap server. Mandatory.
--port1 int : Port to connect on host1. Default is 143, 993 if --ssl1
--user1 str : User to login on host1. Mandatory.
@@ -70,12 +81,12 @@ USAGE
--port2 int : Port to connect on host2. Default is 143, 993 if --ssl2
--user2 str : User to login on host2. Mandatory.
--password2 str : Password for the user2.
-
- --passfile1 str : Password file for the user1. It must contain the
+
+ --passfile1 str : Password file for the user1. It must contain the
password on the first line. This option avoids to show
the password on the command line like --password1 does.
--passfile2 str : Password file for the user2. Contains the password.
-
+
--ssl1 : Use a SSL connection on host1.
--ssl2 : Use a SSL connection on host2.
--tls1 : Use a TLS connection on host1.
@@ -86,45 +97,45 @@ USAGE
See all possibilities in the new() method of IO::Socket::SSL
http://search.cpan.org/perldoc?IO::Socket::SSL#Description_Of_Methods
--sslargs2 str : Pass any ssl parameter for host2 ssl or tls connection.
- See --sslargs1
-
- --timeout1 int : Connection timeout in seconds for host1.
+ See --sslargs1
+
+ --timeout1 int : Connection timeout in seconds for host1.
Default is 120 and 0 means no timeout at all.
- --timeout2 int : Connection timeout in seconds for host2.
+ --timeout2 int : Connection timeout in seconds for host2.
Default is 120 and 0 means no timeout at all.
-
+
--authmech1 str : Auth mechanism to use with host1:
PLAIN, LOGIN, CRAM-MD5 etc. Use UPPERCASE.
--authmech2 str : Auth mechanism to use with host2. See --authmech1
- --authuser1 str : User to auth with on host1 (admin user).
+ --authuser1 str : User to auth with on host1 (admin user).
Avoid using --authmech1 SOMETHING with --authuser1.
--authuser2 str : User to auth with on host2 (admin user).
--proxyauth1 : Use proxyauth on host1. Requires --authuser1.
Required by Sun/iPlanet/Netscape IMAP servers to
be able to use an administrative user.
--proxyauth2 : Use proxyauth on host2. Requires --authuser2.
-
+
--authmd51 : Use MD5 authentification for host1.
--authmd52 : Use MD5 authentification for host2.
--domain1 str : Domain on host1 (NTLM authentication).
--domain2 str : Domain on host2 (NTLM authentication).
-
-
+
+
--folder str : Sync this folder.
--folder str : and this one, etc.
--folderrec str : Sync this folder recursively.
--folderrec str : and this one, etc.
-
+
--folderfirst str : Sync this folder first. --folderfirst "Work"
--folderfirst str : then this one, etc.
--folderlast str : Sync this folder last. --folderlast "[Gmail]/All Mail"
--folderlast str : then this one, etc.
-
+
--nomixfolders : Do not merge folders when host1 is case sensitive
while host2 is not (like Exchange). Only the first
similar folder is synced (ex: Sent SENT sent -> Sent).
-
+
--skipemptyfolders : Empty host1 folders are not created on host2.
--f1f2 str1=str2 : Force folder str1 to be synced to str2.
@@ -136,12 +147,12 @@ USAGE
Several folders to avoid:
--exclude 'fold1|fold2|f3' skips fold1, fold2 and f3.
--exclude reg : or this one, etc.
-
- --subfolder2 str : Move whole host1 folders hierarchy under this
+
+ --subfolder2 str : Move whole host1 folders hierarchy under this
host2 folder str .
It does it by adding two --regextrans2 options before
all others. Add --debug to see what's really going on.
-
+
--regextrans2 reg : Apply the whole regex to each destination folders.
--regextrans2 reg : and this one. etc.
When you play with the --regextrans2 option, first
@@ -149,21 +160,21 @@ USAGE
Then, when happy, remove --dry, remove --justfolders.
Have in mind that --regextrans2 is applied after prefix
and separator inversion.
-
+
--tmpdir str : Where to store temporary files and subdirectories.
Will be created if it doesn't exist.
Default is system specific, Unix is /tmp but
it's often small and deleted at reboot.
--tmpdir /var/tmp should be better.
--pidfile str : The file where imapsync pid is written.
- --pidfilelocking : Abort if pidfile already exists. Usefull to avoid
+ --pidfilelocking : Abort if pidfile already exists. Usefull to avoid
concurrent transfers on the same mailbox.
-
+
--nolog : Turn off logging on file
--logfile str : Change the default log filename (can be dirname/filename).
--logdir str : Change the default log directory. Default is LOG_imapsync
- --prefix1 str : Remove prefix to all destination folders
+ --prefix1 str : Remove prefix to all destination folders
(usually INBOX. or INBOX/ or an empty string "")
you have to use --prefix1 if host1 imap server
does not have NAMESPACE capability, so imapsync
@@ -171,16 +182,16 @@ USAGE
--prefix2 str : Add prefix to all host2 folders. See --prefix1
--sep1 str : Host1 separator in case NAMESPACE is not supported.
--sep2 str : Host2 separator in case NAMESPACE is not supported.
-
+
--skipmess reg : Skips messages maching the regex.
Example: 'm/[\x80-ff]/' # to avoid 8bits messages.
--skipmess is applied before --regexmess
--skipmess reg : or this one, etc.
- --pipemess cmd : Apply this cmd command to each message content
+ --pipemess cmd : Apply this cmd command to each message content
before the copy.
--pipemess cmd : and this one, etc.
-
+
--disarmreadreceipts : Disarms read receipts (host2 Exchange issue)
--regexmess reg : Apply the whole regex to each message before transfer.
@@ -190,20 +201,20 @@ USAGE
--regexflag reg : Apply the whole regex to each flags list.
Example: 's/"Junk"//g' # to remove "Junk" flag.
--regexflag reg : and this one, etc.
-
- --delete : Deletes messages on host1 server after a successful
- transfer. Option --delete has the following behavior:
- it marks messages as deleted with the IMAP flag
- \Deleted, then messages are really deleted with an
+
+ --delete : Deletes messages on host1 server after a successful
+ transfer. Option --delete has the following behavior:
+ it marks messages as deleted with the IMAP flag
+ \Deleted, then messages are really deleted with an
EXPUNGE IMAP command.
--delete2 : Delete messages in host2 that are not in
host1 server. Useful for backup or pre-sync.
--delete2duplicates : Delete messages in host2 that are duplicates.
- Works only without --useuid since duplicates are
+ Works only without --useuid since duplicates are
detected with an header part of each message.
- --delete2folders : Delete folders in host2 that are not in host1 server.
+ --delete2folders : Delete folders in host2 that are not in host1 server.
For safety, first try it like this (it is safe):
--delete2folders --dry --justfolders --nofoldersizes
--delete2foldersonly reg : Deleted only folders matching regex.
@@ -212,8 +223,8 @@ USAGE
Example: --delete2foldersbutnot "/Tasks$|Contacts$|Foo$/"
--noexpunge : Do not expunge messages on host1.
Expunge really deletes messages marked deleted.
- Expunge is made at the beginning, on host1 only.
- Newly transferred messages are also expunged if
+ Expunge is made at the beginning, on host1 only.
+ Newly transferred messages are also expunged if
option --delete is given.
No expunge is done on host2 account (unless --expunge2)
--expunge1 : Expunge messages on host1 after messages transfer.
@@ -221,13 +232,13 @@ USAGE
--uidexpunge2 : uidexpunge messages on the host2 account
that are not on the host1 account, requires --delete2
--nomixfolders : Avoid merging folders that are considered different on
- host1 but the same on destination host2 because of
+ host1 but the same on destination host2 because of
case sensitivities and insensitivities.
-
+
--syncinternaldates : Sets the internal dates on host2 same as host1.
Turned on by default. Internal date is the date
a message arrived on a host (mtime).
- --idatefromheader : Sets the internal dates on host2 same as the
+ --idatefromheader : Sets the internal dates on host2 same as the
"Date:" headers.
--maxsize int : Skip messages larger (or equal) than int bytes
@@ -242,48 +253,48 @@ USAGE
past|+++++++++++++++minage---->now
past|----maxage+++++minage---->now (intersection)
past|++++minage-----maxage++++>now (union)
-
- --search str : Selects only messages returned by this IMAP SEARCH
+
+ --search str : Selects only messages returned by this IMAP SEARCH
command. Applied on both sides.
--search1 str : Same as --search for selecting host1 messages only.
--search2 str : Same as --search for selecting host2 messages only.
--search CRIT equals --search1 CRIT --search2 CRIT
-
+
--exitwhenover int : Stop syncing when total bytes transferred reached.
- Gmail per day allows
+ Gmail per day allows
2500000000 = 2.5 GB downloaded from Gmail as host2
500000000 = 500 MB uploaded to Gmail as host1.
-
+
--maxlinelength int : skip messages with a line length longer than int bytes.
RFC 2822 says it must be no more than 1000 bytes.
--useheader str : Use this header to compare messages on both sides.
Ex: Message-ID or Subject or Date.
--useheader str and this one, etc.
-
+
--subscribed : Transfers subscribed folders.
- --subscribe : Subscribe to the folders transferred on the
+ --subscribe : Subscribe to the folders transferred on the
host2 that are subscribed on host1. On by default.
- --subscribeall : Subscribe to the folders transferred on the
+ --subscribeall : Subscribe to the folders transferred on the
host2 even if they are not subscribed on host1.
-
+
--nofoldersizes : Do not calculate the size of each folder in bytes
and message counts. Default is to calculate them.
--nofoldersizesatend: Do not calculate the size of each folder in bytes
and message counts at the end. Default is on.
--justfoldersizes : Exit after having printed the folder sizes.
-
+
--syncacls : Synchronises acls (Access Control Lists).
--nosyncacls : Does not synchronize acls. This is the default.
Acls in IMAP are not standardized, be careful.
-
+
--usecache : Use cache to speedup.
--nousecache : Do not use cache. Caveat: --useuid --nousecache creates
duplicates on multiple runs.
- --useuid : Use uid instead of header as a criterium to recognize
- messages. Option --usecache is then implied unless
- --nousecache is used.
-
+ --useuid : Use uid instead of header as a criterium to recognize
+ messages. Option --usecache is then implied unless
+ --nousecache is used.
+
--debug : Debug mode.
--debugfolders : Debug mode for the folders part only.
--debugcontent : Debug content of the messages transfered. Huge ouput.
@@ -296,7 +307,7 @@ USAGE
--errorsmax int : Exit when int number of errors is reached. Default is 50.
--tests : Run local non-regression tests. Exit code 0 means all ok.
- --testslive : Run a live test with test1.lamiral.info imap server.
+ --testslive : Run a live test with test1.lamiral.info imap server.
Useful to check the basics. Needs internet connexion.
--version : Print only software version.
@@ -305,19 +316,19 @@ USAGE
--noid : Do not send/receive ID command to imap servers.
--justconnect : Just connect to both servers and print useful
information. Need only --host1 and --host2 options.
- --justlogin : Just login to both host1 and host2 with users
+ --justlogin : Just login to both host1 and host2 with users
credentials, then exit.
--justfolders : Do only things about folders (ignore messages).
--help : print this help.
- Example:
- To synchronize the source imap account
- "test1" on server "test1.lamiral.info" with password "secret1"
- to the destination imap account
+ Example:
+ To synchronize the source imap account
+ "test1" on server "test1.lamiral.info" with password "secret1"
+ to the destination imap account
"test2" on server "test2.lamiral.info" with password "secret2"
do:
-
+
imapsync \
--host1 test1.lamiral.info --user1 test1 --password1 secret1 \
--host2 test2.lamiral.info --user2 test2 --password2 secret2
@@ -365,6 +376,8 @@ OPTIONS
imapsync
+ or read the previous section named USAGE,
+
or read http://imapsync.lamiral.info/OPTIONS
HISTORY
@@ -429,15 +442,21 @@ EXIT STATUS
So if you have an unreliable internet connection, you can use this loop
in a Bourne shell:
- while ! imapsync ...; do
+ while ! imapsync ...; do
echo imapsync not complete
done
-LICENSE
+LICENSE AND COPYRIGHT
imapsync is free, open, public but not always gratis software cover by
the NOLIMIT Public License. See the LICENSE file included in the
distribution or just read this simple sentence as it is the licence
- text: No limit to do anything with this work and this license.
+ text:
+
+ "No limit to do anything with this work and this license."
+
+ In case it is not long enough I repeat:
+
+ "No limit to do anything with this work and this license."
MAILING-LIST
The public mailing-list may be the best way to get free support.
@@ -473,13 +492,13 @@ AUTHOR
good way to stay maintening and supporting free open public softwares
(see the license) over decades.
-BUG REPORT GUIDELINES
+BUGS AND LIMITATIONS
Help me to help you: follow the following guidelines.
Report any bugs or feature requests to the public mailing-list or to the
author.
- Before reporting bugs, read the FAQ, the README and the TODO files.
+ Before reporting bugs, read the FAQs, the README and the TODO files.
http://imapsync.lamiral.info/
Upgrade to last imapsync release, maybe the bug is already fixed.
@@ -498,23 +517,23 @@ BUG REPORT GUIDELINES
- imapsync version.
- output near the first failures, a few lines before is good to get the context
- of the issue. First failures messages are often more significant than
- the last ones.
-
- - if the issue is always related to the same messages, include the output
- with --debug --debugimap, near the failure point. For example,
- Isolate a buggy message or two in a folder 'BUG' and use
+ of the issue. First failures messages are often more significant than
+ the last ones.
- imapsync ... --folder 'BUG' --debug --debugimap
+ - if the issue is always related to the same messages, include the output
+ with --debug --debugimap, near the failure point. For example,
+ Isolate a buggy message or two in a folder 'BUG' and use
+
+ imapsync ... --folder 'BUG' --debug --debugimap
- imap server softwares on both sides and their version number.
- imapsync with all the options you use, the full command line
- you use (except the passwords of course).
+ you use (except the passwords of course).
- IMAPClient.pm version.
- - the run context. Do you run imapsync.exe, a unix binary
+ - the run context. Do you run imapsync.exe, a unix binary
or the perl script imapsync.
- operating system running imapsync.
@@ -554,7 +573,7 @@ HUGE MIGRATION
On Unix the shell program can be:
- { while IFS=';' read u1 p1 u2 p2; do
+ { while IFS=';' read u1 p1 u2 p2; do
imapsync --host1 imap.side1.org --user1 "$u1" --password1 "$p1" \
--host2 imap.side2.org --user2 "$u2" --password2 "$p2" ...
done ; } < file.txt
@@ -571,10 +590,10 @@ HUGE MIGRATION
You will find already written scripts at
http://imapsync.lamiral.info/examples/
-Hacking
+HACKING
Feel free to hack imapsync as the NOLIMIT license permits it.
-Links
+LINKS
Entries for imapsync:
https://web.archive.org/web/20070202005121/http://www.imap.org/products/
showall.php
@@ -598,5 +617,5 @@ SIMILAR SOFTWARES
Feedback (good or bad) will often be welcome.
- $Id: imapsync,v 1.684 2016/03/17 08:35:03 gilles Exp gilles $
+ $Id: imapsync,v 1.727 2016/08/19 10:30:36 gilles Exp gilles $
diff --git a/S/S b/S/S
new file mode 120000
index 0000000..945c9b4
--- /dev/null
+++ b/S/S
@@ -0,0 +1 @@
+.
\ No newline at end of file
diff --git a/S/bc-payment.html b/S/bc-payment.html
index 5a59931..d1eaa34 100755
--- a/S/bc-payment.html
+++ b/S/bc-payment.html
@@ -1,11 +1,13 @@
-
+
-Pay with bitcoins
-
+Pay with bitcoins
+
+
+
diff --git a/S/external.shtml b/S/external.shtml
index 7d08d84..25cdaac 100755
--- a/S/external.shtml
+++ b/S/external.shtml
@@ -42,6 +42,8 @@
http://freecode.com/projects/imap-repl/
@@ -98,7 +100,7 @@ alt="Viewable With Any Browser" />
This document last modified on
-($Id: external.shtml,v 1.6 2016/03/03 22:36:57 gilles Exp gilles $)
+($Id: external.shtml,v 1.7 2016/03/19 22:05:24 gilles Exp gilles $) Top of the page
diff --git a/S/fb-like.html b/S/fb-like.html
old mode 100755
new mode 100644
index a6cfbf1..97b326e
--- a/S/fb-like.html
+++ b/S/fb-like.html
@@ -1,3 +1,8 @@
+
+
+
+
+
Imapsync list of imap server softwares supported (and the failures one)
-
-
-
+
+
+
@@ -29,23 +29,25 @@
Let's start with the long reported success stories list:
-66 different imap server softwares supported!
+67 different imap server softwares supported!
[host1] means "source server" and [host2] means "destination server":
Please report to the author (gilles.lamiral@laposte.net) any success or bad story with
-imapsync and do not forget to mention the IMAP server
+imapsync and, if you know them, mention the IMAP server
software names and version on both sides. This will help
-future users. To help the author maintaining this section
-report the two lines at the begining of the output if they
-are useful to know the softwares. Example:
+future users. You can grab these values, software name and release number,
+by looking at two lines at the beginning of the output. Example:
+
- Host1 software:* OK louloutte Cyrus IMAP4 v1.5.19 server ready
- Host2 software:* OK Courier-IMAP ready
+ ...
+ Host1 banner:* OK louloutte Cyrus IMAP4 v1.5.19 server ready
+ Host2 banner:* OK Courier-IMAP ready
+
You can use option --justconnect to get those lines.
-Examples:
Discuss or search on the English imapsync mailing-list (back to menu)
+
+
+
+
+ The English public mailing-list may be the best way to get free and gratis support (not as quick as the professional support).
+ You can write to the mailing-list even if you're not subscribed to it.
+ In that case you will receive a confirmation message each time you post (to avoid spam).
+
+
+
+ To write on the mailing-list, the address is:
+ imapsync@linux-france.org (English language list, hosted in France)
+
+
+
+ To subscribe, send a message to:
+ imapsync-subscribe@listes.linux-france.org
+
+
+
+ To unsubscribe, send a message to:
+ imapsync-unsubscribe@listes.linux-france.org
+
+
+
+ To contact the person in charge for the list:
+ imapsync-request@listes.linux-france.org
+
+
+
+ The list archives are available at
+
+ http://linux-france.org/prj/imapsync_list/
+ So consider that the list is public, anyone can see your post.
+ Use a pseudonym or do not post to
+ this list if you want to stay private.
+
+
+
+
+
+Thank you for your participation to the English imapsync mailing-list!
+
News about imapsync and previous releases (back to menu)
+
News about next imapsync, currently distributed , next and previous releases (back to menu)
imapsync was written on
-
-
-
-
-
See ChangeLog to read what has been done in details since 2001.
New features or bugfixes since previous releases:
+
+
+
1.727 https website and CGI on the way!
+
+
+
Security: Thanks to free and easy letsencrypt,
+Imapsync website is available in https:
+https://imapsync.lamiral.info/
+
+
+
Enhancement: Added option --delete1emptyfolders. It deletes empty folders on host1, INBOX excepted.
+Useful with --delete since what remains on host1 is only what failed to be synced.
+
+
Enhancement: Imapsync can be used as a CGI program. Still experimental. The web UI interface has to be written.
+
Enhancement: XOAUTH2 authentication works with json files without extra tool openssl. Old pk12 files are still supported (still with openssl).
+
Enhancement: Memory usage passed from 5x to 2x of the biggest message size.
+Some users do send 700MB messages, imapsync needed 3.5 GB of RAM, now it crunches only 1.4 GB,
+a more common RAM value available on small hosts.
+
+
Enhancement: Added option --inet4 to force ipv4 in ssl and tls modes.
+Useful with Gmail and Office365 when ipv6 is disable on the imapsync host but not ipv6 resolution.
+
+
Enhancement: Reconnect to imap servers with a Ctrl-c. Exit with two Ctrl-c within one second or one Ctrl-\
+
Enhancement: Copy is not done when one --pipemess command ends with an empty message generated.
+
Enhancement: STDERR of --pipemess commands are reported on STDOUT and in the logfile (they were ignored before).
+
Enhancement:
+
+
Dependency: Added Perl module dependency of Readonly to transform hard coded magic numbers into names. Mandatory module.
+
Dependency: Added Perl module dependency of Test::MockObject for some tests. Only a "require" for now.
+
+
+
Security: In CGI mode, remove all content in the unsafe "eval"uated options
+ (--regextrans2 --regexflag --regexmess --skipmess --pipemess --delete2foldersonly --delete2foldersbutnot).
+ Consider these options not available in CGI mode.
+
+
+
Bug fix: Fixed -1 wrong output in statistics for big accounts (%d => %s) in printf.
+
Bug fix: Uncommented call to $test_builder->reset( ) Don't know why it was commented but it was bad for knowing tests go wrong.
+
Bug fix: Check connected state in sub create_folder(). Avoid multiple useless failures.
+
+
+
Refactoring: Wrote Perl package Imapsync::Getopt::Long to handle CGI requests like command line options.
+Started as a copy of Luke Ross Getopt::Long::CGI
+
Refactoring: Perlcritic cleanup 627 violations of CodeLayout::ProhibitTrailingWhitespace.