1
0
mirror of https://github.com/imapsync/imapsync.git synced 2024-11-16 15:52:47 +01:00
This commit is contained in:
Nick Bebout 2015-08-03 20:44:40 -05:00
parent 9ff89e7df2
commit 4a1d71d8fd
53 changed files with 5656 additions and 10351 deletions

4
.gitignore vendored
View File

@ -1,5 +1,7 @@
imapsync_elf_x86.bin
imapsync_bin_Darwin
imapsync_bin_Linux_i686
imapsync_bin_Linux_i686_petite
*~
debian/*.log
debian/*.subvars

View File

@ -1,5 +1,5 @@
#!/bin/cat
# $Id: CREDITS,v 1.181 2014/09/19 19:46:35 gilles Exp gilles $
# $Id: CREDITS,v 1.182 2015/05/26 10:16:16 gilles Exp gilles $
If you want to make a donation to me, imapsync author, Gilles LAMIRAL,
use any of the following ways:
@ -24,6 +24,10 @@ I thank very much all of these people.
I thank also very much all people who bought imapsync from the homepage
but I don't cite them here.
Ingo Wichmann
Contributed by giving the book
14.95 USD "Rambles Through My Library"
David Karnowski.
Suggested --disarm_read_receipts for its regex.

View File

@ -1,17 +1,48 @@
RCS file: RCS/imapsync,v
Working file: imapsync
head: 1.637
head: 1.644
branch:
locks: strict
gilles: 1.637
gilles: 1.644
access list:
symbolic names:
keyword substitution: kv
total revisions: 637; selected revisions: 637
total revisions: 644; selected revisions: 644
description:
----------------------------
revision 1.637 locked by: gilles;
revision 1.644 locked by: gilles;
date: 2015/07/17 01:22:52; author: gilles; state: Exp; lines: +9 -7
Added NOOP in --dry mode during fake APPEND.
----------------------------
revision 1.643
date: 2015/06/24 01:01:00; author: gilles; state: Exp; lines: +17 -10
Added --fetch_hash_set "1:*" to permit Mail2World success.
Need a patched Mail::IMAPClient 3.35 in sub fetch_hash()
See https://rt.cpan.org/Public/Bug/Display.html?id=105456
----------------------------
revision 1.642
date: 2015/05/11 01:07:37; author: gilles; state: Exp; lines: +9 -6
Added JSON::WebToken in modules list.
----------------------------
revision 1.641
date: 2015/05/09 17:52:27; author: gilles; state: Exp; lines: +27 -128
Replaced imap servers software list by a link to the web list.
Added option --subfolder2 SUB Move whole host1 folders hierarchy under folder SUB.
----------------------------
revision 1.640
date: 2015/05/05 01:03:34; author: gilles; state: Exp; lines: +18 -12
No folders sizes if --justfolders, unless really wanted.
----------------------------
revision 1.639
date: 2015/04/16 19:33:59; author: gilles; state: Exp; lines: +7 -7
*** empty log message ***
----------------------------
revision 1.638
date: 2015/04/09 22:47:24; author: gilles; state: Exp; lines: +19 -11
No warning about messages when --dry --justfolders together.
----------------------------
revision 1.637
date: 2015/04/01 01:36:37; author: gilles; state: Exp; lines: +9 -9
Bugfix. Win32 regression with long_path_2_prefix test. Was too long.
----------------------------

507
FAQ
View File

@ -1,11 +1,12 @@
#!/bin/cat
# $Id: FAQ,v 1.205 2015/03/26 08:13:29 gilles Exp gilles $
# $Id: FAQ,v 1.209 2015/05/09 20:53:23 gilles Exp gilles $
+------------------+
| FAQ for imapsync |
+------------------+
+-------------------+
| FAQs for imapsync |
+-------------------+
http://imapsync.lamiral.info/FAQ
http://imapsync.lamiral.info/FAQ.d/
Unix versus Windows syntax.
There are several differences between Unix and Windows
@ -180,10 +181,11 @@ R. Yes
Q. How can I fix this?
R. The cache path reflects hostnames or ip addresses, just change the
directory names of host1 or host2. Use --dry to see if next runs
will generate duplicates.
By default the cache is like
R. The cache path reflects exactly hostnames or ip addresses given via
--host1 and --host2 values. So just change the directory names
of host1 or host2. Use --dry to see if next runs will generate
duplicates.
By default on Unix the cache is like
/tmp/imapsync_cache/host1/user1/host2/user2/...
@ -414,7 +416,8 @@ synchronization of mailboxes? Is there a better solution?
R. If messages are delivered remotely and you play locally with the
copy, in order to have fast access, then the synchronization can't
be one way. You may change flags, you may move messages in
different folders etc.
different folders etc. The issue described is clearly
two-ways sync.
A better tool with this scenario is offlineimap,
designed for this issue, and faster than imapsync.
@ -500,22 +503,19 @@ The result is that you can have more messages on host1 than on host2.
R2. With option --useuid imapsync doesn't use headers to identify
messages on both sides but it uses their imap uid. In that case
duplicates on host1 are transfered on host2.
=======================================================================
Q. How can I remove duplicates on a unique host
R. Just run imapsync on the same account with option --delete2,
ie with host1 == host2 and user1 == user2
duplicates on host1 are transferred on host2.
=======================================================================
Q. I need to log every output on a file named log.txt
R. Use redirections of both standard and error outputs "> log.txt 2>&1"
R1. imapsync logs on a file by default, its name is given at the
beginning and the end of each run. This name is unique since
it is compound of the current date and time and user2 value.
imapsync ... > log.txt 2>&1
R2. To change this default name, use --logfile log.txt
imapsync ... --logfile log.txt
This syntax is available both on Windows and Unix.
=======================================================================
Q. I need to log every output on a file named log.txt and also to the
@ -617,8 +617,8 @@ R. imapsync does not POP3 but I think you mean UID in IMAP.
Q. Is it possible to sync also the UIDs of the IMAP server?
UIDs in IMAP are chosen and created by the servers, not by the clients,
imapsync is a client. So UIDs can not be synced by any method,
unless the server is duplicated as is.
imapsync is a client. So UIDs cannot be synced by any imap method.
UIDs might be synced via a rsync command on the server part.
=======================================================================
Q. The option --subscribe does not seem to work
@ -684,270 +684,6 @@ Full explanation:
past|----maxage+++++minage---->now (intersection)
past|++++minage-----maxage++++>now (union)
=======================================================================
Q. Does imapsync retain the \Answered and $Forwarded flags?
R. It depends on the destination server.
a) If the destination server honors the "PERMAENTFLAGS \*"
directive (meaning it accepts any flag) or no PERMAENTFLAGS at all
then imapsync synchronizes all flags except the \Recent flag
(RFC 3501 says about \Recent flag "This flag can not be
altered by the client.").
b) If the destination server honors the "PERMAENTFLAGS without the
special "\*" then imapsync synchronizes only the flags listed
in PERMANENTFLAGS.
Some imap servers have problems with flags not beginning with
the backslash character \
(see next question to find a solution to this issue)
=======================================================================
Q. Is there a way to only sync messages with a specific flag set,
for example, the \Seen flag?
R. use --search
imapsync ... --search SEEN
or
imapsync ... --search UNSEEN
or ...
The complete list of search things are listed below
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 <string>
Messages that contain the specified string in the envelope
structure's BCC field.
BEFORE <date>
Messages whose internal date (disregarding time and timezone)
is earlier than the specified date.
BODY <string>
Messages that contain the specified string in the body of the
message.
CC <string>
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 <string>
Messages that contain the specified string in the envelope
structure's FROM field.
HEADER <field-name> <string>
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 <flag>
Messages with the specified keyword flag set.
LARGER <n>
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 <search-key>
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 <date>
Messages whose internal date (disregarding time and timezone)
is within the specified date.
OR <search-key1> <search-key2>
Messages that match either search key.
RECENT
Messages that have the \Recent flag set.
SEEN
Messages that have the \Seen flag set.
SENTBEFORE <date>
Messages whose [RFC-2822] Date: header (disregarding time and
timezone) is earlier than the specified date.
SENTON <date>
Messages whose [RFC-2822] Date: header (disregarding time and
timezone) is within the specified date.
SENTSINCE <date>
Messages whose [RFC-2822] Date: header (disregarding time and
timezone) is within or later than the specified date.
SINCE <date>
Messages whose internal date (disregarding time and timezone)
is within or later than the specified date.
SMALLER <n>
Messages with an [RFC-2822] size smaller than the specified
number of octets.
SUBJECT <string>
Messages that contain the specified string in the envelope
structure's SUBJECT field.
TEXT <string>
Messages that contain the specified string in the header or
body of the message.
TO <string>
Messages that contain the specified string in the envelope
structure's TO field.
UID <sequence set>
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 <flag>
Messages that do not have the specified keyword flag set.
UNSEEN
Messages that do not have the \Seen flag set.
=======================================================================
Q. How to convert flags?
R. use --regexflag
For example to convert flag IMPORTANT to flag CANWAIT
imapsync ... --regexflag "s/IMPORTANT/CANWAIT/g" --debugflags
option --debugflags is usefull to see in details what imapsync
does with flags.
=======================================================================
Q. How to fix this error: BAD Invalid system flag \FORWARDED
R. Filter flag \FORWARDED with --regexflag like this:
On Windows:
imapsync ... --regexflag "s/\\FORWARDED//g"
On Unix:
imapsync ... --regexflag 's/\\FORWARDED//g'
or
imapsync ... --regexflag "s/\\\\FORWARDED//g"
=======================================================================
Q. How to convert flags with $ to \ character?
R. $ and \ are special characters we have to "escape" them.
For example to convert flag $label1 to \label1
imapsync ... --regexflag "s/\$label1/\\label1/g" --debugflags
=======================================================================
Q. I need to keep only a defined list of flags, how can I do?
The destination imap server complains about bad flags (Exchange).
R1. Recent imapsync deals with this issue by filter with PERMANENTFLAGS
automatically.
R2. For example if you want to keep only the following flags
\Seen \Answered \Flagged \Deleted \Draft
then use these magic --regexflag options (thanks to Phil):
--regexflag 's/.*?(?:(\\(?:Answered|Flagged|Deleted|Seen|Draft)\s?)|$)/defined($1)?$1:q()/eg'
Analysis is left to the reader.
This one is longer and may be use with old perl (no /e regex extension):
--regexflag 's/(.*)/$1 jrdH8u/' \
--regexflag 's/.*?(\\Seen|\\Answered|\\Flagged|\\Deleted|\\Draft|jrdH8u)/$1 /g' \
--regexflag 's/(\\Seen|\\Answered|\\Flagged|\\Deleted|\\Draft|jrdH8u) (?!(\\Seen|\\Answered|\\Flagged|\\Deleted|\\Draft|jrdH8u)).*/$1 /g' \
--regexflag 's/jrdH8u *//'
======================================================================
Q. imapsync fails with the following error:
flags from : [\Seen NonJunk]["10-Aug-2006 13:00:30 -0400"]
Error trying to append string: 58 NO APPEND Invalid flag list
R. For some servers, flags have to begin with a \ character.
The flag "NonJunk" may be a invalid flag for your server
so use for example:
imapsync ... --regexflag "s/NonJunk//g"
Remark (thanks to Arnt Gulbrandsen):
IMAP system flags have to begin with \ character.
Any other flag must begin with another character.
System flags are just flags defined by an RFC instead of by users.
Conclusion, some imap server coders don't read the RFCs (so do I).
Recent imapsync deals with this issue by filter with PERMANENTFLAGS
automatically.
=======================================================================
Q. Flags are not well synchronized. Is it a bug?
R. It happens with some servers on the first sync.
Also, it was a bug from revision 1.200 to revision 1.207
Two solutions:
* Run imapsync a second time. imapsync synchronizes flags on each run.
* Use option --syncflagsaftercopy. With this option imapsync will
also sync flags after each message transfer. Flags are already
synced during the transfer with the imap APPEND command but
option --syncflagsaftercopy does it again using the imap STORE
command.
=======================================================================
Q. On Unix, some passwords contain * and " characters. Login fails.
@ -1067,61 +803,6 @@ b) or use stunnel :
c) or use stunnel on inetd
imaps stream tcp nowait cyrus /usr/sbin/stunnel -s cyrus -p /etc/ssl/certs/imapd.pem -r localhost:imap2
=======================================================================
Q: Multiple copies, duplicates, when I run imapsync twice ore more.
R1. You can use option --useuid, imapsync then won't use header lines to
compare messages in folders. Keep in ming it uses a local cache.
imapsync ... --useuid
R2. Multiple copies of the emails on the destination server. Some IMAP
servers (Domino for example) change some headers for each message
transferred. All messages are transferred again and again each time you
run imapsync. This is bad of course. The explanation is that imapsync
considers messages are not the same on each side, default headers used
to identify the messages have changed.
You can look at the headers found by imapsync by using the --debug
option (and search for the message on both part), Header lines from
the source server begin with a "FH:" prefix, Header lines from the
destination server begin with a "TH:" prefix. Since --debug is very
verbose I suggest to isolate a email in a specific folder in case you
want to forward me the output.
A way to avoid this problem is by using option --useheader with
a different set than the default ones used by imapsync.
The default set is like:
imapsync ... --useheader "Message-ID" --useheader "Received"
The big problem is that what can be used instead of Message-ID
and Received lines? Sometimes standalone Message-ID works:
imapsync ... --useheader "Message-ID"
Another good way to the solution is to isolate two or three messages
in a BUG folder and send the --debug output to the author
gilles.lamiral@laposte.net
imapsync ... --debug --folder BUG
I will take a close look at the log and modify imapsync to fix
this faulty duplicate behaviour.
Remark. (Trick found by Tomasz Kaczmarski)
Option --useheader "Message-ID" asks the server to send only header
lines beginning with "Message-ID". Some (buggy) servers send the whole
header (all lines) instead of the "Message-ID" line. In that case, a
trick to keep the --useheader filtering behaviour is to use
--skipheader with a negative lookahead pattern :
imapsync ... --skipheader "^(?!Message-ID)"
Read it as "skip every header except Message-ID".
======================================================================
Q. I am transferring mails from one IMAP server to another. I am using
an SSL connection. Transferring huge mails (>10MB) takes ages.
@ -1311,148 +992,20 @@ In imapsync, you can achieve this by using the following options:
Q. Is there anyway of making imapsync purge the destination folder
when the source folder is deleted?
R. No, that's too dangerous. May be coded in future release.
R. Yes, use --delete2folders
But if the source folder is empty (not deleted) and options --delete2
--expunge2 are used then the destination folder will be empty.
--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 <regex>: Deleted only folders matching regex.
Example: --delete2foldersonly "/^Junk$|^INBOX.Junk$/"
--delete2foldersbutnot <regex>: Do not delete folders matching regex.
Example: --delete2foldersbutnot "/Tasks$|Contacts$|Foo$/"
======================================================================
Q. Is it possible to synchronize all messages from one server to
another without recreating the folder structure and the target server.
R. Yes.
For example, to synchronize all messages in all folders on host1
to folder INBOX only on host2:
1) First try (safe mode):
imapsync \
...
--regextrans2 "s/(.*)/INBOX/" \
--dry --justfolders
2) See if the output says everything you want imapsync to do,
--dry option is safe and does nothing real.
3) Remove --dry
Check the imap folder tree on the target side, you should
only have one: the classical INBOX.
4) Remove --justfolders
======================================================================
Q. I have moved from Braunschweig to Graz, so I would like to have my
whole Braunschweig mail sorted into a sub-folder INBOX.Braunschweig
of my new mail account.
R.
1) First try (safe mode):
imapsync \
...
--regextrans2 "s/INBOX(.*)/INBOX.Braunschweig\$1/" \
--dry --justfolders
On Windows, in the previous example containing \$1 you have to
replace the two \$1 by $1 (remove the \ before $).
2) See if the output says everything you want imapsync to do,
--dry option is safe and does nothing real.
3) Remove --dry
Check the imap folder tree on the target side
4) Remove --justfolders
=======================================================================
Q. Give examples about --regextrans2
R. --regextrans2 is used to transform folder names
Remember that --regextrans2 applies after the default
inversion prefix1 <-> prefix2 and sep1 <-> sep2
Examples:
0) First try with --dry --justfolders options since imapsync shows the
transformations it will do without really doing them. Then when
happy with the output remove the --dry --justfolders options.
1) To remove INBOX. in the name of destination folders:
--regextrans2 's/^INBOX\.(.+)/$1/'
2a) To sync all folders to INBOX:
imapsync ... --regextrans2 "s/.*/INBOX/"
2b) To sync a complete account in a subfolder called FOO:
a) Seperator is dot character "." and "INBOX" prefixes every folder
--regextrans2 's/^INBOX(.*)/INBOX.FOO$1/'
or:
b) Seperator is slash character "/" and there is no prefix
--regextrans2 's#(.*)#FOO/$1#'
or:
c) Any separator, any prefix solution, FOO is the subfolder:
It is a complicated line because every case is taken into account.
Type it in one line (or with the \ at the end of first line on Unix shells.
--regextrans2 's,${h2_prefix}(.*),${h2_prefix}FOO${h2_sep}$1,' \
--regextrans2 's,^INBOX$,${h2_prefix}FOO{h2_sep}INBOX,'
3) to substitute all characters dot "." by underscores "_"
--regextrans2 's/\./_/g'
4) to change folder names like this:
[mail/Sent Items] -> [Sent]
[mail/Test] -> [INBOX/Test]
[mail/Test2] -> [INBOX/Test2]
--regextrans2 's#^mail/Sent Items$#Sent#' \
--regextrans2 's#^mail/#INBOX/#'
=======================================================================
Q. I would like to move emails from InBox to a sub-folder called,
say "2010-INBOX" based on the date (Like all emails received in the
Year 2010 should be moved to the folder called "2010-INBOX").
R. 2 ways :
a) Manually:
------------
1) You create a folder INBOX.2010-INBOX
2) Mostly every email software allow sorting by date. In INBOX, you
select from 1 January to 31 December 2010 messages with the shift key.
(in mutt, use ~d)
3) Cut/paste in INBOX.2010-INBOX
b) With imapsync:
-----------------
imapsync ... \
--search 'SENTSINCE 1-Jan-2010 SENTBEFORE 31-Dec-2010'
--regextrans2 's/^INBOX$/INBOX.2010-INBOX/' \
--folder INBOX
=======================================================================
Q. I want to play with headers line and --regexmess but I want to leave
the body as is
the body as is.
R. The header/body separation is a blank line so an example:
--regexmess 's{\A(.*?(?! ^$))^Date:(.*?)$}{$1Date:$2\nX-Date:$2}gxms'

88
FAQ.d/FAQ.Duplicates.txt Normal file
View File

@ -0,0 +1,88 @@
#!/bin/cat
$Id: FAQ.Duplicates.txt,v 1.3 2015/04/02 23:40:08 gilles Exp gilles $
======================================================================
Imapsync and message duplicates issues
======================================================================
=======================================================================
Q. How can I remove duplicates in an lone account?
R. Just run imapsync on the same account with option --delete2,
ie with host1 == host2 and user1 == user2
=======================================================================
Q: Multiple copies, duplicates, when I run imapsync twice ore more.
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.
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.
imapsync ... --useuid
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.
R2.
Best way if you can follow it.
Multiple copies of the emails on the destination server. Some IMAP
servers (Domino for example) change some headers for each message
transferred. All messages are transferred again and again each time you
run imapsync. This is bad of course. The explanation is that imapsync
considers messages are not the same on each side, default headers used
to identify the messages have changed.
You can look at the headers found by imapsync by using the --debug
option (and search for the message on both part), Header lines from
the source server begin with a "FH:" prefix, Header lines from the
destination server begin with a "TH:" prefix. Since --debug is very
verbose I suggest to isolate a email in a specific folder in case you
want to forward me the output.
A way to avoid this problem is by using option --useheader with
a different set than the default ones used by imapsync.
The default set is like:
imapsync ... --useheader "Message-Id" --useheader "Received"
The big problem is that what can be used instead of Message-Id
and Received lines? Often standalone Message-Id works:
imapsync ... --useheader "Message-Id"
Another good way toward a solution is to isolate two or three messages
in a BUG folder and send me the --debug output by email at
gilles.lamiral@laposte.net
imapsync ... --debug --folder BUG
I will take a close look at the log and modify imapsync to fix
this faulty duplicate behaviour.
Remark. (Trick found by Tomasz Kaczmarski)
Option --useheader "Message-Id" asks the server to send only header
lines beginning with "Message-Id". Some (buggy) servers send the whole
header (all lines) instead of the "Message-Id" line. In that case, a
trick to keep the --useheader filtering behaviour is to use
--skipheader with a negative lookahead pattern:
imapsync ... --skipheader "^(?!Message-Id)"
Read it as "skip every header except Message-Id".
=======================================================================

View File

@ -1,5 +1,5 @@
#!/bin/cat
$Id: FAQ.Exchange.txt,v 1.2 2015/03/16 15:11:32 gilles Exp gilles $
$Id: FAQ.Exchange.txt,v 1.4 2015/06/03 15:33:48 gilles Exp gilles $
=======================================================================
Exchange 20xx and Office365 specific issues and solutions
@ -16,11 +16,12 @@ R. Here is a command line resume that solves most encountered issues when
On Windows:
imapsync ... ^
imapsync.exe ... ^
--maxsize 10000000 ^
--maxlinelength 9900 ^
--regexflag "s/\\Flagged//g" ^
--disarmreadreceipts
--disarmreadreceipts ^
--maxlinelength 9000
On Unix:
@ -29,7 +30,12 @@ On Unix:
--maxsize 10000000 \
--maxlinelength 9900 \
--regexflag "s/\\Flagged//g" \
--disarmreadreceipts
--disarmreadreceipts \
--maxlinelengthcmd 'reformime -r7'
To get the "reformime" command on Linux install the "maildrop" package
No "reformime" on Windows so for now messages with too long line length
can't be synced to Exchange or Office365.
=======================================================================
@ -197,7 +203,8 @@ So don't use --authmech1 SOMETHING with --authuser1 admin_user,
it will not work.
Same behavior with the --authuser2 option.
See also:
http://www.linux-france.org/prj/imapsync_list/msg02203.html

282
FAQ.d/FAQ.Flags.txt Normal file
View File

@ -0,0 +1,282 @@
#!/bin/cat
$Id: FAQ.Flags.txt,v 1.3 2015/04/03 21:05:11 gilles Exp gilles $
======================================================================
Imapsync and flags
======================================================================
Questions answered here are:
Q. How to debug flag issues?
Q. Is there a way to only sync messages with a specific flag set,
for example, the \Seen flag?
Q. How to convert flags?
Q. Does imapsync retain the \Answered and $Forwarded flags?
Q. How to fix this error: BAD Invalid system flag \FORWARDED
Q. How to convert flags with $ to \ character?
Q. imapsync fails with the following error:
flags from : [\Seen NonJunk]
Error trying to append string: 58 NO APPEND Invalid flag list
Q. Flags are not well synchronized. Is it a bug?
=======================================================================
Q. How to debug flag issues?
R. Use --debugflags
imapsync ... --debugflags
=======================================================================
Q. Is there a way to only sync messages with a specific flag set,
for example, the \Seen flag?
R. use --search
imapsync ... --search SEEN
or
imapsync ... --search UNSEEN
or ...
The complete list of search things are listed below
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 <string>
Messages that contain the specified string in the envelope
structure's BCC field.
BEFORE <date>
Messages whose internal date (disregarding time and timezone)
is earlier than the specified date.
BODY <string>
Messages that contain the specified string in the body of the
message.
CC <string>
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 <string>
Messages that contain the specified string in the envelope
structure's FROM field.
HEADER <field-name> <string>
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 <flag>
Messages with the specified keyword flag set.
LARGER <n>
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 <search-key>
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 <date>
Messages whose internal date (disregarding time and timezone)
is within the specified date.
OR <search-key1> <search-key2>
Messages that match either search key.
RECENT
Messages that have the \Recent flag set.
SEEN
Messages that have the \Seen flag set.
SENTBEFORE <date>
Messages whose [RFC-2822] Date: header (disregarding time and
timezone) is earlier than the specified date.
SENTON <date>
Messages whose [RFC-2822] Date: header (disregarding time and
timezone) is within the specified date.
SENTSINCE <date>
Messages whose [RFC-2822] Date: header (disregarding time and
timezone) is within or later than the specified date.
SINCE <date>
Messages whose internal date (disregarding time and timezone)
is within or later than the specified date.
SMALLER <n>
Messages with an [RFC-2822] size smaller than the specified
number of octets.
SUBJECT <string>
Messages that contain the specified string in the envelope
structure's SUBJECT field.
TEXT <string>
Messages that contain the specified string in the header or
body of the message.
TO <string>
Messages that contain the specified string in the envelope
structure's TO field.
UID <sequence set>
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 <flag>
Messages that do not have the specified keyword flag set.
UNSEEN
Messages that do not have the \Seen flag set.
=======================================================================
Q. How to convert flags?
R. use --regexflag
For example to convert flag IMPORTANT to flag CANWAIT
imapsync ... --regexflag "s/IMPORTANT/CANWAIT/g" --debugflags
option --debugflags is usefull to see in details what imapsync
does with flags.
=======================================================================
Q. Does imapsync retain the \Answered and $Forwarded flags?
R. It depends on the destination server.
a) If the destination server honours the "PERMAENTFLAGS \*"
directive (meaning it accepts any flag) or no PERMAENTFLAGS at all
then imapsync synchronizes all flags except the \Recent flag
(RFC 3501 says about \Recent flag "This flag can not be
altered by the client.").
b) If the destination server honours the "PERMAENTFLAGS without the
special "\*" then imapsync synchronizes only the flags listed
in PERMANENTFLAGS.
Some imap servers have problems with flags not beginning with
the backslash character \
(see next question to find a solution to this issue)
=======================================================================
Q. How to fix this error: BAD Invalid system flag \FORWARDED
R. Filter flag \FORWARDED with --regexflag like this:
On Windows:
imapsync ... --regexflag "s/\\FORWARDED//g"
On Unix:
imapsync ... --regexflag 's/\\FORWARDED//g'
or
imapsync ... --regexflag "s/\\\\FORWARDED//g"
=======================================================================
Q. How to convert flags with $ to \ character?
R. $ and \ are special characters we have to "escape" them.
For example to convert flag $label1 to \label1
imapsync ... --regexflag "s/\$label1/\\label1/g" --debugflags
======================================================================
Q. imapsync fails with the following error:
flags from : [\Seen NonJunk]
Error trying to append string: 58 NO APPEND Invalid flag list
R. For some servers, flags have to begin with a \ character.
The flag "NonJunk" may be a invalid flag for your server
so use for example:
imapsync ... --regexflag "s/NonJunk//g"
Remark (thanks to Arnt Gulbrandsen):
IMAP system flags have to begin with \ character.
Any other flag must begin with another character.
System flags are just flags defined by an RFC instead of by users.
Conclusion, some imap server coders don't read the RFCs (so do I).
Recent imapsync deals with this issue by filter with PERMANENTFLAGS
automatically.
=======================================================================
Q. Flags are not well synchronized. Is it a bug?
R. It happens with some servers on the first sync.
Also, it was a bug from revision 1.200 to revision 1.207
Two solutions:
* Run imapsync a second time. imapsync synchronizes flags on each run.
* Use option --syncflagsaftercopy. With this option imapsync will
also sync flags after each message transfer. Flags are already
synced during the transfer with the imap APPEND command but
option --syncflagsaftercopy does it again using the imap STORE
command.
=======================================================================

View File

@ -0,0 +1,221 @@
#!/bin/cat
$Id: FAQ.Folders_Mapping.txt,v 1.5 2015/05/11 10:36:33 gilles Exp gilles $
===========================================
Imapsync changing folders names
===========================================
Things to know and understand before playing with --regextrans2
*) --regextrans2 is used to transform folders names.
*) --regextrans2 applies after the default
inversion prefix1 <-> prefix2 and sep1 <-> sep2
So when elaborating the regex you should focus on
the right part of the default mapping printed by
imapsync, the part showing the host2 folder name.
The section to look at is within the folder loop:
++++ Looping on each folder
Here
++++ End looping on each folder
*) Several --regextrans2 is possible, they will be applied in the order
of the command line, each one on the result of the previous one.
*) --regextrans2 uses Perl regex mechanism so it may be hard to master
this part. It is powerful but not very simple.
*) Windows vs Unix quotes.
On windows don't use single quotes ' around the regex string,
use double quotes instead, like --regextrans2 "myregex"
On Linux/Unix use single quotes ' around the regex string, it is
easier to get what we want with single quotes since the shell
won't change the inner string. Like --regextrans2 'myregex'
*) Good method to elaborate any --regextrans2 string
First elaborate the --regextrans2 string with --dry --justfolders
--nofoldersizes options.
With --dry imapsync shows the transformations it will do without
really doing them.
With --justfolders imapsync will work only with folders,
messages won't be taken into account.
With --nofoldersizes imapsync won't spend time useless time on
evaluating folders sizes.
When the output shows what you escape imapsync to do with folders
names, you can remove the --dry option. Keep the --justfolders
option in order to see if the destination server host2 accepts
to create the folders.
When everything is ok with folders you can remove --justfolders
and --nofoldersizes imapsync will also transfer messages.
Showing folders sizes is good then transferring messages, it allows
ETA calculation and it's a supplementary check on folders.
=======================================================================
Q. Give examples about --regextrans2
Examples:
1) To remove INBOX. in the name of destination folders:
--regextrans2 's/^INBOX\.(.+)/$1/'
2a) To sync all folders to INBOX:
imapsync ... --regextrans2 "s/.*/INBOX/"
2b) To sync a complete account in a subfolder called FOO:
Since imapsync release 1.641 simply use:
imapsync ... --subfolder2 FOO
Next examples are subfolder solutions for any release.
a) Separator is dot character "." and "INBOX" prefixes every folder
On Linux/Unix:
--regextrans2 's,^INBOX(.*),INBOX.FOO$1,'
On Windows:
--regextrans2 "s,^INBOX(.*),INBOX.FOO$1,"
or:
b) Separator is the slash character "/" and there is no prefix
On Linux/Unix:
--regextrans2 's,(.*),FOO/$1,'
On Windows:
--regextrans2 "s,(.*),FOO/$1,"
or:
c) Any separator, any prefix solution, FOO is the subfolder:
It is a complicated line because every case is taken into account.
Type it in one line (or with the \ at the end of first line on Unix shells.
On Linux/Unix:
--regextrans2 's,${h2_prefix}(.*),${h2_prefix}FOO${h2_sep}$1,' \
--regextrans2 's,^INBOX$,${h2_prefix}FOO${h2_sep}INBOX,'
On Windows:
--regextrans2 "s,${h2_prefix}(.*),${h2_prefix}FOO${h2_sep}$1," ^
--regextrans2 "s,^INBOX$,${h2_prefix}FOO${h2_sep}INBOX,"
3) to substitute all characters dot "." by underscores "_"
--regextrans2 "s,\.,_,g"
3b) to substitute all doublequotes " by underscores _
On Linux/Unix:
--regextrans2 's,\",_,g'
On Windows:
--regextrans2 s,\^",_,g
4) to change folder names like this:
[mail/Sent Items] -> [Sent]
[mail/Test] -> [INBOX/Test]
[mail/Test2] -> [INBOX/Test2]
On Linux/Unix:
--regextrans2 's,^mail/Sent Items$,Sent,' \
--regextrans2 's,^mail/,INBOX/,'
======================================================================
Q. Is it possible to synchronize all messages from one server to
another without recreating the folder structure and the target server.
R. Yes.
For example, to synchronize all messages in all folders on host1
to folder INBOX only on host2:
1) First try (safe mode):
--regextrans2 "s/(.*)/INBOX/" --dry --justfolders
2) See if the output says everything you want imapsync to do,
--dry option is safe and does nothing real.
3) Remove --dry
Check the imap folder tree on the target side, you should
only have one: the classical INBOX.
4) Remove --justfolders
======================================================================
Q. I have moved from Braunschweig to Graz, so I would like to have my
whole Braunschweig mail sorted into a sub-folder INBOX.Braunschweig
of my new mail account.
R.
1) First try (safe mode):
imapsync \
...
--regextrans2 "s/INBOX(.*)/INBOX.Braunschweig\$1/" \
--dry --justfolders
On Windows, in the previous example containing \$1 you have to
replace the two \$1 by $1 (remove the \ before $).
2) See if the output says everything you want imapsync to do,
--dry option is safe and does nothing real.
3) Remove --dry
Check the imap folder tree on the target side
4) Remove --justfolders
=======================================================================
Q. I would like to move emails from InBox to a sub-folder called,
say "2010-INBOX" based on the date (Like all emails received in the
Year 2010 should be moved to the folder called "2010-INBOX").
R. 2 ways :
a) Manually:
------------
1) You create a folder INBOX.2010-INBOX
2) Mostly every email software allow sorting by date. In INBOX, you
select from 1 January to 31 December 2010 messages with the shift key.
(in mutt, use ~d)
3) Cut/paste in INBOX.2010-INBOX
b) With imapsync:
-----------------
imapsync ... \
--search 'SENTSINCE 1-Jan-2010 SENTBEFORE 31-Dec-2010'
--regextrans2 's/^INBOX$/INBOX.2010-INBOX/' \
--folder INBOX
=======================================================================

View File

@ -1,5 +1,5 @@
#!/bin/cat
$Id: FAQ.Gmail.txt,v 1.1 2015/03/26 08:12:20 gilles Exp gilles $
$Id: FAQ.Gmail.txt,v 1.2 2015/05/11 01:11:40 gilles Exp gilles $
======================================================================
Imapsync with Gmail
@ -71,11 +71,12 @@ and trailing blank characters are problems with gmail, and
also successive blanks ending with the IMAP error
"NO [CANNOT] Folder contains excess whitespace (Failure)"
If you want to change only leading and trailing blank characters
then use instead:
--regextrans2 "s,(/|^) +,\$1,g" --regextrans2 "s, +(/|$),\$1,g"
then use the following instead
On Linux/Unix:
--regextrans2 "s,(/|^) +,\$1,g" --regextrans2 "s, +(/|$),\$1,g"
On Windows:
--regextrans2 "s,(/|^) +,$1,g" --regextrans2 "s, +(/|$),$1,g"
On Windows, in the previous example containing \$1 you have to
replace the two \$1 by $1 (remove the \ before $1).
--regextrans2 "s/[\^]/_/g" is mandatory. It converts, since
not accepted by gmail, character ^ to character _ underscore.
@ -185,6 +186,20 @@ label CanWait and only it.
--skipcrossduplicates, will only put in "[Gmail]/All Mail"
the messages that are not labeled at all.
=======================================================================
Q. I can't authenticate with Gmail via IMAP
Gmail says "Please log in via your web browser"
R1. See Coert Grobbelaar solution:
https://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.
The Gmail imap message error said "Please log in via your web browser"
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.
=======================================================================
Q. Gmail does not really delete messages in folder [Gmail]/All Mail
What happens? What can I do?

View File

@ -1,6 +1,6 @@
#!/bin/sh
# $Id: prerequisites_imapsync,v 1.10 2015/03/14 23:46:59 gilles Exp gilles $
# $Id: prerequisites_imapsync,v 1.12 2015/07/06 03:12:43 gilles Exp gilles $
MODULES_MANDATORY='
Digest::HMAC_MD5
@ -68,7 +68,7 @@ search_modules_any() {
echo "All needed modules are already installed"
return
}
apt-get -h > /dev/null 2>&1 && {
apt-file -h > /dev/null 2>&1 && {
search_modules_apt "$@"
return
}
@ -114,6 +114,7 @@ search_modules_apt() {
#echo apt-file search /$F
echo
apt-file search /$F
#apt-cache search "$M"
echo
done
}

View File

@ -1,5 +1,5 @@
# $Id: Makefile,v 1.179 2015/04/01 03:00:13 gilles Exp gilles $
# $Id: Makefile,v 1.189 2015/07/17 17:36:56 gilles Exp gilles $
.PHONY: help usage all
@ -19,6 +19,7 @@ usage:
@echo "make W/test_tests.bat # run --tests on win32"
@echo "make W/test2.bat # run W/test2.bat on win32"
@echo "make W/test3.bat # run W/test3.bat on win32"
@echo "make W/test_reg.bat # run W/test_reg.bat on win32"
@echo "make W/test_exe_2.bat # run W/test_exe_2.bat on win32"
@echo "make prereq_win32 # run W/install_modules.bat on win32"
@echo "make all "
@ -27,7 +28,7 @@ usage:
@echo "make valid_index # check index.shtml for good syntax"
@echo "make upload_ks"
@echo "make imapsync.exe"
@echo "make imapsync_elf_x86.bin"
@echo "make bin"
@echo "make publish"
@echo "make perlcritic"
@echo "make prereq # Generates W/prereq.*"
@ -47,12 +48,21 @@ HELLO=$(shell date;uname -a)
IMAPClient_3xx=./W/Mail-IMAPClient-3.35/lib
IMAPClient=$(IMAPClient_3xx)
HOSTNAME = $(shell hostname -s)
ARCH = $(shell uname -m)
KERNEL = $(shell uname -s)
BIN_NAME = imapsync_bin_$(KERNEL)_$(ARCH)
hello:
echo "$(VERSION)"
echo "$(IMAPClient)"
@echo "$(VERSION)"
@echo "$(IMAPClient)"
@echo "$(HOSTNAME)"
@echo "$(ARCH)"
@echo "$(KERNEL)"
@echo "$(BIN_NAME)"
all: ChangeLog README VERSION OPTIONS W/imapsync.1 prereq perlcritic imapsync_elf_x86.bin imapsync.exe VERSION_EXE
all: ChangeLog README VERSION OPTIONS W/imapsync.1 prereq perlcritic bin mac imapsync.exe VERSION_EXE
testp :
sh INSTALL.d/prerequisites_imapsync
@ -107,7 +117,7 @@ clean_man:
rm -f imapsync.1
W/imapsync.1: imapsync
pod2man < /dev/null
# pod2man < /dev/null
pod2man imapsync > W/imapsync.1
install: testp W/imapsync.1
@ -207,11 +217,16 @@ W/test2.bat:
scp imapsync examples/file.txt W/test2.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/test2.bat'
W/test3.bat:
W/test3.bat:
unix2dos W/test3.bat
scp imapsync W/test3.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/test3.bat'
W/test_reg.bat:
unix2dos W/test_reg.bat
scp imapsync W/test_reg.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/test_reg.bat'
W/test_exe_2.bat:
unix2dos W/test_exe_2.bat
scp imapsync W/test_exe_2.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
@ -228,8 +243,8 @@ test_imapsync_exe:
time ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/test_exe.bat'
prereq_win32:
unix2dos W/*.bat examples/*.bat
scp W/install_modules.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/examples/'
unix2dos W/install_modules.bat
scp W/install_modules.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
imapsync.exe: imapsync
@ -271,30 +286,22 @@ zip: dosify_bat
# C:\Users\mansour\Desktop\imapsync
# vadrouille or petite
imapsync_elf_x86.bin: imapsync
mac: imapsync
rcsdiff imapsync
{ test 'vadrouille' = "`hostname`" && \
pp -o imapsync_elf_x86.bin -I $(IMAPClient_3xx) \
rsync -p -e 'ssh -p 995' imapsync W/build_mac.sh 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: imapsync
rcsdiff imapsync
{ pp -o $(BIN_NAME) -I $(IMAPClient_3xx) \
-M Mail::IMAPClient -M IO::Socket -M IO::Socket::SSL \
-M Digest::MD5 -M Digest::HMAC_MD5 -M Term::ReadKey \
-M Authen::NTLM \
imapsync ; \
} || :
{ test 'petite' = "`hostname`" && \
pp -o imapsync_elf_x86.bin -I $(IMAPClient_3xx) \
-M Mail::IMAPClient -M IO::Socket -M IO::Socket::SSL \
-M Digest::MD5 -M Digest::HMAC_MD5 -M Term::ReadKey \
-M Authen::NTLM \
imapsync ; \
} || :
{ test 'ks200821.kimsufi.com' = "`hostname`" && \
pp -o imapsync_elf_x86.bin -I $(IMAPClient_3xx) \
-M Mail::IMAPClient -M IO::Socket -M IO::Socket::SSL \
-M Digest::MD5 -M Digest::HMAC_MD5 -M Term::ReadKey \
-M Authen::NTLM \
imapsync ; \
} || :
./imapsync_elf_x86.bin
./$(BIN_NAME)
lfo: upload_lfo
@ -405,7 +412,8 @@ PUBLIC_W = ./W/style.css ./W/tw-hash.html \
./W/paypal.shtml ./W/paypal_return.shtml
ml: dist_dir
ml: dist_dir
rcsdiff W/ml_announce.in
m4 -P W/ml_announce.in | mutt -H-
mailq
@ -441,7 +449,7 @@ checklinkext: S/news.shtml S/external.shtml S/imapservers.shtml S/template.shtm
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/prerequisites_imapsync imapsync
rsync -avH index.shtml FAQ INSTALL OPTIONS NOLIMIT LICENSE CREDITS TODO TUTORIAL.html GOOD_PRACTICES.html imapsync ../imapsync_website/
rsync -avH index.shtml FAQ INSTALL OPTIONS NOLIMIT LICENSE CREDITS TODO TUTORIAL.html GOOD_PRACTICES.html imapsync imapsync.exe $(BIN_NAME) imapsync_Darwin_$(VERSION) ../imapsync_website/
rsync -avH $(PUBLIC_W) ../imapsync_website/W/
rsync -avH S/ ../imapsync_website/S/
rsync -avH W/images/ ../imapsync_website/W/images/

20
OPTIONS
View File

@ -72,12 +72,17 @@ Several options are mandatory.
--exclude 'fold1|fold2|f3' skips fold1, fold2 and f3.
--exclude <regex> : or this one, etc.
--subfolder2 <string> : Move whole host1 folders hierarchy under this
host2 folder <string>.
It does it by adding two --regextrans2 options before
all others. Add --debug to see what's really going on.
--regextrans2 <regex> : Apply the whole regex to each destination folders.
--regextrans2 <regex> : and this one. etc.
When you play with the --regextrans2 option, first
add also the safe options --dry --justfolders
Then, when happy, remove --dry, remove --justfolders.
Have in mind that --regextrans2 is applied after prefix
Have in mind that --regextrans2 is applied after prefix
and separator inversion.
--tmpdir <string> : Where to store temporary files and subdirectories.
@ -95,8 +100,8 @@ Several options are mandatory.
--prefix1 <string> : 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, all other
cases are bad.
does not have NAMESPACE capability, so imapsync
suggests to use it. All other cases are bad.
--prefix2 <string> : Add prefix to all host2 folders. See --prefix1
--sep1 <string> : Host1 separator in case NAMESPACE is not supported.
--sep2 <string> : Host2 separator in case NAMESPACE is not supported.
@ -106,6 +111,10 @@ Several options are mandatory.
--skipmess is applied before --regexmess
--skipmess <regex> : or this one, etc.
--pipemess <command> : Apply this command to each message content before
the copy.
--pipemess <command> : and this one, etc.
--disarmreadreceipts : Disarms read receipts (host2 Exchange issue)
--regexmess <regex> : Apply the whole regex to each message before transfer.
@ -213,6 +222,7 @@ Several options are mandatory.
--debugimap1 : IMAP debug mode for host1. imap debug is very verbose.
--debugimap2 : IMAP debug mode for host2.
--debugimap : IMAP debug mode for host1 and host2.
--debugmemory : Debug mode showing memory consumption after each copy.
--tests : Run non-regression tests.
--testslive : Run a live test with test1.lamiral.info imap server.
@ -238,9 +248,9 @@ Example: to synchronize imap account "test1" on "test1.lamiral.info"
--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-77-generic #114-Ubuntu SMP Tue Mar 10 17:25:28 UTC 2015 i686)
Here is a [linux] system (Linux petite 3.2.0-84-generic #121-Ubuntu SMP Tue May 5 18:55:46 UTC 2015 i686)
With perl 5.14.2 Mail::IMAPClient 3.35
$Id: imapsync,v 1.637 2015/04/01 01:36:37 gilles Exp gilles $
$Id: imapsync,v 1.644 2015/07/17 01:22:52 gilles Exp gilles $
This current imapsync is up to date
Homepage: http://imapsync.lamiral.info/

119
README
View File

@ -4,7 +4,7 @@ NAME
More than 52 different IMAP server softwares supported with success, few
failures.
$Revision: 1.637 $
$Revision: 1.644 $
SYNOPSIS
To synchronize imap account "foo" on "imap.truc.org" to imap account
@ -322,120 +322,7 @@ BUG REPORT GUIDELINES
it.
IMAP SERVERS
Failure stories reported in the past with the following 6 imap servers.
Maybe last imapsync release can run successfully with them. Don't
hesitate to have a try, It's been a long time since last failure
occured, I will help you and make efforts to switch them to the success
list, that's my job.
- MailEnable 1.54 (Proprietary) but MailEnable 4.23 is supported.
- DBMail 0.9, 2.0.7 (GPL). But DBMail 1.2.1 is supported.
Patient and confident testers are welcome.
- Imail 7.04 (maybe).
- (2011) MDaemon 12.0.3 as host2 but MDaemon is supported as host1.
MDaemon is simply buggy with the APPEND IMAP command with
any IMAP email client.
- Hotmail since hotmail.com does not provide IMAP access
- Outlook.com since outlook.com does not provide IMAP access
Success stories reported with the following 62 imap servers (software
names are in alphabetic order):
- 1und1 H mimap1 84498 [host1] H mibap4 95231 [host1]
- a1.net imap.a1.net IMAP4 Ready [host1]
- Apple Server 10.6 Snow Leopard [host1]
- Archiveopteryx 2.03, 2.04, 2.09, 2.10 [host2], 3.0.0 [host2]
(OSL 3.0) http://www.archiveopteryx.org/
- Atmail 6.x [host1]
- Axigen Mail Server Version 8.0.0
- BincImap 1.2.3 (GPL) (http://www.bincimap.org/)
- CommuniGatePro server (Redhat 8.0) (Solaris), CommuniGate Pro 5.2.17[host2] (CentOS 5.4)
- Courier IMAP 1.5.1, 2.2.0, 2.1.1, 2.2.1, 3.0.8, 3.0.3, 4.1.1 (GPL)
(http://www.courier-mta.org/)
- Critical Path (7.0.020)
- Cyrus IMAP 1.5, 1.6,
2.1, 2.1.15, 2.1.16, 2.1.18
2.2.1, 2.2.2-BETA, 2.2.3, 2.2.6, 2.2.10, 2.2.12, 2.2.13,
2.3-alpha (OSI Approved), 2.3.1, 2.3.7, 2.3.16
(http://asg.web.cmu.edu/cyrus/)
- David Tobit V8 (proprietary Message system).
- Deerfield VisNetic MailServer 5.8.6 [host1] (http://www.deerfield.net/products/visnetic-mailserver/)
- DBMail 1.2.1, 2.0.4, 2.0.9, 2.2rc1 (GPL) (http://www.dbmail.org/).
2.0.7 seems buggy.
- DBOX 2.41 System [host1] (http://www.dbox.handshake.de/).
- Deerfield VisNetic MailServer 5.8.6 [host1]
- dkimap4 [host1]
- Domino (Notes) 4.61 [host1], 6.5 [host1], 5.0.6, 5.0.7, 7.0.2, 6.0.2CF1,
7.0.1 [host1], 8.0.1 [host1], 8.5.2 [host2], 8.5.3 [host1]
- Dovecot 0.99.10.4, 0.99.14, 0.99.14-8.fc4, 1.0-0.beta2.7,
1.0.0 [dest/source] (LGPL) (http://www.dovecot.org/)
- Eudora WorldMail v2
- FirtClass 9 [host1] Read the FAQ! (http://www.firstclass.com/)
- FTGate (http://www.ftgate.com/)
- Fusemail imap.fusemail.net:143 (https://www.fusemail.com/).
- Gimap (Gmail imap)
- GMX IMAP4 StreamProxy.
- Groupwise IMAP (Novell) 6.x and 7.0. Buggy so see the FAQ.
- hMailServer 5.40-B1950 [host12], 5.3.3 [host2], 4.4.1 [host1] (see FAQ)
- IceWarp Server 10.4.5 [host1] (http://www.icewarp.com/)
- iPlanet Messaging server 4.15, 5.1, 5.2
- IMail 7.15 (Ipswitch/Win2003), 8.12, 11.03 [host1]
- Kerio 7.2.0 Patch 1 [host12], Kerio 8 [host1]
- Mail2World IMAP4 Server 2.5 [host1] (http://www.mail2world.com/)
- MailEnable 4.23 [host1] [host2], 4.26 [host1][host2], 5 [host1]
- MDaemon 7.0.1, 8.0.2, 8.1, 9.5.4 (Windows server 2003 R2 platform),
9.6.5 [host1], 12 [host2], 12.0.3 [host1], 12.5.5 [host1],
13.5 [host2], 14.5 [host2]
- Mercury 4.1 (Windows server 2000 platform)
- Microsoft Exchange Server 5.5, 6.0.6249.0[host1], 6.0.6487.0[host1],
6.5.7638.1 [host2], 6.5 [host1], Exchange 2007 SP1 (with Update Rollup 2),
Exchange2007-EP-SP2,
Exchange 2010 RTM (Release to Manufacturing) [host2],
Exchange 2010 SP1 RU2[host2],
- Mirapoint, 4.1.9-GA [host1]
- Netscape Mail Server 3.6 (Wintel !)
- Netscape Messaging Server 4.15 Patch 7
- Office 365 [host1] [host2]
- OpenMail IMAP server B.07.00.k0 (Samsung Contact ?)
- OpenWave
- Oracle Beehive [host1]
- Parallels Plesk Panel 9.x [host2] 11.x [host2] (http://www.parallels.com/)
- Qualcomm Worldmail (NT)
- QQMail IMAP4Server [host1] [host2] https://en.mail.qq.com/
- RackSpace hoster secure.emailsrvr.com:993 http://www.rackspace.com/
- Rockliffe Mailsite 5.3.11, 4.5.6
- Samsung Contact IMAP server 8.5.0
- Scalix v10.1, 10.0.1.3, 11.0.0.431, 11.4.6
- Sendmail Mail Store IMAP4rev1 (5.5.6/mstore-5-5-build-1874 [host1].
- SmarterMail, Smarter Mail 5.0 Enterprise, Smarter Mail 5.5 [host1],
SmarterMail Professional 10.2 [host1], Smarter Mail 11.7 [host1][host2].
- Softalk Workgroup Mail 7.6.4 [host1].
- SunONE Messaging server 5.2, 6.0 (SUN JES - Java Enterprise System)
- Sun Java(tm) System Messaging Server 6.2-2.05, 6.2-7.05, 6.3
- Surgemail 3.6f5-5, 6.3d-72 [host2]
- UW-imap servers (imap-2000b) rijkkramer IMAP4rev1 2000.287
(RedHat uses UW like 2003.338rh), v12.264 Solaris 5.7 (OSI Approved)
(http://www.washington.edu/imap/)
- UW - QMail v2.1
- VMS, Imap part of TCP/IP suite of VMS 7.3.2
- Yahoo [host1]
- Zarafa 6,40,0,20653 [host1] (http://www.zarafa.com/)
- Zarafa ZCP 7.1.4 IMAP Gateway [host2]
- Zimbra-IMAP 3.0.1 GA 160, 3.1.0 Build 279, 4.0.5, 4.5.2, 4.5.6,
Zimbra 5.0.24_GA_3356.RHEL4 [host1], 5.5, 6.x
Please report to the author any success or bad story with imapsync and
do not forget to 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:
Host1 software:* OK louloutte Cyrus IMAP4 v1.5.19 server ready
Host2 software:* OK Courier-IMAP ready
You can use option --justconnect to get those lines. Example:
imapsync --host1 imap.troc.org --host2 imap.trac.org --justconnect
See http://imapsync.lamiral.info/S/imapservers.shtml
HUGE MIGRATION
Pay special attention to options --subscribed --subscribe --delete
@ -500,5 +387,5 @@ SIMILAR SOFTWARES
Feedback (good or bad) will often be welcome.
$Id: imapsync,v 1.637 2015/04/01 01:36:37 gilles Exp gilles $
$Id: imapsync,v 1.644 2015/07/17 01:22:52 gilles Exp gilles $

View File

@ -29,43 +29,70 @@
<p>Let's start with the long reported <b>success stories</b> list: <b>
62 different imap server softwares supported!</b><br/>
63 different imap server softwares supported!</b><br/>
[host1] means "source server" and [host2] means "destination server":
</p>
<p>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
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:
</p>
<pre>
Host1 software:* OK louloutte Cyrus IMAP4 v1.5.19 server ready
Host2 software:* OK Courier-IMAP ready
</pre>
<p>You can use option --justconnect to get those lines.
Examples:</p>
<pre>
imapsync --host1 test1.lamiral.info --host2 test2.lamiral.info --justconnect
imapsync --host1 imap.gmail.com --ssl1 --host2 imap-mail.outlook.com --ssl2 --justconnect
</pre>
<p>And now the success imap server software list:</p>
<ul>
<li>1und1 H mimap1 84498 [host1], H mibap4 95231 [host1](<a href="http://www.1und1.de/">http://www.1und1.de/</a>)</li>
<li>a1.net imap.a1.net IMAP4 Ready [host1] </li>
<li><b>Apple Server</b> 10.6 Snow Leopard [host1] </li>
<li>Archiveopteryx 2.03, 2.04, 2.09, 2.10 [host2], 3.0.0 [host2]
(OSL 3.0) (<a href="http://www.archiveopteryx.org/">http://www.archiveopteryx.org/</a>)</li>
(OSL 3.0) (<a href="http://www.archiveopteryx.org/">http://www.archiveopteryx.org/</a>)</li>
<li>Atmail 6.x [host1] <a href="https://www.atmail.com/">https://www.atmail.com/</a></li>
<li>Axigen Mail Server Version 8.0.0 (<a href="https://www.axigen.com/">https://www.axigen.com/</a>)</li>
<li>Axigen Mail Server Version 8.0.0 (<a href="https://www.axigen.com/">https://www.axigen.com/</a>)</li>
<li>BincImap 1.2.3 (GPL) (<a href="http://www.bincimap.org/">http://www.bincimap.org/</a>)</li>
<li>CommuniGatePro server (Redhat 8.0) (Solaris), CommuniGate Pro 5.2.17[host2] (CentOS 5.4)
(<a href="http://www.communigate.com/">http://www.communigate.com/</a>) </li>
<li>Courier IMAP 1.5.1, 2.2.0, 2.1.1, 2.2.1, 3.0.8, 3.0.3, 4.1.1 (GPL)
(<a href="http://www.courier-mta.org/imap/">http://www.courier-mta.org/imap/</a>) </li>
(<a href="http://www.courier-mta.org/imap/">http://www.courier-mta.org/imap/</a>) </li>
<li>Critical Path (7.0.020) </li>
<li>Cyrus IMAP 1.5, 1.6,
2.1, 2.1.15, 2.1.16, 2.1.18
2.2.1, 2.2.2-BETA, 2.2.3, 2.2.6, 2.2.10, 2.2.12, 2.2.13,
2.3-alpha (OSI Approved), 2.3.1, 2.3.7, 2.3.16
(<a href="http://cyrusimap.web.cmu.edu/">http://cyrusimap.web.cmu.edu/</a>)
</li>
<li>Cyrus IMAP 1.5, 1.6,
2.1, 2.1.15, 2.1.16, 2.1.18
2.2.1, 2.2.2-BETA, 2.2.3, 2.2.6, 2.2.10, 2.2.12, 2.2.13,
2.3-alpha (OSI Approved), 2.3.1, 2.3.7, 2.3.16
(<a href="http://cyrusimap.web.cmu.edu/">http://cyrusimap.web.cmu.edu/</a>)
</li>
<li>David Tobit V8. (<a href="http://de.tobit.com/">http://de.tobit.com/</a>) </li>
<li>DBMail 1.2.1, 2.0.4, 2.0.9, 2.2rc1 (GPL).
2.0.7 seems buggy. (<a href="http://www.dbmail.org/">http://www.dbmail.org/</a>) </li>
<li>DBOX 2.41 System [host1] (<a href="http://www.dbox.handshake.de/">http://www.dbox.handshake.de/</a>).</li>
2.0.7 seems buggy. (<a href="http://www.dbmail.org/">http://www.dbmail.org/</a>) </li>
<li>DBOX 2.41 System [host1] (<a href="http://www.dbox.handshake.de/">http://www.dbox.handshake.de/</a>).</li>
<li>Deerfield VisNetic MailServer 5.8.6 [host1]
(<a href="http://www.deerfield.net/products/visnetic-mailserver/">http://www.deerfield.net/products/visnetic-mailserver/</a>) </li>
<li>dkimap4 [host1] </li>
<li>Domino (Notes) 4.61[host1], 6.5, 5.0.6, 5.0.7, 7.0.2, 6.0.2CF1, 7.0.1[host1], 8.0.1[host1]
(<a href="http://www-03.ibm.com/software/products/en/ibmnotes">http://www-03.ibm.com/software/products/en/ibmnotes</a>) </li>
<li><b>Dovecot</b> 0.99.10.4, 0.99.14, 0.99.14-8.fc4, 1.0-0.beta2.7,
1.0.0 [dest/source] (LGPL) (http://www.dovecot.org/) (<a href="http://www.dovecot.org/">http://www.dovecot.org/</a>) </li>
1.0.0 [dest/source] (LGPL) (http://www.dovecot.org/) (<a href="http://www.dovecot.org/">http://www.dovecot.org/</a>) </li>
<li>Eudora WorldMail v2 (<a href="http://www.eudora.com/worldmail/">http://www.eudora.com/worldmail/</a>) </li>
<li><b>Exchange Server</b> 5.5, 6.0.6249.0[host1], 6.0.6487.0[host1],
6.5.7638.1 [host2], 6.5 [host1], Exchange 2007 SP1 (with Update Rollup 2),
Exchange2007-EP-SP2,
Exchange 2010 RTM (Release to Manufacturing) [host2],
Exchange 2010 SP1 RU2 [host2]
(<a href="http://www.microsoft.com/exchange/">http://www.microsoft.com/exchange/</a>)
</li>
<li>FirtClass 12 [host1] hard so read the FAQ! (<a href="http://www.firstclass.com/">http://www.firstclass.com/</a>)</li>
<li>FTGate [host1][host2] (<a href="http://www.ftgate.com/">http://www.ftgate.com/</a>)</li>
<li>Fusemail imap.fusemail.net:143 (<a href="https://www.fusemail.com/">https://www.fusemail.com/</a>).</li>
@ -74,7 +101,7 @@
<li>Godaddy IMAP (since Godaddy runs Courier) (<a href="https://www.godaddy.com/">https://www.godaddy.com/</a>) </li>
<li>Groupwise IMAP (Novell) 6.x and 7.0. Buggy so see the FAQ.
(<a href="http://www.novell.com/products/groupwise/">http://www.novell.com/products/groupwise/</a>) </li>
<li>hMailServer 5.40-B1950 [host12], 5.3.3 [host2], 4.4.1 [host1], HMAILSERVER 5.3.2-B1769 on windows 2003 [hsot2]
<li>hMailServer 5.40-B1950 [host12], 5.3.3 [host2], 4.4.1 [host1], 5.3.2-B1769 [host2], 5.6 [host2]
(<a href="https://www.hmailserver.com/">https://www.hmailserver.com/</a>) </li>
<li><b>Hotmail</b> hotmail.com is outlook.com and live.com now.</li>
<li>IceWarp Server 10.4.5 [host1] (<a href="https://www.icewarp.com/">https://www.icewarp.com/</a>)</li>
@ -85,18 +112,12 @@
<li>Mail2World IMAP4 Server 2.5 [host1] (<a href="http://www.mail2world.com/">http://www.mail2world.com/</a>)</li>
<li><b>MailEnable</b> 4.23 [host1][host2], 4.26 [host1][host2], 5 [host1]
(<a href="http://www.mailenable.com/">http://www.mailenable.com/</a>) </li>
<li>MDaemon 7.0.1, 8.0.2, 8.1, 9.5.4 (Windows server 2003 R2 platform), 9.6.5 [host1],
12 [host2], 12.0.3 [host1], 12.5.5 [host1], 13.5 [host2], 14.5 [host2]
(<a href="http://www.altn.com/">http://www.altn.com/</a>) </li>
<li>MDaemon 7.0.1, 8.0.2, 8.1, 8.1.2 [host1], 9.5.4 (Windows server 2003 R2 platform), 9.6.5 [host1],
12 [host2], 12.0.3 [host1], 12.5.5 [host1], 13.5 [host2], 13.6 [host1], 14.5 [host2]
(<a href="http://www.altn.com/">http://www.altn.com/</a>) </li>
<li>Mercury 4.1 (Windows server 2000 platform) (<a href="http://www.pmail.com/">http://www.pmail.com/</a>) </li>
<li><b>Microsoft Exchange Server</b> 5.5, 6.0.6249.0[host1], 6.0.6487.0[host1],
6.5.7638.1 [host2], 6.5 [host1], Exchange 2007 SP1 (with Update Rollup 2),
Exchange2007-EP-SP2,
Exchange 2010 RTM (Release to Manufacturing) [host2],
Exchange 2010 SP1 RU2 [host2]
(<a href="http://www.microsoft.com/exchange/">http://www.microsoft.com/exchange/</a>)
</li>
<li>Mirapoint server 4.1.9-GA [host1] (<a href="http://www.mirapoint.com/">http://www.mirapoint.com/</a>) </li>
<li>Mirapoint server 4.1.9-GA [host1] (<a href="http://www.mirapoint.com/">http://www.mirapoint.com/</a>) </li>
<li>Netscape Mail Server 3.6 (Wintel) </li>
<li>Netscape Messaging Server 4.15 Patch 7 </li>
<li><b>Office 365</b> [host1] [host2] (<a href="http://office365.com">http://office365.com</a>) </li>
@ -106,6 +127,8 @@
(<a href="http://www.oracle.com/technetwork/middleware/beehive/overview/index.html">http://www.oracle.com/technetwork/middleware/beehive/overview/</a>) </li>
<li><b><a href="http://outlook.com/">Outlook.com</a></b> can be IMAP accessed via host imap-mail.outlook.com over ssl (use --ssl1 or --ssl2).</li>
<li>Parallels Plesk Panel 9.x [host2] 11.x [host2] (<a href="http://www.parallels.com/">http://www.parallels.com/</a>)</li>
<li>Perdition (<a href="http://horms.net/projects/perdition/">http://horms.net/projects/perdition/</a></li>
<li>Qualcomm Worldmail (NT) (<a href="http://www.eudora.com/worldmail/">http://www.eudora.com/worldmail/</a>) </li>
<li>Rockliffe Mailsite 5.3.11, 4.5.6 (<a href="http://www.mailsite.com/">http://www.mailsite.com/</a>) </li>
<li>RackSpace hoster secure.emailsrvr.com:993 <a href="http://www.rackspace.com/">http://www.rackspace.com/</a>)</li>
@ -121,15 +144,17 @@
<li>Sun Java(tm) System Messaging Server 6.2-2.05, 6.2-7.05, 6.3 (<a href="http://www.oracle.com/">http://www.oracle.com/</a>) </li>
<li>Surgemail 3.6f5-5, 6.3d-72 [host2] (<a href="http://netwinsite.com/surgemail/">http://netwinsite.com/surgemail/</a>) </li>
<li>UW-imap servers (imap-2000b) rijkkramer IMAP4rev1 2000.287
(RedHat uses UW like 2003.338rh), v12.264 Solaris 5.7 (OSI Approved)
(<a href="http://www.washington.edu/imap/">http://www.washington.edu/imap/</a>) </li>
(RedHat uses UW like 2003.338rh), v12.264 Solaris 5.7 (OSI Approved)
(<a href="http://www.washington.edu/imap/">http://www.washington.edu/imap/</a>) </li>
<li>VMS, Imap part of TCP/IP suite of VMS 7.3.2 (<a href="http://h71000.www7.hp.com/openvms/">http://h71000.www7.hp.com/openvms/</a>) </li>
<li><b>Yahoo</b> [host1] (<a href="http://www.yahoo.com/">http://www.yahoo.com/</a>) </li>
<li>Zarafa 6,40,0,20653 [host1] (<a href="http://www.zarafa.com/">http://www.zarafa.com/</a>)</li>
<li>Zarafa 6,40,0,20653 [host1] (<a href="http://www.zarafa.com/">http://www.zarafa.com/</a>) </li>
<li>Zarafa ZCP 7.1.4 IMAP Gateway [host2]</li>
<li><b>Zimbra-IMAP</b> 3.0.1 GA 160, 3.1.0 Build 279, 4.0.5, 4.5.2, 4.5.6,
Zimbra 5.0.24_GA_3356.RHEL4 [host1], 5.5, 6.x
(<a href="http://www.zimbra.com/">http://www.zimbra.com/</a>) </li>
<li>Zentyal (Zinc) [host1] (<a href="http://www.zentyal.org/">http://www.zentyal.org/</a>) </li>
</ul>
<p>Let's finish with reported <b>failure stories</b> over the past.<br/>
@ -177,7 +202,7 @@ alt="Viewable With Any Browser" />
<!--#config timefmt="%D" -->
<!--#config timefmt="%A %B %d, %Y" -->
<b>This document last modified on <!--#echo var="LAST_MODIFIED" --></b>
($Id: imapservers.shtml,v 1.1 2015/03/29 17:24:01 gilles Exp gilles $)<br/>
($Id: imapservers.shtml,v 1.6 2015/06/23 10:45:34 gilles Exp gilles $)<br/>
<a href="#TOP">Top of the page</a>
</p>

56
TODO
View File

@ -1,5 +1,5 @@
#!/bin/cat
# $Id: TODO,v 1.135 2015/03/31 14:56:25 gilles Exp gilles $
# $Id: TODO,v 1.140 2015/07/17 17:36:22 gilles Exp gilles $
TODO file for imapsync
----------------------
@ -19,6 +19,41 @@ MB
GB
TB
2015_06_02 Karen F Bath.
Add skipped messages in the final dump.
I would like to request if you could add additional errors to the bottom, as we find that things like “MaxLineLength” and “maxsize limit” are classed as skipped messages and in my opinion are errors; as the email message is not transferred but this is not logged at the bottom.
We have our own scan script which we run on all log files at the end and copy the users logs into subfolders that have issues. Ive attached a list of things we search for.
"Error", "Output"
NO Mailbox already exists, "Folder"
NO LOGIN failed, "NoLogin"
Could not create folder, "Linux"
Error sending, "Linux"
Write failed 'no error caught', "Linux"
line length exceeds maxlinelength, "Linux"
BAD Command Argument Error. 11, "Linux"
Failure: can not open, "Linux"
No not connected, "Linux"
Write failed 'Connection reset by peer', "Linux"
could not be fetched:, "Linux"
NO Mailbox does not exist,"Error"
exceeds maxsize limit 20971520 bytes,"Error"
error while reading data from server: Connection reset by peer (4x),"Error"
Folder [Inbox] already exists,"Error"
2015_05_18
I'd like to be able to print the messages subjects, on some logs:
For instance:
msg INBOX.Archived/95551 marked \Deleted on host2 [GyDD6WpsFEtyBzNFnv]
msg [Gmail]/All Mail/281079 copying to INBOX.Archived
It would be great to be able to print the email subject, in order to debug or to get more useful information.
2015_04_25
Add duplicates test option.
2015_03_24
Add --sslargs with usage like:
imapsync ... --sslargs 'SSL_version=' --sslargs 'SSL_use_cert=1' \
@ -27,6 +62,7 @@ See perldoc IO::Socket::SSL for all possibilities.
2015_03_06
Dealing with Content-Type Message/Partial
Extract the components of the partial messages and construct them
@ -165,6 +201,20 @@ http://asg.web.cmu.edu/cyrus/download/imapd/altnamespace.html
Now the TODO done! (or not)
===========================================================================
DONE. Build and distribute a standalone Darwin Mac OS X binary.
It's called imapsync_bin_Darwin
DONE. Add a NOP for host2 for each fake copy in --dry mode.
Goal is to avoid timeouts happening only because of --dry
DONE 2015_05_09 WANTED 2015_04_25
Add an option "--subfolder2 FOO" to move all folders to a subfolder FOO:
On Windows:
--regextrans2 "s,${h2_prefix}(.*),${h2_prefix}FOO${h2_sep}$1," \
--regextrans2 "s,^INBOX$,${h2_prefix}FOO${h2_sep}INBOX,"
WON'T DO. Not enough examples.
Can you setup an option to make it stop if the destination mailbox reports
that it is over quota?
@ -363,9 +413,9 @@ DONE. Write option --delete2foldersonly regex.
Example: to permit a sync in a subfolder with --delete2folder
--regextrans2 's#(.*)#NEW/$1#' --delete2foldersonly /^NEW/
DONE. Write option --delete2foldersnot regex.
DONE. Write option --delete2foldersbutnot regex.
Example: to permit a sync but not deleting folder OLD
--delete2foldersnot /^OLD/
--delete2foldersbutnot /^OLD/
DONE. Add cache to speed up transfer. Option --usecache

View File

@ -1,18 +1,19 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<META NAME="generator" CONTENT="http://txt2tags.sf.net">
<META NAME="generator" CONTENT="http://txt2tags.org">
</HEAD><BODY BGCOLOR="white" TEXT="black">
<FONT SIZE="4">
</FONT></CENTER>
<CENTER>
</CENTER>
<P></P>
<HR NOSHADE SIZE=1>
<P></P>
<UL>
<LI><A HREF="#toc1">Tutorial for imapsync</A>
<UL>
<LI><A HREF="#toc2">Introduction</A>
<LI><A HREF="#toc2">Background knowledge about emailboxes</A>
<LI><A HREF="#toc3">Conventions</A>
</UL>
</UL>
@ -20,24 +21,45 @@
<P></P>
<HR NOSHADE SIZE=1>
<P></P>
<A NAME="toc1"></A>
<H1>Tutorial for imapsync</H1>
<A NAME="toc2"></A>
<H2>Introduction</H2>
<H2>Background knowledge about emailboxes</H2>
<P>
Three Internet protocols are used to access almost all email accounts:
POP, IMAP, HTTP.
POP3, IMAP, HTTP.
</P>
<P>
The oldest one is POP, Post Office Protocol, it allows only
one main box, also called INBOX.
The second protocol is IMAP, Internet Message Access Protocol, which allows
a hierarchy of mailboxes also called folders, it also allows concurrent accesses,
The oldest one still used is POP3, Post Office Protocol. POP3 allows only
one main box called INBOX. With POP3 messages have no flags, no Seen/UnSeen
Forwarded Flagged labels. Messages are often
removed from the POP3 server each time a software client looks into it,
so messages only appear on the client host that fetched them, they are
unavailable from any other system located elsewhere.
</P>
<P>
The second protocol to deal with email messages is IMAP, Internet Message Access Protocol.
IMAP allows a hierarchy of mailboxes also called folders, concurrent accesses,
tagging with flags, search by many criterium like date, subject, size etc.
The third protocol is HTTP, HyperText Transfer Protocol, via webmails.
Webmails often offer the same features than imap servers and,
since webmails background is often an imap server,
a parallel access via IMAP.
IMAP protocol presents most of the features POP lacks.
Messages stay on the imap server so any client on the network can access them
at any time from anywhere, the same messages with the same flags.
</P>
<P>
The third protocol to access email messages is HTTP, HyperText Transfer Protocol.
HTTP is the protocol to surf the web.
Web browsers like Google Chrome, Mozilla Firefox, Internet Explorer, Safari,
are HTTP client softwares.
Webmails often offer the same features than imap servers because
webmails underlying storage systems are often imap servers.
So webmail mailboxes like Gmail, Yahoo, Exchange, Zimbra or Office365 are also accessible via imap.
</P>
<P>
The conclusion of this protocol review is that IMAP can be used
to access mailboxes most of the time. Here comes imapsync.
</P>
<P>
Software imapsync is a command line tool to
@ -47,9 +69,9 @@ copy, migrate, backup or synchronize IMAP mailboxes.
Command line means imapsync is not graphical, it is textual,
you have to type characters on your keyboard.
Your fingers will not suffer anyway because
I wrote examples nearly ready to go.
I wrote file examples nearly ready to go.
Most of the time you only have to change values
and adapt them to your context.
in those files and adapt them to your context.
</P>
<P>
Do not be afraid, the mouse will not be forsaken.
@ -63,9 +85,9 @@ It is because imapsync is written in the Perl language
and thanks to the Perl creators Perl runs everywhere.
Outside imapsync life is different;
Historically Windows came after Unix and the marvelous designers
of this old time decided it would be very cool
in this old times decided it would be very cool
to not share the same syntax for doing the same things.
Thanks guys, great thinking!
Thanks guys, great thinking!
</P>
<P>
To avoid you to learn by headaches a system you do not master
@ -73,8 +95,10 @@ I will give all examples in both worlds, Unix and Windows.
Macintosh users are in the Unix world now but do not tell them,
it can hurt the olders.
</P>
<A NAME="toc3"></A>
<H2>Conventions</H2>
<P>
Imapsync has many options but you can ignore most of them
and still make great transfers.
@ -92,6 +116,7 @@ or the "^" character on Windows examples.
<P>
For example, on Unix
</P>
<PRE>
imapsync \
--host1 imap.truc.org \
@ -99,31 +124,35 @@ For example, on Unix
--password1 secret1 \
...
</PRE>
<P>
is equivalent to
</P>
<PRE>
imapsync --host1 imap.truc.org --user1 foo --password1 secret1 ...
</PRE>
<P></P>
<P>
and on Windows
</P>
<PRE>
imapsync ^
imapsync.exe ^
--host1 imap.truc.org ^
--user1 foo ^
--password1 secret1 ^
...
</PRE>
<P>
is equivalent to
</P>
<PRE>
imapsync --host1 imap.truc.org --user1 foo --password1 secret1 ...
</PRE>
<P></P>
<!-- html code generated by txt2tags 2.5 (http://txt2tags.sf.net) -->
<!-- html code generated by txt2tags 2.6 (http://txt2tags.org) -->
<!-- cmdline: txt2tags -i W/TUTORIAL.t2t -t html -\-toc -o TUTORIAL.html -->
</BODY></HTML>

View File

@ -1 +1 @@
1.637
1.644

View File

@ -1 +1 @@
1.637
1.644

View File

@ -314,3 +314,15 @@
1427815136 END 1.636 : mardi 31 mars 2015, 17:18:56 (UTC+0200)
1427853312 BEGIN 1.637 : mercredi 1 avril 2015, 03:55:12 (UTC+0200)
1427854440 END 1.637 : mercredi 1 avril 2015, 04:14:00 (UTC+0200)
1431218601 BEGIN 1.641 : dimanche 10 mai 2015, 02:43:21 (UTC+0200)
1431262946 END 1.641 : dimanche 10 mai 2015, 15:02:26 (UTC+0200)
1431414203 BEGIN 1.642 : mardi 12 mai 2015, 09:03:23 (UTC+0200)
1432116391 BEGIN 1.642 : mercredi 20 mai 2015, 12:06:31 (UTC+0200)
1432138982 BEGIN 1.642 : mercredi 20 mai 2015, 18:23:02 (UTC+0200)
1432140305 END 1.642 : mercredi 20 mai 2015, 18:45:05 (UTC+0200)
1435274638 BEGIN 1.643 : vendredi 26 juin 2015, 01:23:58 (UTC+0200)
1435275180 END 1.643 : vendredi 26 juin 2015, 01:33:00 (UTC+0200)
1435279579 BEGIN 1.643 : vendredi 26 juin 2015, 02:46:19 (UTC+0200)
1435280203 END 1.643 : vendredi 26 juin 2015, 02:56:43 (UTC+0200)
1437158716 BEGIN 1.644 : vendredi 17 juillet 2015, 20:45:16 (UTC+0200)
1437160124 END 1.644 : vendredi 17 juillet 2015, 21:08:44 (UTC+0200)

View File

@ -2148,7 +2148,7 @@ sub fetch_hash {
if ( $words[0] eq 'ALL' ) {
$msgs = shift @words;
}
elsif ( $words[0] =~ s/^([,:\d]+)\s*// ) {
elsif ( $words[0] =~ s/^([,:\d\*]+)\s*// ) {
$msgs = $1;
shift @words if $words[0] eq "";
}

File diff suppressed because it is too large Load Diff

View File

@ -1,25 +1,38 @@
% $Id: TUTORIAL.t2t,v 1.3 2014/10/08 08:49:29 gilles Exp gilles $
% $Id: TUTORIAL.t2t,v 1.5 2015/05/12 07:20:14 gilles Exp gilles $
= Tutorial for imapsync =
== Introduction ==
== Background knowledge about emailboxes ==
Three Internet protocols are used to access almost all email accounts:
POP, IMAP, HTTP.
POP3, IMAP, HTTP.
The oldest one is POP, Post Office Protocol, it allows only
one main box, also called INBOX.
The second protocol is IMAP, Internet Message Access Protocol, which allows
a hierarchy of mailboxes also called folders, it also allows concurrent accesses,
The oldest one still used is POP3, Post Office Protocol. POP3 allows only
one main box called INBOX. With POP3 messages have no flags, no Seen/UnSeen
Forwarded Flagged labels. Messages are often
removed from the POP3 server each time a software client looks into it,
so messages only appear on the client host that fetched them, they are
unavailable from any other system located elsewhere.
The second protocol to deal with email messages is IMAP, Internet Message Access Protocol.
IMAP allows a hierarchy of mailboxes also called folders, concurrent accesses,
tagging with flags, search by many criterium like date, subject, size etc.
The third protocol is HTTP, HyperText Transfer Protocol, via webmails.
Webmails often offer the same features than imap servers and,
since webmails background is often an imap server,
a parallel access via IMAP.
IMAP protocol presents most of the features POP lacks.
Messages stay on the imap server so any client on the network can access them
at any time from anywhere, the same messages with the same flags.
The third protocol to access email messages is HTTP, HyperText Transfer Protocol.
HTTP is the protocol to surf the web.
Web browsers like Google Chrome, Mozilla Firefox, Internet Explorer, Safari,
are HTTP client softwares.
Webmails often offer the same features than imap servers because
webmails underlying storage systems are often imap servers.
So webmail mailboxes like Gmail, Yahoo, Exchange, Zimbra or Office365 are also accessible via imap.
The conclusion of this protocol review is that IMAP can be used
to access mailboxes most of the time. Here comes imapsync.
Software imapsync is a command line tool to
copy, migrate, backup or synchronize IMAP mailboxes.
@ -28,9 +41,9 @@ copy, migrate, backup or synchronize IMAP mailboxes.
Command line means imapsync is not graphical, it is textual,
you have to type characters on your keyboard.
Your fingers will not suffer anyway because
I wrote examples nearly ready to go.
I wrote file examples nearly ready to go.
Most of the time you only have to change values
and adapt them to your context.
in those files and adapt them to your context.
Do not be afraid, the mouse will not be forsaken.
You can still use the mouse to launch an editor,
@ -42,9 +55,9 @@ It is because imapsync is written in the Perl language
and thanks to the Perl creators Perl runs everywhere.
Outside imapsync life is different;
Historically Windows came after Unix and the marvelous designers
of this old time decided it would be very cool
in this old times decided it would be very cool
to not share the same syntax for doing the same things.
Thanks guys, great thinking!
Thanks guys, great thinking!
To avoid you to learn by headaches a system you do not master
I will give all examples in both worlds, Unix and Windows.
@ -82,7 +95,7 @@ is equivalent to
and on Windows
```
imapsync ^
imapsync.exe ^
--host1 imap.truc.org ^
--user1 foo ^
--password1 secret1 ^

View File

@ -1,5 +1,5 @@
REM $Id: build_exe.bat,v 1.27 2015/03/27 23:35:13 gilles Exp gilles $
REM $Id: build_exe.bat,v 1.28 2015/05/11 01:09:57 gilles Exp gilles $
@ECHO OFF
ECHO Building imapsync.exe
@ -29,6 +29,10 @@ perl ^
-mTime::Local ^
-mUnicode::String ^
-mURI::Escape ^
-mJSON::WebToken ^
-mLWP::UserAgent ^
-mHTML::Entities ^
-mJSON ^
-e ''
cd
@ -55,6 +59,10 @@ pp -o imapsync.exe ^
-M File::Copy::Recursive ^
-M IO::Tee ^
-M Unicode::String ^
-M JSON::WebToken ^
-M LWP::UserAgent ^
-M HTML::Entities ^
-M JSON ^
.\imapsync
echo Done building imapsync.exe

22
W/build_mac.sh Executable file
View File

@ -0,0 +1,22 @@
#!/bin/sh
eval `perl -I $HOME/perl5/lib/perl5 -Mlocal::lib`
export MANPATH=$HOME/perl5/man:$MANPATH
HOSTNAME=`hostname -s`
ARCH=`uname -m`
KERNEL=`uname -s`
echo "$HOSTNAME $ARCH $KERNEL"
VERSION=`./imapsync --version`
BIN_NAME=imapsync_bin_Darwin
pp -o $BIN_NAME \
-M Mail::IMAPClient -M IO::Socket -M IO::Socket::SSL \
-M Digest::MD5 -M Digest::HMAC_MD5 -M Term::ReadKey \
-M Authen::NTLM \
imapsync
./imapsync_bin_Darwin
./imapsync_bin_Darwin --tests
./imapsync_bin_Darwin --testslive

View File

@ -124,7 +124,7 @@
.\" ========================================================================
.\"
.IX Title "IMAPSYNC 1"
.TH IMAPSYNC 1 "2015-04-01" "perl v5.14.2" "User Contributed Perl Documentation"
.TH IMAPSYNC 1 "2015-07-17" "perl v5.14.2" "User Contributed Perl Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@ -135,7 +135,7 @@ Synchronises mailboxes between two imap servers.
Good at IMAP migration. More than 52 different IMAP server softwares
supported with success, few failures.
.PP
$Revision: 1.637 $
$Revision: 1.644 $
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
To synchronize imap account \*(L"foo\*(R" on \*(L"imap.truc.org\*(R"
@ -489,130 +489,7 @@ http://www.catb.org/~esr/faqs/smart\-questions.html
and then forget it.
.SH "IMAP SERVERS"
.IX Header "IMAP SERVERS"
Failure stories reported in the past with the following 6 imap servers.
Maybe last imapsync release can run successfully with them.
Don't hesitate to have a try, It's been a long time since last failure occured,
I will help you and make efforts to switch them to the success list,
that's my job.
.PP
.Vb 9
\& \- MailEnable 1.54 (Proprietary) but MailEnable 4.23 is supported.
\& \- DBMail 0.9, 2.0.7 (GPL). But DBMail 1.2.1 is supported.
\& Patient and confident testers are welcome.
\& \- Imail 7.04 (maybe).
\& \- (2011) MDaemon 12.0.3 as host2 but MDaemon is supported as host1.
\& MDaemon is simply buggy with the APPEND IMAP command with
\& any IMAP email client.
\& \- Hotmail since hotmail.com does not provide IMAP access
\& \- Outlook.com since outlook.com does not provide IMAP access
.Ve
.PP
Success stories reported with the following 62 imap servers
(software names are in alphabetic order):
.PP
.Vb 10
\& \- 1und1 H mimap1 84498 [host1] H mibap4 95231 [host1]
\& \- a1.net imap.a1.net IMAP4 Ready [host1]
\& \- Apple Server 10.6 Snow Leopard [host1]
\& \- Archiveopteryx 2.03, 2.04, 2.09, 2.10 [host2], 3.0.0 [host2]
\& (OSL 3.0) http://www.archiveopteryx.org/
\& \- Atmail 6.x [host1]
\& \- Axigen Mail Server Version 8.0.0
\& \- BincImap 1.2.3 (GPL) (http://www.bincimap.org/)
\& \- CommuniGatePro server (Redhat 8.0) (Solaris), CommuniGate Pro 5.2.17[host2] (CentOS 5.4)
\& \- Courier IMAP 1.5.1, 2.2.0, 2.1.1, 2.2.1, 3.0.8, 3.0.3, 4.1.1 (GPL)
\& (http://www.courier\-mta.org/)
\& \- Critical Path (7.0.020)
\& \- Cyrus IMAP 1.5, 1.6,
\& 2.1, 2.1.15, 2.1.16, 2.1.18
\& 2.2.1, 2.2.2\-BETA, 2.2.3, 2.2.6, 2.2.10, 2.2.12, 2.2.13,
\& 2.3\-alpha (OSI Approved), 2.3.1, 2.3.7, 2.3.16
\& (http://asg.web.cmu.edu/cyrus/)
\& \- David Tobit V8 (proprietary Message system).
\& \- Deerfield VisNetic MailServer 5.8.6 [host1] (http://www.deerfield.net/products/visnetic\-mailserver/)
\& \- DBMail 1.2.1, 2.0.4, 2.0.9, 2.2rc1 (GPL) (http://www.dbmail.org/).
\& 2.0.7 seems buggy.
\& \- DBOX 2.41 System [host1] (http://www.dbox.handshake.de/).
\& \- Deerfield VisNetic MailServer 5.8.6 [host1]
\& \- dkimap4 [host1]
\& \- Domino (Notes) 4.61 [host1], 6.5 [host1], 5.0.6, 5.0.7, 7.0.2, 6.0.2CF1,
\& 7.0.1 [host1], 8.0.1 [host1], 8.5.2 [host2], 8.5.3 [host1]
\& \- Dovecot 0.99.10.4, 0.99.14, 0.99.14\-8.fc4, 1.0\-0.beta2.7,
\& 1.0.0 [dest/source] (LGPL) (http://www.dovecot.org/)
\& \- Eudora WorldMail v2
\& \- FirtClass 9 [host1] Read the FAQ! (http://www.firstclass.com/)
\& \- FTGate (http://www.ftgate.com/)
\& \- Fusemail imap.fusemail.net:143 (https://www.fusemail.com/).
\& \- Gimap (Gmail imap)
\& \- GMX IMAP4 StreamProxy.
\& \- Groupwise IMAP (Novell) 6.x and 7.0. Buggy so see the FAQ.
\& \- hMailServer 5.40\-B1950 [host12], 5.3.3 [host2], 4.4.1 [host1] (see FAQ)
\& \- IceWarp Server 10.4.5 [host1] (http://www.icewarp.com/)
\& \- iPlanet Messaging server 4.15, 5.1, 5.2
\& \- IMail 7.15 (Ipswitch/Win2003), 8.12, 11.03 [host1]
\& \- Kerio 7.2.0 Patch 1 [host12], Kerio 8 [host1]
\& \- Mail2World IMAP4 Server 2.5 [host1] (http://www.mail2world.com/)
\& \- MailEnable 4.23 [host1] [host2], 4.26 [host1][host2], 5 [host1]
\& \- MDaemon 7.0.1, 8.0.2, 8.1, 9.5.4 (Windows server 2003 R2 platform),
\& 9.6.5 [host1], 12 [host2], 12.0.3 [host1], 12.5.5 [host1],
\& 13.5 [host2], 14.5 [host2]
\& \- Mercury 4.1 (Windows server 2000 platform)
\& \- Microsoft Exchange Server 5.5, 6.0.6249.0[host1], 6.0.6487.0[host1],
\& 6.5.7638.1 [host2], 6.5 [host1], Exchange 2007 SP1 (with Update Rollup 2),
\& Exchange2007\-EP\-SP2,
\& Exchange 2010 RTM (Release to Manufacturing) [host2],
\& Exchange 2010 SP1 RU2[host2],
\& \- Mirapoint, 4.1.9\-GA [host1]
\& \- Netscape Mail Server 3.6 (Wintel !)
\& \- Netscape Messaging Server 4.15 Patch 7
\& \- Office 365 [host1] [host2]
\& \- OpenMail IMAP server B.07.00.k0 (Samsung Contact ?)
\& \- OpenWave
\& \- Oracle Beehive [host1]
\& \- Parallels Plesk Panel 9.x [host2] 11.x [host2] (http://www.parallels.com/)
\& \- Qualcomm Worldmail (NT)
\& \- QQMail IMAP4Server [host1] [host2] https://en.mail.qq.com/
\& \- RackSpace hoster secure.emailsrvr.com:993 http://www.rackspace.com/
\& \- Rockliffe Mailsite 5.3.11, 4.5.6
\& \- Samsung Contact IMAP server 8.5.0
\& \- Scalix v10.1, 10.0.1.3, 11.0.0.431, 11.4.6
\& \- Sendmail Mail Store IMAP4rev1 (5.5.6/mstore\-5\-5\-build\-1874 [host1].
\& \- SmarterMail, Smarter Mail 5.0 Enterprise, Smarter Mail 5.5 [host1],
\& SmarterMail Professional 10.2 [host1], Smarter Mail 11.7 [host1][host2].
\& \- Softalk Workgroup Mail 7.6.4 [host1].
\& \- SunONE Messaging server 5.2, 6.0 (SUN JES \- Java Enterprise System)
\& \- Sun Java(tm) System Messaging Server 6.2\-2.05, 6.2\-7.05, 6.3
\& \- Surgemail 3.6f5\-5, 6.3d\-72 [host2]
\& \- UW\-imap servers (imap\-2000b) rijkkramer IMAP4rev1 2000.287
\& (RedHat uses UW like 2003.338rh), v12.264 Solaris 5.7 (OSI Approved)
\& (http://www.washington.edu/imap/)
\& \- UW \- QMail v2.1
\& \- VMS, Imap part of TCP/IP suite of VMS 7.3.2
\& \- Yahoo [host1]
\& \- Zarafa 6,40,0,20653 [host1] (http://www.zarafa.com/)
\& \- Zarafa ZCP 7.1.4 IMAP Gateway [host2]
\& \- Zimbra\-IMAP 3.0.1 GA 160, 3.1.0 Build 279, 4.0.5, 4.5.2, 4.5.6,
\& Zimbra 5.0.24_GA_3356.RHEL4 [host1], 5.5, 6.x
.Ve
.PP
Please report to the author any success or bad story with
imapsync and do not forget to mention the \s-1IMAP\s0 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:
.PP
.Vb 2
\& Host1 software:* OK louloutte Cyrus IMAP4 v1.5.19 server ready
\& Host2 software:* OK Courier\-IMAP ready
.Ve
.PP
You can use option \-\-justconnect to get those lines.
Example:
.PP
.Vb 1
\& imapsync \-\-host1 imap.troc.org \-\-host2 imap.trac.org \-\-justconnect
.Ve
See http://imapsync.lamiral.info/S/imapservers.shtml
.SH "HUGE MIGRATION"
.IX Header "HUGE MIGRATION"
Pay special attention to options
@ -692,4 +569,4 @@ https://web.archive.org/web/20070202005121/http://www.imap.org/products/showall.
.PP
Feedback (good or bad) will often be welcome.
.PP
\&\f(CW$Id:\fR imapsync,v 1.637 2015/04/01 01:36:37 gilles Exp gilles $
\&\f(CW$Id:\fR imapsync,v 1.644 2015/07/17 01:22:52 gilles Exp gilles $

View File

@ -1,5 +1,5 @@
REM $Id: install_modules.bat,v 1.15 2015/03/03 11:23:12 gilles Exp gilles $
REM $Id: install_modules.bat,v 1.17 2015/05/23 09:40:38 gilles Exp gilles $
@ECHO OFF
@ -33,6 +33,10 @@ FOR %%M in ( ^
Test::Pod ^
Unicode::String ^
URI::Escape ^
JSON::WebToken ^
LWP ^
HTML::Entities ^
JSON ^
) DO ECHO Updating %%M ^
& perl -MCPAN -e "install %%M"

0
W/learn/imapclient3xx_skeleton_test Normal file → Executable file
View File

43
W/learn/mail2world Executable file
View File

@ -0,0 +1,43 @@
#!/usr/bin/perl -w
use lib '/g/public_html/imapsync/W/Mail-IMAPClient-3.35/lib/' ;
use Mail::IMAPClient ;
use Data::Dumper ;
$ARGV[3] or die "usage: $0 host user password folder\n" ;
print "Mail::IMAPClient $Mail::IMAPClient::VERSION\n" ;
$host = $ARGV[0] ;
$user = $ARGV[1] ;
$password = $ARGV[2] ;
$folder = $ARGV[3] ;
my $imap = Mail::IMAPClient->new();
$imap->Debug(1);
$imap->Uid( 0 ) ;
$imap->Server( $host ) ;
$imap->connect( ) or die ;
$imap->IsUnconnected( );
$imap->User( $user ) ;
$imap->Password( $password ) ;
$imap->login( ) or die ;
$imap->Uid( 1 ) ;
$imap->Peek( 1 ) ;
$imap->select( $folder ) or die ;
print "==== tag_and_run\n" ;
$imap->tag_and_run( 'UID FETCH 1:* ( RFC822.SIZE )' ) ;
print "==== fetch\n" ;
print $imap->fetch( "1:*", "RFC822.SIZE" ) ;
print "==== fetch_hash\n" ;
my $hashref = {} ;
$imap->fetch_hash( "1:*", "RFC822.SIZE", $hashref ) ;
foreach my $m (keys %$hashref) {
print "Msg $m is ", $hashref->{$m}->{'RFC822.SIZE'}, " bytes\n" ;
}
print Data::Dumper->Dump( [ $hashref ] ) ;
$imap->logout( ) ;

7
W/memo
View File

@ -1,6 +1,6 @@
#!/bin/sh
# $Id: memo,v 1.51 2015/01/19 01:26:51 gilles Exp gilles $
# $Id: memo,v 1.52 2015/04/25 01:27:47 gilles Exp gilles $
count_nice() {
@ -231,6 +231,7 @@ statistics_VERSION_synthesis() {
statistics_VERSION_yearly_runs $yyyy
done
)
}
@ -456,6 +457,10 @@ statistics_VERSION_synthesis() {
echo -n "$yyyy: "
statistics_VERSION_yearly_runs $yyyy
done
nb_runs_current_year=`statistics_VERSION_yearly_runs $year_now`
current_day_of_year=`date +%j`
echo; echo -n "$year_now~~"
echo "$nb_runs_current_year/$current_day_of_year*365" | bc
)
}

View File

@ -1,4 +1,4 @@
m4_dnl $Id: ml_announce.in,v 1.8 2014/10/22 11:04:30 gilles Exp gilles $
m4_dnl $Id: ml_announce.in,v 1.11 2015/04/01 12:29:55 gilles Exp gilles $
m4_dnl
m4_define(`M4_imapsync_VERSION',m4_esyscmd(cat VERSION|tr -d '\n'))m4_dnl
m4_define(`M4_SECRET_PATH',m4_esyscmd(cat dist/path_last.txt|tr -d '\n'))m4_dnl
@ -8,7 +8,7 @@ Bcc: gilles@lamiral.info
Subject: [imapsync update] new imapsync release M4_imapsync_VERSION available
To: imapsync_update@lists.lamiral.info
Hello imapsync user,
Dear imapsync user,
You're subscribed to the newsletter announcing imapsync new releases
(very few traffic) and the way to get them. Send me a note if you
@ -17,19 +17,19 @@ don't want to receive those announces anymore.
You will find the latest imapsync.exe binary (release M4_imapsync_VERSION)
and the latest imapsync source code (release M4_imapsync_VERSION) at the following link:
http://imapsync.lamiral.info/dist/M4_SECRET_PATH/
http://imapsync.lamiral.info/dist/M4_SECRET_PATH/
or also from this page
or also more permanently from this page
http://imapsync.lamiral.info/paypal_return.shtml
http://imapsync.lamiral.info/paypal_return.shtml
Three files are there:
- imapsync is directly the perl script (also found in the tarball) for a fast upgrade.
- imapsync-M4_imapsync_VERSION.tgz is the tarball containing everything of the project (maybe too much)
- imapsync.M4_imapsync_VERSION.zip is the win32 zip archive including standalone binary imapsync.exe.
Three important files are there:
* imapsync is directly the perl script (also found in the tarball and zip) for a fast upgrade.
* imapsync-M4_imapsync_VERSION.tgz is the tarball containing everything of the project (maybe too much)
* imapsync.M4_imapsync_VERSION.zip is the win32 zip archive including standalone binary imapsync.exe.
What's new in this M4_imapsync_VERSION release can be found at
http://imapsync.lamiral.info/#latest
http://imapsync.lamiral.info/S/news.shtml
I thank you again for buying and using imapsync,
I wish you successful imap transfers!

View File

@ -1,93 +0,0 @@
Date
Code journal
Nom journal
Cte tresorerie associe
Reference
Libelle
Montant TTC
non utilise
Code tiers
Pointage tiers
Compte ventilation 1
Libelle ventilation 1
Code TVA 1
Compte analytique 1
Montant depense 1
Montant recette 1
Montant TVA 1
Compte TVA 1
Compte ventilation 2
Libelle ventilation 2
Code TVA 2
Compte analytique 2
Montant depense 2
Montant recette 2
Montant TVA 2
Compte TVA 2
Compte ventilation 3
Libelle ventilation 3
Code TVA 3
Compte analytique 3
Montant depense 3
Montant recette 3
Montant TVA 3
Compte TVA 3
Compte ventilation 4
Libelle ventilation 4
Code TVA 4
Compte analytique 4
Montant depense 4
Montant recette 4
Montant TVA 4
Compte TVA 4
Compte ventilation 5
Libelle ventilation 5
Code TVA 5
Compte analytique 5
Montant depense 5
Montant recette 5
Montant TVA 5
Compte TVA 5
Compte ventilation 6
Libelle ventilation 6
Code TVA 6
Compte analytique 6
Montant depense 6
Montant recette 6
Montant TVA 6
Compte TVA 6
Compte ventilation 7
Libelle ventilation 7
Code TVA 7
Compte analytique 7
Montant depense 7
Montant recette 7
Montant TVA 7
Compte TVA 7
Compte ventilation 8
Libelle ventilation 8
Code TVA 8
Compte analytique 8
Montant depense 8
Montant recette 8
Montant TVA 8
Compte TVA 8
Compte ventilation 9
Libelle ventilation 9
Code TVA 9
Compte analytique 9
Montant depense 9
Montant recette 9
Montant TVA 9
Compte TVA 9
Compte ventilation 10
Libelle ventilation 10
Code TVA 1
Compte analytique 10
Montant depense 10
Montant recette 10
Montant TVA 10
Compte TVA 10
Pointage
Divers
Verrou

View File

@ -1,6 +1,6 @@
#!/bin/sh
# $Id: memo,v 1.16 2014/05/01 22:08:06 gilles Exp $
# $Id: memo,v 1.17 2015/07/02 11:53:28 gilles Exp gilles $
echo paypal_bilan_todo

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
#!/bin/sh
# $Id: paypal_build_invoices,v 1.88 2015/03/26 01:56:35 gilles Exp gilles $
# $Id: paypal_build_invoices,v 1.94 2015/07/15 00:55:25 gilles Exp gilles $
# usage: sh paypal_build_invoices /g/var/paypal_invoices/????
@ -62,8 +62,14 @@ cp /home/gilles/public_html/AGIL/factures/000/facture_imapsync-000.tex /g/var/pa
#/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 3809 /g/paypal/paypal_2015_01_complet.csv
#/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 3877 /g/paypal/paypal_2015_02_complet.csv
#/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 3957 /g/paypal/virements_2015_03.csv
#/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 3959 /g/paypal/paypal_2015_03_complet.csv
#/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 4031 /g/paypal/paypal_2015_04_complet.csv
#/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 4085 /g/paypal/paypal_2015_05_complet.csv
#/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 4139 /g/paypal/paypal_2015_06_complet.csv
/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 3959 /g/paypal/paypal_2015_03_complet.csv
set -x
/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 4196 /g/paypal/paypal_2015_07_complet.csv
set +x
@ -120,11 +126,14 @@ cp /home/gilles/public_html/AGIL/factures/000/facture_imapsync-000.tex /g/var/pa
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 3691 /g/paypal/paypal_2014_11_complet.csv
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 3750 /g/paypal/paypal_2014_12_complet.csv
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 3809 /g/paypal/paypal_2015_01_complet.csv
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 3877 /g/paypal/paypal_2015_02_complet.csv
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 3959 /g/paypal/paypal_2015_03_complet.csv
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 4031 /g/paypal/paypal_2015_04_complet.csv
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 4085 /g/paypal/paypal_2015_05_complet.csv
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 4139 /g/paypal/paypal_2015_06_complet.csv
set -x
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 3877 /g/paypal/paypal_2015_02_complet.csv
#: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 3957 /g/paypal/virements_2015_03.csv
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 3959 /g/paypal/paypal_2015_03_complet.csv
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 4196 /g/paypal/paypal_2015_07_complet.csv
set +x
# La totale
@ -134,7 +143,7 @@ set +x
1330 1331 1332 1333 1334 1652 1653 2131 2132
2295 2296 2297 2298 2625 2626 2970 2971 2972
3093 3296 3411 3412 3450 3451 3614 3615 3616 3617
3807 3808 3957 3958' \
3807 3808 3957 3958 4030' \
/g/paypal/paypal_201?_??_complet.csv
#set -v
@ -143,7 +152,7 @@ set +x
1330 1331 1332 1333 1334 1652 1653 2131 2132
2295 2296 2297 2298 2625 2626 2970 2971 2972
3093 3296 3411 3412 3450 3451 3614 3615 3616 3617
3807 3808 3957 3958' \
3807 3808 3957 3958 4030' \
/g/paypal/paypal_201?_??_complet.csv
#set +v
@ -176,8 +185,17 @@ set +x
/g/paypal/paypal_2014_??_complet.csv
#set +v
#echo 2015 : ( from 3809 to ???? ) EUR
#set -v
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan \
--first_in 3809 --avoid_numbers '3807 3808 3957 3958 4030' \
/g/paypal/paypal_2015_??_complet.csv
#set +v
echo 'sh paypal_build_invoices /g/var/paypal_invoices/3???'
echo 'sh paypal_build_invoices /g/var/paypal_invoices/4???'
# USD de 147 à 340
# EUR de 341 à ...

File diff suppressed because it is too large Load Diff

View File

@ -1,86 +1,87 @@
Main code has high complexity score (381) at line 1, column 1. Consider refactoring. (Severity: 3)
Literal line breaks in a string at line 1028, column 1. See pages 60,61 of PBP. (Severity: 3)
Literal line breaks in a string at line 1040, column 1. See pages 60,61 of PBP. (Severity: 3)
Regular expression without "/x" flag at line 1212, column 33. See page 236 of PBP. (Severity: 3)
Regular expression without "/x" flag at line 1221, column 33. See page 236 of PBP. (Severity: 3)
Regular expression without "/x" flag at line 1238, column 18. See page 236 of PBP. (Severity: 3)
Literal line breaks in a string at line 1312, column 1. See pages 60,61 of PBP. (Severity: 3)
Literal line breaks in a string at line 1345, column 1. See pages 60,61 of PBP. (Severity: 3)
Code structure is deeply nested at line 1711, column 41. Consider refactoring. (Severity: 3)
Literal line breaks in a string at line 1859, column 1. See pages 60,61 of PBP. (Severity: 3)
Subroutine "errors_incr" does not end with "return" at line 1881, column 1. See page 197 of PBP. (Severity: 4)
Subroutine "tests_live_result" does not end with "return" at line 1906, column 1. See page 197 of PBP. (Severity: 4)
Reused variable name in lexical scope: $nb_errors at line 1907, column 2. Invent unique variable names. (Severity: 3)
Subroutine "foldersizesatend" does not end with "return" at line 1915, column 1. See page 197 of PBP. (Severity: 4)
Too many arguments at line 1941, column 1. See page 182 of PBP. (Severity: 3)
Too many arguments at line 1959, column 1. See page 182 of PBP. (Severity: 3)
Too many arguments at line 1969, column 1. See page 182 of PBP. (Severity: 3)
Too many arguments at line 2216, column 1. See page 182 of PBP. (Severity: 3)
Too many arguments at line 2277, column 1. See page 182 of PBP. (Severity: 3)
Subroutine "authenticate_imap" with high complexity score (21) at line 2338, column 1. Consider refactoring. (Severity: 3)
Too many arguments at line 2338, column 1. See page 182 of PBP. (Severity: 3)
Too many arguments at line 2442, column 1. See page 182 of PBP. (Severity: 3)
Regular expression without "/x" flag at line 2515, column 51. See page 236 of PBP. (Severity: 3)
Backtick operator used at line 2523, column 12. Use IPC::Open3 instead. (Severity: 3)
Subroutine "is_valid_directory" does not end with "return" at line 2653, column 1. See page 197 of PBP. (Severity: 4)
Close filehandles as soon as possible after opening them at line 2673, column 2. See page 209 of PBP. (Severity: 4)
Subroutine "remove_tmp_files" does not end with "return" at line 2684, column 1. See page 197 of PBP. (Severity: 4)
"die" used instead of "croak" at line 2698, column 2. See page 283 of PBP. (Severity: 3)
Always unpack @_ first at line 2799, column 1. See page 178 of PBP. (Severity: 4)
Regular expression without "/x" flag at line 2806, column 15. See page 236 of PBP. (Severity: 3)
Regular expression without "/x" flag at line 2807, column 15. See page 236 of PBP. (Severity: 3)
Regular expression without "/x" flag at line 2808, column 15. See page 236 of PBP. (Severity: 3)
Regular expression without "/x" flag at line 2834, column 31. See page 236 of PBP. (Severity: 3)
Reused variable name in lexical scope: $imap2 at line 2894, column 9. Invent unique variable names. (Severity: 3)
Regular expression without "/x" flag at line 2913, column 25. See page 236 of PBP. (Severity: 3)
Regular expression without "/x" flag at line 2916, column 20. See page 236 of PBP. (Severity: 3)
Mixed high and low-precedence booleans at line 2917, column 13. See page 70 of PBP. (Severity: 4)
Expression form of "eval" at line 3356, column 13. See page 161 of PBP. (Severity: 5)
Expression form of "eval" at line 3581, column 13. See page 161 of PBP. (Severity: 5)
Subroutine "select_msgs" does not end with "return" at line 3722, column 1. See page 197 of PBP. (Severity: 4)
Subroutine "tests_msgs_from_maxmin" does not end with "return" at line 3861, column 1. See page 197 of PBP. (Severity: 4)
Subroutine "copy_message" with high complexity score (25) at line 3938, column 1. Consider refactoring. (Severity: 3)
Too many arguments at line 3938, column 1. See page 182 of PBP. (Severity: 3)
Too many arguments at line 4016, column 1. See page 182 of PBP. (Severity: 3)
Too many arguments at line 4050, column 1. See page 182 of PBP. (Severity: 3)
Subroutine "tests_subject" does not end with "return" at line 4177, column 1. See page 197 of PBP. (Severity: 4)
Too many arguments at line 4240, column 1. See page 182 of PBP. (Severity: 3)
Subroutine "sleep_if_needed" does not end with "return" at line 4299, column 1. See page 197 of PBP. (Severity: 4)
Reused variable name in lexical scope: $total_bytes_transferred at line 4300, column 2. Invent unique variable names. (Severity: 3)
Reused variable name in lexical scope: $nb_msg_transferred at line 4300, column 2. Invent unique variable names. (Severity: 3)
Reused variable name in lexical scope: $nb_msg_transferred at line 4312, column 9. Invent unique variable names. (Severity: 3)
Reused variable name in lexical scope: $maxmessagespersecond at line 4312, column 9. Invent unique variable names. (Severity: 3)
Reused variable name in lexical scope: $total_bytes_transferred at line 4333, column 9. Invent unique variable names. (Severity: 3)
Reused variable name in lexical scope: $maxbytespersecond at line 4333, column 9. Invent unique variable names. (Severity: 3)
Hard tabs used at line 4918, column 10. See page 20 of PBP. (Severity: 3)
Expression form of "eval" at line 5522, column 13. See page 161 of PBP. (Severity: 5)
Regular expression without "/x" flag at line 5757, column 22. See page 236 of PBP. (Severity: 3)
Expression form of "eval" at line 5762, column 13. See page 161 of PBP. (Severity: 5)
Too many arguments at line 5926, column 1. See page 182 of PBP. (Severity: 3)
Always unpack @_ first at line 6088, column 1. See page 178 of PBP. (Severity: 4)
Backtick operator used at line 6095, column 4. Use IPC::Open3 instead. (Severity: 3)
Subroutine "tests_pipemess" does not end with "return" at line 6112, column 1. See page 197 of PBP. (Severity: 4)
Backtick operator used at line 6301, column 12. Use IPC::Open3 instead. (Severity: 3)
Backtick operator used at line 6321, column 11. Use IPC::Open3 instead. (Severity: 3)
Split long regexps into smaller qr// chunks at line 6459, column 12. See page 261 of PBP. (Severity: 3)
Split long regexps into smaller qr// chunks at line 6485, column 12. See page 261 of PBP. (Severity: 3)
Split long regexps into smaller qr// chunks at line 6514, column 12. See page 261 of PBP. (Severity: 3)
Split long regexps into smaller qr// chunks at line 6526, column 12. See page 261 of PBP. (Severity: 3)
Expression form of "eval" at line 6632, column 43. See page 161 of PBP. (Severity: 5)
Expression form of "eval" at line 6636, column 45. See page 161 of PBP. (Severity: 5)
Split long regexps into smaller qr// chunks at line 6841, column 20. See page 261 of PBP. (Severity: 3)
"$i" is declared but not used at line 6900, column 9. Unused variables clutter code and make it harder to read. (Severity: 3)
Magic variable "$ENV" should be assigned as "local" at line 6947, column 12. See pages 81,82 of PBP. (Severity: 4)
Magic variable "$ENV" should be assigned as "local" at line 6955, column 12. See pages 81,82 of PBP. (Severity: 4)
Test without a label at line 6962, column 2. Add a label argument to all Test::More functions. (Severity: 3)
Test without a label at line 6963, column 2. Add a label argument to all Test::More functions. (Severity: 3)
Reused variable name in lexical scope: $logfile at line 6968, column 2. Invent unique variable names. (Severity: 3)
Subroutine "teelaunch" does not end with "return" at line 6975, column 1. See page 197 of PBP. (Severity: 4)
Reused variable name in lexical scope: $logfile at line 6976, column 2. Invent unique variable names. (Severity: 3)
Close filehandles as soon as possible after opening them at line 6979, column 2. See page 209 of PBP. (Severity: 4)
"die" used instead of "croak" at line 6980, column 7. See page 283 of PBP. (Severity: 3)
Magic variable "*STDERR" should be assigned as "local" at line 6982, column 10. See pages 81,82 of PBP. (Severity: 4)
One-argument "select" used at line 6983, column 2. See page 224 of PBP. (Severity: 4)
Subroutine "testslive" does not end with "return" at line 7462, column 1. See page 197 of PBP. (Severity: 4)
Return value of eval not tested at line 7484, column 17. You can't depend upon the value of $@/$EVAL_ERROR to tell whether an eval failed. (Severity: 3)
Return value of eval not tested at line 7523, column 17. You can't depend upon the value of $@/$EVAL_ERROR to tell whether an eval failed. (Severity: 3)
Main code has high complexity score (387) at line 1, column 1. Consider refactoring. (Severity: 3)
Literal line breaks in a string at line 918, column 1. See pages 60,61 of PBP. (Severity: 3)
Literal line breaks in a string at line 930, column 1. See pages 60,61 of PBP. (Severity: 3)
Regular expression without "/x" flag at line 1112, column 33. See page 236 of PBP. (Severity: 3)
Regular expression without "/x" flag at line 1121, column 33. See page 236 of PBP. (Severity: 3)
Regular expression without "/x" flag at line 1138, column 18. See page 236 of PBP. (Severity: 3)
Literal line breaks in a string at line 1212, column 1. See pages 60,61 of PBP. (Severity: 3)
Literal line breaks in a string at line 1245, column 1. See pages 60,61 of PBP. (Severity: 3)
Code structure is deeply nested at line 1613, column 41. Consider refactoring. (Severity: 3)
Literal line breaks in a string at line 1761, column 1. See pages 60,61 of PBP. (Severity: 3)
Subroutine "errors_incr" does not end with "return" at line 1783, column 1. See page 197 of PBP. (Severity: 4)
Subroutine "tests_live_result" does not end with "return" at line 1808, column 1. See page 197 of PBP. (Severity: 4)
Reused variable name in lexical scope: $nb_errors at line 1809, column 2. Invent unique variable names. (Severity: 3)
Subroutine "foldersizesatend" does not end with "return" at line 1817, column 1. See page 197 of PBP. (Severity: 4)
Too many arguments at line 1843, column 1. See page 182 of PBP. (Severity: 3)
Too many arguments at line 1861, column 1. See page 182 of PBP. (Severity: 3)
Too many arguments at line 1871, column 1. See page 182 of PBP. (Severity: 3)
Subroutine "modules_VERSION" with high complexity score (21) at line 1989, column 1. Consider refactoring. (Severity: 3)
Too many arguments at line 2121, column 1. See page 182 of PBP. (Severity: 3)
Too many arguments at line 2182, column 1. See page 182 of PBP. (Severity: 3)
Subroutine "authenticate_imap" with high complexity score (21) at line 2243, column 1. Consider refactoring. (Severity: 3)
Too many arguments at line 2243, column 1. See page 182 of PBP. (Severity: 3)
Too many arguments at line 2347, column 1. See page 182 of PBP. (Severity: 3)
Regular expression without "/x" flag at line 2420, column 51. See page 236 of PBP. (Severity: 3)
Backtick operator used at line 2428, column 12. Use IPC::Open3 instead. (Severity: 3)
Subroutine "is_valid_directory" does not end with "return" at line 2558, column 1. See page 197 of PBP. (Severity: 4)
Close filehandles as soon as possible after opening them at line 2578, column 2. See page 209 of PBP. (Severity: 4)
Subroutine "remove_tmp_files" does not end with "return" at line 2589, column 1. See page 197 of PBP. (Severity: 4)
"die" used instead of "croak" at line 2603, column 2. See page 283 of PBP. (Severity: 3)
Always unpack @_ first at line 2704, column 1. See page 178 of PBP. (Severity: 4)
Regular expression without "/x" flag at line 2711, column 15. See page 236 of PBP. (Severity: 3)
Regular expression without "/x" flag at line 2712, column 15. See page 236 of PBP. (Severity: 3)
Regular expression without "/x" flag at line 2713, column 15. See page 236 of PBP. (Severity: 3)
Regular expression without "/x" flag at line 2739, column 31. See page 236 of PBP. (Severity: 3)
Reused variable name in lexical scope: $imap2 at line 2799, column 9. Invent unique variable names. (Severity: 3)
Regular expression without "/x" flag at line 2818, column 25. See page 236 of PBP. (Severity: 3)
Regular expression without "/x" flag at line 2821, column 20. See page 236 of PBP. (Severity: 3)
Mixed high and low-precedence booleans at line 2822, column 13. See page 70 of PBP. (Severity: 4)
Expression form of "eval" at line 3263, column 13. See page 161 of PBP. (Severity: 5)
Expression form of "eval" at line 3489, column 13. See page 161 of PBP. (Severity: 5)
Subroutine "select_msgs" does not end with "return" at line 3630, column 1. See page 197 of PBP. (Severity: 4)
Subroutine "tests_msgs_from_maxmin" does not end with "return" at line 3771, column 1. See page 197 of PBP. (Severity: 4)
Subroutine "copy_message" with high complexity score (25) at line 3848, column 1. Consider refactoring. (Severity: 3)
Too many arguments at line 3848, column 1. See page 182 of PBP. (Severity: 3)
Too many arguments at line 3926, column 1. See page 182 of PBP. (Severity: 3)
Too many arguments at line 3960, column 1. See page 182 of PBP. (Severity: 3)
Subroutine "tests_subject" does not end with "return" at line 4087, column 1. See page 197 of PBP. (Severity: 4)
Too many arguments at line 4150, column 1. See page 182 of PBP. (Severity: 3)
Subroutine "sleep_if_needed" does not end with "return" at line 4211, column 1. See page 197 of PBP. (Severity: 4)
Reused variable name in lexical scope: $total_bytes_transferred at line 4212, column 2. Invent unique variable names. (Severity: 3)
Reused variable name in lexical scope: $nb_msg_transferred at line 4212, column 2. Invent unique variable names. (Severity: 3)
Reused variable name in lexical scope: $nb_msg_transferred at line 4224, column 9. Invent unique variable names. (Severity: 3)
Reused variable name in lexical scope: $maxmessagespersecond at line 4224, column 9. Invent unique variable names. (Severity: 3)
Reused variable name in lexical scope: $total_bytes_transferred at line 4245, column 9. Invent unique variable names. (Severity: 3)
Reused variable name in lexical scope: $maxbytespersecond at line 4245, column 9. Invent unique variable names. (Severity: 3)
Hard tabs used at line 4830, column 10. See page 20 of PBP. (Severity: 3)
Expression form of "eval" at line 5434, column 13. See page 161 of PBP. (Severity: 5)
Regular expression without "/x" flag at line 5669, column 22. See page 236 of PBP. (Severity: 3)
Expression form of "eval" at line 5674, column 13. See page 161 of PBP. (Severity: 5)
Too many arguments at line 5838, column 1. See page 182 of PBP. (Severity: 3)
Always unpack @_ first at line 6000, column 1. See page 178 of PBP. (Severity: 4)
Backtick operator used at line 6007, column 4. Use IPC::Open3 instead. (Severity: 3)
Subroutine "tests_pipemess" does not end with "return" at line 6024, column 1. See page 197 of PBP. (Severity: 4)
Backtick operator used at line 6213, column 12. Use IPC::Open3 instead. (Severity: 3)
Backtick operator used at line 6233, column 11. Use IPC::Open3 instead. (Severity: 3)
Split long regexps into smaller qr// chunks at line 6373, column 12. See page 261 of PBP. (Severity: 3)
Split long regexps into smaller qr// chunks at line 6399, column 12. See page 261 of PBP. (Severity: 3)
Split long regexps into smaller qr// chunks at line 6428, column 12. See page 261 of PBP. (Severity: 3)
Split long regexps into smaller qr// chunks at line 6440, column 12. See page 261 of PBP. (Severity: 3)
Expression form of "eval" at line 6546, column 43. See page 161 of PBP. (Severity: 5)
Expression form of "eval" at line 6550, column 45. See page 161 of PBP. (Severity: 5)
Split long regexps into smaller qr// chunks at line 6755, column 20. See page 261 of PBP. (Severity: 3)
"$i" is declared but not used at line 6814, column 9. Unused variables clutter code and make it harder to read. (Severity: 3)
Magic variable "$ENV" should be assigned as "local" at line 6861, column 12. See pages 81,82 of PBP. (Severity: 4)
Magic variable "$ENV" should be assigned as "local" at line 6869, column 12. See pages 81,82 of PBP. (Severity: 4)
Test without a label at line 6876, column 2. Add a label argument to all Test::More functions. (Severity: 3)
Test without a label at line 6877, column 2. Add a label argument to all Test::More functions. (Severity: 3)
Reused variable name in lexical scope: $logfile at line 6882, column 2. Invent unique variable names. (Severity: 3)
Subroutine "teelaunch" does not end with "return" at line 6889, column 1. See page 197 of PBP. (Severity: 4)
Reused variable name in lexical scope: $logfile at line 6890, column 2. Invent unique variable names. (Severity: 3)
Close filehandles as soon as possible after opening them at line 6893, column 2. See page 209 of PBP. (Severity: 4)
"die" used instead of "croak" at line 6894, column 7. See page 283 of PBP. (Severity: 3)
Magic variable "*STDERR" should be assigned as "local" at line 6896, column 10. See pages 81,82 of PBP. (Severity: 4)
One-argument "select" used at line 6897, column 2. See page 224 of PBP. (Severity: 4)
Subroutine "testslive" does not end with "return" at line 7387, column 1. See page 197 of PBP. (Severity: 4)
Return value of eval not tested at line 7409, column 17. You can't depend upon the value of $@/$EVAL_ERROR to tell whether an eval failed. (Severity: 3)
Return value of eval not tested at line 7448, column 17. You can't depend upon the value of $@/$EVAL_ERROR to tell whether an eval failed. (Severity: 3)

View File

@ -1,11 +1,11 @@
$SHELL says /bin/bash
$0 gives ./INSTALL.d/prerequisites_imapsync
ps -ef gives gilles 14968 14967 0 04:58 pts/13 00:00:00 /bin/sh ./INSTALL.d/prerequisites_imapsync
ps -ef gives gilles 9123 9122 0 20:33 pts/28 00:00:00 /bin/sh ./INSTALL.d/prerequisites_imapsync
Distributor ID: Ubuntu
Description: Ubuntu 12.04.5 LTS
Release: 12.04
Codename: precise
Linux petite 3.2.0-77-generic #114-Ubuntu SMP Tue Mar 10 17:25:28 UTC 2015 i686 i686 i386 GNU/Linux
Linux petite 3.2.0-84-generic #121-Ubuntu SMP Tue May 5 18:55:46 UTC 2015 i686 i686 i386 GNU/Linux
Ok: Found Perl 5.14.2
Ok: Found Perl module Digest::HMAC_MD5
Ok: Found Perl module Authen::NTLM

View File

@ -72,12 +72,17 @@ Several options are mandatory.
--exclude 'fold1|fold2|f3' skips fold1, fold2 and f3.
--exclude <regex> : or this one, etc.
--subfolder2 <string> : Move whole host1 folders hierarchy under this
host2 folder <string>.
It does it by adding two --regextrans2 options before
all others. Add --debug to see what's really going on.
--regextrans2 <regex> : Apply the whole regex to each destination folders.
--regextrans2 <regex> : and this one. etc.
When you play with the --regextrans2 option, first
add also the safe options --dry --justfolders
Then, when happy, remove --dry, remove --justfolders.
Have in mind that --regextrans2 is applied after prefix
Have in mind that --regextrans2 is applied after prefix
and separator inversion.
--tmpdir <string> : Where to store temporary files and subdirectories.
@ -95,8 +100,8 @@ Several options are mandatory.
--prefix1 <string> : 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, all other
cases are bad.
does not have NAMESPACE capability, so imapsync
suggests to use it. All other cases are bad.
--prefix2 <string> : Add prefix to all host2 folders. See --prefix1
--sep1 <string> : Host1 separator in case NAMESPACE is not supported.
--sep2 <string> : Host2 separator in case NAMESPACE is not supported.
@ -106,6 +111,10 @@ Several options are mandatory.
--skipmess is applied before --regexmess
--skipmess <regex> : or this one, etc.
--pipemess <command> : Apply this command to each message content before
the copy.
--pipemess <command> : and this one, etc.
--disarmreadreceipts : Disarms read receipts (host2 Exchange issue)
--regexmess <regex> : Apply the whole regex to each message before transfer.
@ -213,6 +222,7 @@ Several options are mandatory.
--debugimap1 : IMAP debug mode for host1. imap debug is very verbose.
--debugimap2 : IMAP debug mode for host2.
--debugimap : IMAP debug mode for host1 and host2.
--debugmemory : Debug mode showing memory consumption after each copy.
--tests : Run non-regression tests.
--testslive : Run a live test with test1.lamiral.info imap server.
@ -238,20 +248,23 @@ imapsync \
--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-77-generic #114-Ubuntu SMP Tue Mar 10 17:25:28 UTC 2015 i686)
Here is a [linux] system (Linux petite 3.2.0-84-generic #121-Ubuntu SMP Tue May 5 18:55:46 UTC 2015 i686)
With perl 5.14.2 Mail::IMAPClient 3.30
$Id: imapsync,v 1.637 2015/04/01 01:36:37 gilles Exp gilles $
$Id: imapsync,v 1.644 2015/07/17 01:22:52 gilles Exp gilles $
This current imapsync is up to date
Homepage: http://imapsync.lamiral.info/
[MSG] No '/home/gilles/.cpanplus/custom-sources' dir, skipping custom sources
[MSG] No '/home/gilles/.cpanplus/custom-sources' dir, skipping custom sources
[MSG] No '/home/gilles/.cpanplus/custom-sources' dir, skipping custom sources
'Tie::Hash::NamedCapture' => '0.08',
'Authen::NTLM::DES' => '1.02',
'Authen::NTLM::MD4' => '1.02',
'IO::Compress::Gzip' => '2.048',
'IO::Uncompress::Gunzip' => '2.048',
'IO::Compress::Gzip::Constants' => '2.048',
'IO::Compress::Base::Common' => '2.048',
'IO::Uncompress::Gunzip' => '2.048',
'Compress::Raw::Zlib' => '2.048',
'Convert::ASN1::IO' => 'undef',
'Convert::ASN1::_decode' => 'undef',
@ -260,6 +273,7 @@ Homepage: http://imapsync.lamiral.info/
'Crypt::SSLeay::X509' => 'undef',
'Crypt::SSLeay::CTX' => 'undef',
'Digest::HMAC' => '1.03',
'Encode::HanExtra' => '0.23',
'Cwd' => '3.33',
'HTML::Parser' => '3.69',
'HTTP::Cookies::Netscape' => '6.00',
@ -270,7 +284,6 @@ Homepage: http://imapsync.lamiral.info/
'IO::Uncompress::Inflate' => '2.048',
'IO::Uncompress::RawInflate' => '2.048',
'HTTP::Message' => '6.01',
'Compress::Raw::Bzip2' => '2.048',
'File::GlobMapper' => '1.000',
'IO::Compress::Base' => '2.048',
'IO::Compress::Adapter::Bzip2' => '2.048',
@ -280,6 +293,7 @@ Homepage: http://imapsync.lamiral.info/
'Socket6' => '0.23',
'IO::Socket::INET6' => '2.69',
'Net::SSLeay' => '1.42',
'Compress::Raw::Bzip2' => '2.048',
'IO::Uncompress::Adapter::Bunzip2' => '2.048',
'IO::Uncompress::Base' => '2.048',
'IO::Compress::Zlib::Constants' => '2.048',
@ -287,10 +301,11 @@ Homepage: http://imapsync.lamiral.info/
'common::sense' => '3.4',
'Authen::NTLM' => '1.09',
'CPAN::Config' => 'undef',
'URI::data' => 'undef',
'URI::_idna' => 'undef',
'URI' => '1.59',
'URI::mailto' => 'undef',
'URI::_userpass' => 'undef',
'URI::_query' => 'undef',
'URI::data' => 'undef',
'URI::QueryParam' => 'undef',
'URI::Split' => 'undef',
'URI::_foreign' => 'undef',
@ -318,6 +333,8 @@ Homepage: http://imapsync.lamiral.info/
'URI::file::Win32' => 'undef',
'URI::file::Unix' => 'undef',
'URI::file::Base' => 'undef',
'URI::sip' => '0.11',
'URI::_login' => 'undef',
'URI::_punycode' => '0.04',
'URI::IRI' => 'undef',
'URI::_ldap' => '1.12',
@ -325,19 +342,19 @@ Homepage: http://imapsync.lamiral.info/
'URI::news' => 'undef',
'URI::rtsp' => 'undef',
'URI::Heuristic' => '4.20',
'URI::_userpass' => 'undef',
'URI::sip' => '0.11',
'URI::_login' => 'undef',
'URI::_idna' => 'undef',
'URI::_generic' => 'undef',
'URI' => '1.59',
'URI::_server' => 'undef',
'File::Listing' => '6.03',
'HTTP::Status' => '6.00',
'LWP::MediaTypes' => '6.01',
'HTTP::Negotiate' => '6.00',
'HTTP::Date' => '6.00',
'HTTP::Request' => '6.00',
'File::Listing' => '6.03',
'Net::HTTP' => '6.02',
'HTTP::Status' => '6.00',
'LWP::Protocol' => '6.00',
'HTTP::Response' => '6.01',
'Net::HTTPS' => '6.02',
'LWP::Debug' => 'undef',
'HTTP::Negotiate' => '6.00',
'Net::LDAP' => '0.43',
'Net::LDAP::LDIF' => '0.18',
'Mail::Internet' => '2.08',
@ -345,16 +362,12 @@ Homepage: http://imapsync.lamiral.info/
'HTTP::Config' => '6.00',
'HTTP::Request::Common' => '6.00',
'LWP::ConnCache' => '6.02',
'HTTP::Headers' => '6.00',
'HTTP::Cookies' => '6.00',
'HTTP::Headers' => '6.00',
'Encode::Locale' => '1.02',
'HTTP::Headers::Util' => '6.00',
'LWP::MemberMixin' => 'undef',
'LWP' => '6.03',
'HTTP::Date' => '6.00',
'HTTP::Request' => '6.00',
'LWP::Protocol' => '6.00',
'HTTP::Response' => '6.01',
'Compress::Zlib' => '2.048',
'Mail::IMAPClient::MessageSet' => 'undef',
'Digest::HMAC_MD5' => '1.01',
@ -389,20 +402,23 @@ Homepage: http://imapsync.lamiral.info/
'Test::Builder::Module' => '0.98',
'URI::WithBase' => '2.20',
'URI::file' => '4.21',
'URI::_server' => 'undef',
'Unicode::CharName' => '1.07',
'Data::Uniqid' => '0.12',
'Digest::HMAC_SHA1' => '1.03',
'File::Copy::Recursive' => '0.38',
'IO::Tee' => '0.64',
'JSON::XS::Boolean' => 'undef',
'JSON' => '2.53',
'Term::ReadKey' => '2.30',
'Test::More' => '0.98',
'Unicode::String' => '2.09',
'File::Spec::Unix' => '3.33',
'File::Spec' => '3.33',
'JSON::XS::Boolean' => 'undef',
'JSON::XS' => '2.32',
'LWP::UserAgent' => '6.03',
'HTML::Entities' => '3.69',
'URI::Escape' => '3.31',
'LWP::Authen::Digest' => 'undef',
'LWP::Authen::Ntlm' => '6.00',
'LWP::Protocol::GHTTP' => 'undef',
@ -418,9 +434,8 @@ Homepage: http://imapsync.lamiral.info/
'LWP::Protocol::nntp' => 'undef',
'LWP::Protocol::nogo' => 'undef',
'LWP::Authen::Basic' => 'undef',
'URI::http' => 'undef',
'URI::URL' => '5.04',
'URI::http' => 'undef',
'LWP::Protocol::http' => 'undef',
'LWP::Protocol::ldap' => '1.11',
'IO::Socket::SSL' => '1.53',
'URI::Escape' => '3.31',

View File

@ -1,5 +1,5 @@
@REM $Id: test3.bat,v 1.19 2015/03/15 03:02:58 gilles Exp gilles $
@REM $Id: test3.bat,v 1.20 2015/05/11 01:08:57 gilles Exp gilles $
cd /D %~dp0
@REM \$1 must be $1 on Windows
@ -12,14 +12,20 @@ cd /D %~dp0
@REM perl .\imapsync --host1 p --user1 tata --passfile1 secret.tata --host2 p --user2 titi --passfile2 secret.titi ^
@REM --nofoldersizes --regextrans2 "s,INBOX\\yop\\(.*),OLDBOX\\$1," --prefix1 "" --sep1 "." --sep2 "\\" --prefix2 "" --justfolders --dry --debug
.\imapsync.exe ^
--host1 p --user1 tata ^
--passfile1 secret.tata ^
--host2 imap-mail.outlook.com --ssl2 --user2 gilles.lamiral@outlook.com ^
--passfile2 secret.outlook.com ^
--folder INBOX --usecache --regextrans2 "s/INBOX/tata/"
@REM .\imapsync.exe --host1 p --user1 tata --passfile1 secret.tata --host2 imap-mail.outlook.com --ssl2 --user2 gilles.lamiral@outlook.com ^
@REM --passfile2 secret.outlook.com --folder INBOX --usecache --regextrans2 "s/INBOX/tata/"
@REM Change all " to _
@REM --justfolders --nofoldersizes --dry --regextrans2 s,\^",_,g
@REM perl .\imapsync --host1 p --user1 tata --passfile1 secret.tata --host2 p --user2 titi --passfile2 secret.titi ^
@REM --justfolders --nofoldersizes --dry --regextrans2 "s,(/|^) +,$1,g" --regextrans2 "s, +(/|$),$1,g"
perl .\imapsync --host1 p --user1 tata --passfile1 secret.tata --host2 p --user2 titi --passfile2 secret.titi ^
--justfolders --subfolder2 SUB2
@EXIT

2
W/test_cook_exe.bat Executable file → Normal file
View File

@ -1,4 +1,4 @@
REM $Id: test_exe.bat,v 1.11 2014/05/22 10:13:34 gilles Exp gilles $
REM $Id: test_cook_exe.bat,v 1.1 2015/04/02 23:38:23 gilles Exp gilles $
cd /D %~dp0

2
W/test_cook_src.bat Executable file → Normal file
View File

@ -1,4 +1,4 @@
REM $Id: test_exe.bat,v 1.11 2014/05/22 10:13:34 gilles Exp gilles $
REM $Id: test_cook_src.bat,v 1.1 2015/04/02 23:38:16 gilles Exp gilles $
cd /D %~dp0

View File

@ -1,6 +1,6 @@
@REM
@REM $Id: test_exe_2.bat,v 1.6 2015/03/20 03:11:22 gilles Exp gilles $
@REM $Id: test_exe_2.bat,v 1.8 2015/06/27 20:00:55 gilles Exp gilles $
@REM cd C:\msys\1.0\home\Admin\imapsync
cd /D %~dp0
@ -15,4 +15,9 @@ cd /D %~dp0
@REM --dry --nofoldersizes --regextrans2 "s,(.*),\L$1," --justfolders
@REM .\imapsync.exe --testslive
perl .\imapsync --tests
@REM perl .\imapsync --tests
@REM .\imapsync.exe --testslive --authmech2 XOAUTH2
@REM .\imapsync.exe --host1 p --user1 tata --passfile1 secret.tata --host2 imap.gmail.com --ssl2 --user2 gilles.lamiral@gmail.com --passfile2 secret.gilles_gmail --authmech2 XOAUTH2
.\imapsync.exe --host1 mail2.name-services.com --user1 jessica@champlaindoor.com --passfile1 secret.mail2World --host2 mail.emailsrvr.com --user2 jessica@champlaindoor.com --passfile2 secret.mail2World --sep1 / --prefix1 "" --noabletosearch --fetch_hash_set "1:*" --delete2duplicates

14
W/test_reg.bat Normal file
View File

@ -0,0 +1,14 @@
REM $Id: test_reg.bat,v 1.3 2015/05/11 01:08:05 gilles Exp gilles $
cd /D %~dp0
perl ./imapsync --host1 p --user1 tata --passfile1 secret.tata --host2 p --user2 titi --passfile2 secret.titi ^
--justfolders --dry --nofoldersizes ^
--regextrans2 "s/\./_/g"
@REM --regextrans2 "s,${h2_prefix}(.*),${h2_prefix}old_mail${h2_sep}$1," ^
@REM --regextrans2 "s,^INBOX$,${h2_prefix}old_mail${h2_sep}INBOX,"
@REM --regextrans2 "s,(.*),old_mail/$1,"

5
W/test_tests.bat Executable file → Normal file
View File

@ -1,10 +1,11 @@
@REM
@REM $Id: test_exe_2.bat,v 1.6 2015/03/20 03:11:22 gilles Exp gilles $
@REM $Id: test_tests.bat,v 1.2 2015/06/27 20:01:16 gilles Exp gilles $
@REM cd C:\msys\1.0\home\Admin\imapsync
cd /D %~dp0
perl .\imapsync --modules_version
perl .\imapsync --tests
@REM @PAUSE
@REM @PAUSE

219
imapsync
View File

@ -22,7 +22,7 @@ Synchronises mailboxes between two imap servers.
Good at IMAP migration. More than 52 different IMAP server softwares
supported with success, few failures.
$Revision: 1.637 $
$Revision: 1.644 $
=head1 SYNOPSIS
@ -375,123 +375,7 @@ and then forget it.
=head1 IMAP SERVERS
Failure stories reported in the past with the following 6 imap servers.
Maybe last imapsync release can run successfully with them.
Don't hesitate to have a try, It's been a long time since last failure occured,
I will help you and make efforts to switch them to the success list,
that's my job.
- MailEnable 1.54 (Proprietary) but MailEnable 4.23 is supported.
- DBMail 0.9, 2.0.7 (GPL). But DBMail 1.2.1 is supported.
Patient and confident testers are welcome.
- Imail 7.04 (maybe).
- (2011) MDaemon 12.0.3 as host2 but MDaemon is supported as host1.
MDaemon is simply buggy with the APPEND IMAP command with
any IMAP email client.
- Hotmail since hotmail.com does not provide IMAP access
- Outlook.com since outlook.com does not provide IMAP access
Success stories reported with the following 62 imap servers
(software names are in alphabetic order):
- 1und1 H mimap1 84498 [host1] H mibap4 95231 [host1]
- a1.net imap.a1.net IMAP4 Ready [host1]
- Apple Server 10.6 Snow Leopard [host1]
- Archiveopteryx 2.03, 2.04, 2.09, 2.10 [host2], 3.0.0 [host2]
(OSL 3.0) http://www.archiveopteryx.org/
- Atmail 6.x [host1]
- Axigen Mail Server Version 8.0.0
- BincImap 1.2.3 (GPL) (http://www.bincimap.org/)
- CommuniGatePro server (Redhat 8.0) (Solaris), CommuniGate Pro 5.2.17[host2] (CentOS 5.4)
- Courier IMAP 1.5.1, 2.2.0, 2.1.1, 2.2.1, 3.0.8, 3.0.3, 4.1.1 (GPL)
(http://www.courier-mta.org/)
- Critical Path (7.0.020)
- Cyrus IMAP 1.5, 1.6,
2.1, 2.1.15, 2.1.16, 2.1.18
2.2.1, 2.2.2-BETA, 2.2.3, 2.2.6, 2.2.10, 2.2.12, 2.2.13,
2.3-alpha (OSI Approved), 2.3.1, 2.3.7, 2.3.16
(http://asg.web.cmu.edu/cyrus/)
- David Tobit V8 (proprietary Message system).
- Deerfield VisNetic MailServer 5.8.6 [host1] (http://www.deerfield.net/products/visnetic-mailserver/)
- DBMail 1.2.1, 2.0.4, 2.0.9, 2.2rc1 (GPL) (http://www.dbmail.org/).
2.0.7 seems buggy.
- DBOX 2.41 System [host1] (http://www.dbox.handshake.de/).
- Deerfield VisNetic MailServer 5.8.6 [host1]
- dkimap4 [host1]
- Domino (Notes) 4.61 [host1], 6.5 [host1], 5.0.6, 5.0.7, 7.0.2, 6.0.2CF1,
7.0.1 [host1], 8.0.1 [host1], 8.5.2 [host2], 8.5.3 [host1]
- Dovecot 0.99.10.4, 0.99.14, 0.99.14-8.fc4, 1.0-0.beta2.7,
1.0.0 [dest/source] (LGPL) (http://www.dovecot.org/)
- Eudora WorldMail v2
- FirtClass 9 [host1] Read the FAQ! (http://www.firstclass.com/)
- FTGate (http://www.ftgate.com/)
- Fusemail imap.fusemail.net:143 (https://www.fusemail.com/).
- Gimap (Gmail imap)
- GMX IMAP4 StreamProxy.
- Groupwise IMAP (Novell) 6.x and 7.0. Buggy so see the FAQ.
- hMailServer 5.40-B1950 [host12], 5.3.3 [host2], 4.4.1 [host1] (see FAQ)
- IceWarp Server 10.4.5 [host1] (http://www.icewarp.com/)
- iPlanet Messaging server 4.15, 5.1, 5.2
- IMail 7.15 (Ipswitch/Win2003), 8.12, 11.03 [host1]
- Kerio 7.2.0 Patch 1 [host12], Kerio 8 [host1]
- Mail2World IMAP4 Server 2.5 [host1] (http://www.mail2world.com/)
- MailEnable 4.23 [host1] [host2], 4.26 [host1][host2], 5 [host1]
- MDaemon 7.0.1, 8.0.2, 8.1, 9.5.4 (Windows server 2003 R2 platform),
9.6.5 [host1], 12 [host2], 12.0.3 [host1], 12.5.5 [host1],
13.5 [host2], 14.5 [host2]
- Mercury 4.1 (Windows server 2000 platform)
- Microsoft Exchange Server 5.5, 6.0.6249.0[host1], 6.0.6487.0[host1],
6.5.7638.1 [host2], 6.5 [host1], Exchange 2007 SP1 (with Update Rollup 2),
Exchange2007-EP-SP2,
Exchange 2010 RTM (Release to Manufacturing) [host2],
Exchange 2010 SP1 RU2[host2],
- Mirapoint, 4.1.9-GA [host1]
- Netscape Mail Server 3.6 (Wintel !)
- Netscape Messaging Server 4.15 Patch 7
- Office 365 [host1] [host2]
- OpenMail IMAP server B.07.00.k0 (Samsung Contact ?)
- OpenWave
- Oracle Beehive [host1]
- Parallels Plesk Panel 9.x [host2] 11.x [host2] (http://www.parallels.com/)
- Qualcomm Worldmail (NT)
- QQMail IMAP4Server [host1] [host2] https://en.mail.qq.com/
- RackSpace hoster secure.emailsrvr.com:993 http://www.rackspace.com/
- Rockliffe Mailsite 5.3.11, 4.5.6
- Samsung Contact IMAP server 8.5.0
- Scalix v10.1, 10.0.1.3, 11.0.0.431, 11.4.6
- Sendmail Mail Store IMAP4rev1 (5.5.6/mstore-5-5-build-1874 [host1].
- SmarterMail, Smarter Mail 5.0 Enterprise, Smarter Mail 5.5 [host1],
SmarterMail Professional 10.2 [host1], Smarter Mail 11.7 [host1][host2].
- Softalk Workgroup Mail 7.6.4 [host1].
- SunONE Messaging server 5.2, 6.0 (SUN JES - Java Enterprise System)
- Sun Java(tm) System Messaging Server 6.2-2.05, 6.2-7.05, 6.3
- Surgemail 3.6f5-5, 6.3d-72 [host2]
- UW-imap servers (imap-2000b) rijkkramer IMAP4rev1 2000.287
(RedHat uses UW like 2003.338rh), v12.264 Solaris 5.7 (OSI Approved)
(http://www.washington.edu/imap/)
- UW - QMail v2.1
- VMS, Imap part of TCP/IP suite of VMS 7.3.2
- Yahoo [host1]
- Zarafa 6,40,0,20653 [host1] (http://www.zarafa.com/)
- Zarafa ZCP 7.1.4 IMAP Gateway [host2]
- Zimbra-IMAP 3.0.1 GA 160, 3.1.0 Build 279, 4.0.5, 4.5.2, 4.5.6,
Zimbra 5.0.24_GA_3356.RHEL4 [host1], 5.5, 6.x
Please report to the author any success or bad story with
imapsync and do not forget to 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:
Host1 software:* OK louloutte Cyrus IMAP4 v1.5.19 server ready
Host2 software:* OK Courier-IMAP ready
You can use option --justconnect to get those lines.
Example:
imapsync --host1 imap.troc.org --host2 imap.trac.org --justconnect
See http://imapsync.lamiral.info/S/imapservers.shtml
=head1 HUGE MIGRATION
@ -572,7 +456,7 @@ https://web.archive.org/web/20070202005121/http://www.imap.org/products/showall.
Feedback (good or bad) will often be welcome.
$Id: imapsync,v 1.637 2015/04/01 01:36:37 gilles Exp gilles $
$Id: imapsync,v 1.644 2015/07/17 01:22:52 gilles Exp gilles $
=cut
@ -624,6 +508,7 @@ my(
@folder, @include, @exclude, @folderrec,
@folderfirst, @folderlast,
$prefix1, $prefix2,
$subfolder2,
@regextrans2, @regexmess, @regexflag, @skipmess, @pipemess, $pipemesscheck,
$flagsCase, $filterflags, $syncflagsaftercopy,
$sep1, $sep2,
@ -709,13 +594,14 @@ my(
$log, $logfile,
$disarmreadreceipts,
$mixfolders, $skipemptyfolders,
$fetch_hash_set,
);
# main program
# global variables initialisation
$rcs = '$Id: imapsync,v 1.637 2015/04/01 01:36:37 gilles Exp gilles $ ';
$rcs = '$Id: imapsync,v 1.644 2015/07/17 01:22:52 gilles Exp gilles $ ';
$total_bytes_transferred = 0;
$total_bytes_skipped = 0;
@ -791,8 +677,8 @@ $modules_version = defined( $modules_version ) ? $modules_version : 1 ;
# The second line (ending with "1 ;") can stay active or be commented,
# the result will be the same: no releasecheck by default.
$releasecheck = defined( $releasecheck ) ? $releasecheck : 0 ;
#$releasecheck = defined( $releasecheck ) ? $releasecheck : 1 ;
#$releasecheck = defined( $releasecheck ) ? $releasecheck : 0 ;
$releasecheck = defined( $releasecheck ) ? $releasecheck : 1 ;
my $warn_release = ( $releasecheck ) ? check_last_release( ) : '' ;
@ -994,8 +880,12 @@ print "Info: imap connexions timeout is $timeout seconds\n";
$syncacls = (defined($syncacls)) ? $syncacls : 0 ;
$foldersizes = (defined($foldersizes)) ? $foldersizes : 1 ;
$foldersizesatend = (defined($foldersizesatend)) ? $foldersizesatend : $foldersizes ;
# No folders sizes if --justfolders, unless really wanted.
if ( $justfolders and not defined( $foldersizes ) ) { $foldersizes = 0 ; }
$foldersizes = ( defined( $foldersizes ) ) ? $foldersizes : 1 ;
$foldersizesatend = ( defined( $foldersizesatend ) ) ? $foldersizesatend : $foldersizes ;
@ -1054,6 +944,8 @@ $dry_message = "\t(not really since --dry mode)" if $dry ;
$search1 ||= $search if ( $search ) ;
$search2 ||= $search if ( $search ) ;
if ( $disarmreadreceipts ) {
push( @regexmess, 's{\A((?:[^\n]+\r\n)+|)(^Disposition-Notification-To:[^\n]*\n)(\r?\n|.*\n\r?\n)}{$1X-$2$3}ims' ) ;
}
@ -1175,6 +1067,14 @@ for ( @h2_folders_all ) {
$h2_folders_all_UPPER{ uc( $_ ) } = 1 ;
} ;
if ( defined( $subfolder2 ) ) {
unshift( @regextrans2,
's,^${h2_prefix}(.*),${h2_prefix}${subfolder2}${h2_sep}$1,',
's,^INBOX$,${h2_prefix}${subfolder2}${h2_sep}INBOX,'
) ;
}
if ( $fixInboxINBOX and ( my $reg = fix_Inbox_INBOX_mapping( \%h1_folders_all, \%h2_folders_all ) ) ) {
#print "RRRRRR $reg\n" ;
push( @regextrans2, $reg ) ;
@ -1510,7 +1410,8 @@ FOLDER: foreach my $h1_fold ( @h1_folders_wanted ) {
if ( @h1_msgs ) ;
}else{
my $uidnext = $imap1->uidnext( $h1_fold ) || $uidnext_default ;
$h1_fir_ref = $imap1->fetch_hash( "1:$uidnext", "FLAGS", "INTERNALDATE", "RFC822.SIZE", $h1_fir_ref )
my $fetch_hash_uids = $fetch_hash_set || "1:$uidnext" ;
$h1_fir_ref = $imap1->fetch_hash( $fetch_hash_uids, "FLAGS", "INTERNALDATE", "RFC822.SIZE", $h1_fir_ref )
if ( @h1_msgs ) ;
}
$debug and print "Host1 getting flags idate and sizes of folder [$h1_fold] took ", timenext(), " s\n";
@ -1564,7 +1465,8 @@ FOLDER: foreach my $h1_fold ( @h1_folders_wanted ) {
if (@h2_msgs) ;
}else{
my $uidnext = $imap2->uidnext( $h2_fold ) || $uidnext_default ;
$h2_fir_ref = $imap2->fetch_hash( "1:$uidnext", "FLAGS", "INTERNALDATE", "RFC822.SIZE", $h2_fir_ref )
my $fetch_hash_uids = $fetch_hash_set || "1:$uidnext" ;
$h2_fir_ref = $imap2->fetch_hash( $fetch_hash_uids, "FLAGS", "INTERNALDATE", "RFC822.SIZE", $h2_fir_ref )
if ( @h2_msgs ) ;
}
@ -1622,7 +1524,7 @@ FOLDER: foreach my $h1_fold ( @h1_folders_wanted ) {
}
}
my $cnt = scalar @h2_expunge ;
if( @h2_expunge ) {
if( @h2_expunge and not $expunge2 ) {
print "uidexpunge $cnt message(s) $dry_message\n" ;
$imap2->uidexpunge( \@h2_expunge ) if ! $dry ;
}
@ -2146,6 +2048,9 @@ sub modules_VERSION {
eval { require Data::Uniqid; $v = $Data::Uniqid::VERSION } or $v = "?" ;
push ( @list_version, module_version_str( 'Data::Uniqid', $v ) ) ;
eval { require JSON::WebToken; $v = $JSON::WebToken::VERSION } or $v = "?" ;
push ( @list_version, module_version_str( 'JSON::WebToken', $v ) ) ;
return( @list_version ) ;
}
@ -2505,8 +2410,8 @@ sub plainauth {
sub xoauth2 {
require JSON::WebToken;
require LWP::UserAgent;
require HTML::Entities;
require JSON;
require HTML::Entities;
require JSON;
my $code = shift;
my $imap = shift;
@ -2641,8 +2546,8 @@ sub banner_imapsync {
my @argv = @_ ;
my $banner_imapsync = join("",
'$RCSfile: imapsync,v $ ',
'$Revision: 1.637 $ ',
'$Date: 2015/04/01 01:36:37 $ ',
'$Revision: 1.644 $ ',
'$Date: 2015/07/17 01:22:52 $ ',
"\n",localhost_info(), "\n",
"Command line used:\n",
"$0 ", command_line_nopassword( @argv ), "\n",
@ -2937,9 +2842,11 @@ sub create_folder {
}else{
# dry mode, no folder so many imap will fail, assuming failure
print "Created folder [$h2_fold] on host2 $dry_message\n" ;
print "Since --dry mode is on and folder [$h2_fold] on host2 does not exist yet, syncing messges will not be simulated.\n"
. "To simulate message syncing, use --justfolders without --dry to first create the missing folders then rerun the --dry sync.\n" ;
return( 0 ) ;
if ( ! $justfolders ) {
print "Since --dry mode is on and folder [$h2_fold] on host2 does not exist yet, syncing messages will not be simulated.\n"
. "To simulate message syncing, use --justfolders without --dry to first create the missing folders then rerun the --dry sync.\n" ;
}
return( 0 ) ;
}
}
@ -3354,7 +3261,7 @@ sub imap2_folder_name {
foreach my $regextrans2 (@regextrans2) {
my $h2_fold_before = $h2_fold;
my $ret = eval( "\$h2_fold =~ $regextrans2 ; 1 ") ;
$debug and print "[$h2_fold_before] -> [$h2_fold] using re [$regextrans2]\n" ;
$debug and print "[$h2_fold_before] -> [$h2_fold] using regextrans2 [$regextrans2]\n" ;
if ( not ( defined( $ret ) ) or $@ ) {
die_clean("error: eval regextrans2 '$regextrans2': $@\n") ;
}
@ -3425,7 +3332,8 @@ sub foldersizes {
$imap->fetch_hash( \@msgs, "RFC822.SIZE", $hash_ref) or die_clean("$@" ) ;
}else{
my $uidnext = $imap->uidnext( $folder ) || $uidnext_default ;
$imap->fetch_hash( "1:$uidnext", "RFC822.SIZE", $hash_ref ) or die_clean( "$@" ) ;
my $fetch_hash_uids = $fetch_hash_set || "1:$uidnext" ;
$imap->fetch_hash( $fetch_hash_uids, "RFC822.SIZE", $hash_ref ) or die_clean( "$@" ) ;
}
for ( keys %$hash_ref ) {
my $size = $hash_ref->{ $_ }->{ "RFC822.SIZE" } ;
@ -3781,7 +3689,9 @@ sub select_msgs_by_fetch {
$debugdev and print "Calling fetch_hash()\n" ;
my $uidnext = $imap->uidnext( $folder ) || $uidnext_default ;
%fetch = %{$imap->fetch_hash( "1:$uidnext", "INTERNALDATE") } ;
my $fetch_hash_uids = $fetch_hash_set || "1:$uidnext" ;
%fetch = %{$imap->fetch_hash( $fetch_hash_uids, "INTERNALDATE") } ;
@msgs_all = sort { $a <=> $b } keys( %fetch ) ;
$debugdev and print "Done fetch_hash()\n" ;
@ -4289,7 +4199,9 @@ sub append_message_on_host2 {
}
}
else{
$nb_msg_skipped_dry_mode += 1;
# NOOP to avoid timeout on large folders.
$imap2->noop( ) ;
$nb_msg_skipped_dry_mode += 1 ;
$h1_nb_msg_processed +=1 ;
}
@ -6176,7 +6088,7 @@ sub check_last_release {
}
sub imapsync_version {
my $rcs_imapsync = '$Id: imapsync,v 1.637 2015/04/01 01:36:37 gilles Exp gilles $ ' ;
my $rcs_imapsync = '$Id: imapsync,v 1.644 2015/07/17 01:22:52 gilles Exp gilles $ ' ;
my $imapsync_version ;
if ( $rcs_imapsync =~ m{,v\s+(\d+\.\d+)}xo ) {
@ -6435,6 +6347,8 @@ sub tests_memory_consumption {
return( ) ;
}
sub good_date {
# two incoming formats:
# header Tue, 24 Aug 2010 16:00:00 +0200
@ -7064,12 +6978,17 @@ Several options are mandatory.
--exclude 'fold1|fold2|f3' skips fold1, fold2 and f3.
--exclude <regex> : or this one, etc.
--subfolder2 <string> : Move whole host1 folders hierarchy under this
host2 folder <string>.
It does it by adding two --regextrans2 options before
all others. Add --debug to see what's really going on.
--regextrans2 <regex> : Apply the whole regex to each destination folders.
--regextrans2 <regex> : and this one. etc.
When you play with the --regextrans2 option, first
add also the safe options --dry --justfolders
Then, when happy, remove --dry, remove --justfolders.
Have in mind that --regextrans2 is applied after prefix
Have in mind that --regextrans2 is applied after prefix
and separator inversion.
--tmpdir <string> : Where to store temporary files and subdirectories.
@ -7087,8 +7006,8 @@ Several options are mandatory.
--prefix1 <string> : 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, all other
cases are bad.
does not have NAMESPACE capability, so imapsync
suggests to use it. All other cases are bad.
--prefix2 <string> : Add prefix to all host2 folders. See --prefix1
--sep1 <string> : Host1 separator in case NAMESPACE is not supported.
--sep2 <string> : Host2 separator in case NAMESPACE is not supported.
@ -7098,6 +7017,10 @@ Several options are mandatory.
--skipmess is applied before --regexmess
--skipmess <regex> : or this one, etc.
--pipemess <command> : Apply this command to each message content before
the copy.
--pipemess <command> : and this one, etc.
--disarmreadreceipts : Disarms read receipts (host2 Exchange issue)
--regexmess <regex> : Apply the whole regex to each message before transfer.
@ -7205,6 +7128,7 @@ Several options are mandatory.
--debugimap1 : IMAP debug mode for host1. imap debug is very verbose.
--debugimap2 : IMAP debug mode for host2.
--debugimap : IMAP debug mode for host1 and host2.
--debugmemory : Debug mode showing memory consumption after each copy.
--tests : Run non-regression tests.
--testslive : Run a live test with test1.lamiral.info imap server.
@ -7258,6 +7182,7 @@ sub usage_complete {
<int> is the number of messages handled per request.
default is like --split1 500.
--split2 <int> : same thing on host2.
--nofixInboxINBOX : Don't fix Inbox INBOX mapping.
EOF
return( ) ;
}
@ -7285,8 +7210,7 @@ sub get_options {
"debugimap1!" => \$debugimap1,
"debugimap2!" => \$debugimap2,
"debugdev!" => \$debugdev,
"debugmemory!" => \$debugmemory,
"debugmaxlinelength!" => \$debugmaxlinelength,
"debugmemory!" => \$debugmemory,
"host1=s" => \$host1,
"host2=s" => \$host2,
"port1=i" => \$port1,
@ -7312,7 +7236,8 @@ sub get_options {
"folderlast=s" => \@folderlast,
"prefix1=s" => \$prefix1,
"prefix2=s" => \$prefix2,
"fixslash2!" => \$fixslash2,
"subfolder2=s" => \$subfolder2,
"fixslash2!" => \$fixslash2,
"fixInboxINBOX!" => \$fixInboxINBOX,
"regextrans2=s" => \@regextrans2,
"mixfolders!" => \$mixfolders,
@ -7413,6 +7338,7 @@ sub get_options {
"maxlinelength=i" => \$maxlinelength,
"maxlinelengthcmd=s" => \$maxlinelengthcmd,
"minmaxlinelength=i" => \$minmaxlinelength,
"debugmaxlinelength!" => \$debugmaxlinelength,
"fixcolonbug!" => \$fixcolonbug,
"create_folder_old!" => \$create_folder_old,
"maxmessagespersecond=f" => \$maxmessagespersecond,
@ -7423,6 +7349,7 @@ sub get_options {
"logfile=s" => \$logfile,
"errorsmax=i" => \$errorsmax,
"errorsdump!" => \$errorsdump,
"fetch_hash_set=s" => \$fetch_hash_set,
) ;
$debug and print "get options: [$opt_ret]\n" ;
@ -7434,13 +7361,11 @@ sub get_options {
if ( $tests ) {
$test_builder->no_ending( 0 ) ;
my $ok = tests( ) ;
#print "tests returned $ok\n" ;
exit ;
}
if ( $testsdebug ) {
$test_builder->no_ending( 0 ) ;
my $ok = testsdebug( ) ;
#print "testsdebug returned $ok\n" ;
exit ;
}

View File

@ -17,8 +17,6 @@
<meta http-equiv="expires" content="0"/>
<link rel="icon" type="image/png" href="W/images/logo_imapsync_s.png" />
<link href="W/style.css" rel="stylesheet" type="text/css"/>
</head>
<body>
@ -38,7 +36,7 @@
<li><a href="#MAILING-LIST">Discuss or search on the mailing-list</a></li>
<li><a href="#doc">Documentation</a></li>
<li><a href="S/news.shtml">News about imapsync <!--#exec cmd="cat ./VERSION" --> and previous releases</a></li>
<li><a href="S/imapservers.shtml">List of the 62 imap server softwares <b>supported</b></a> by imapsync</li>
<li><a href="S/imapservers.shtml">List of the 63 imap server softwares <b>supported</b></a> by imapsync</li>
<li><a href="S/external.shtml">Similar softwares and external services</a></li>
</ul>
@ -448,7 +446,7 @@ alt="Viewable With Any Browser" />
<!--#config timefmt="%D" -->
<!--#config timefmt="%A %B %d, %Y" -->
<b>This document last modified on <!--#echo var="LAST_MODIFIED" --></b>
($Id: index.shtml,v 1.251 2015/03/29 17:22:13 gilles Exp gilles $)<br/>
($Id: index.shtml,v 1.252 2015/05/09 18:11:18 gilles Exp gilles $)<br/>
<a href="#TOP">Top of the page</a>
</p>

119
tests.sh
View File

@ -1,6 +1,6 @@
#!/bin/sh
# $Id: tests.sh,v 1.255 2015/03/31 14:52:51 gilles Exp gilles $
# $Id: tests.sh,v 1.258 2015/06/27 20:00:36 gilles Exp gilles $
# Example 1:
# CMD_PERL='perl -I./W/Mail-IMAPClient-3.35/lib' sh -x tests.sh
@ -355,7 +355,17 @@ ll_star() {
--folder 'INBOX.backstar\*' --dry --justfolders --debugimap1 --regextrans2 's#\\|\*#_#g'
}
ll_doublequote() {
lks_trailing_space() {
$CMD_PERL ./imapsync \
--host1 $HOST1 --user1 tata \
--passfile1 ../../var/pass/secret.tata \
--host2 ks.lamiral.info --user2 tata \
--passfile2 ../../var/pass/secret.tata \
--justfolders --ssl1 --ssl2
}
lks_doublequote() {
$CMD_PERL ./imapsync \
--host1 $HOST1 --user1 tata \
--passfile1 ../../var/pass/secret.tata \
@ -364,7 +374,7 @@ ll_doublequote() {
--folder 'INBOX."uni"' --debugimap2 --nofoldersizes --justfolders --ssl1 --ssl2
}
ll_doublequote_rev() {
lks_doublequote_rev() {
$CMD_PERL ./imapsync \
--host1 ks.lamiral.info --user1 tata \
--passfile1 ../../var/pass/secret.tata \
@ -808,6 +818,20 @@ ll_idatefromheader() {
--idatefromheader --debug --dry
}
ll_idatefromheader_barker() {
# can_send && sendtestmessage
$CMD_PERL ./imapsync \
--host1 $HOST1 --user1 tata \
--passfile1 ../../var/pass/secret.tata \
--host2 imap.europe.secureserver.net --user2 test@alicebarkertest.com \
--passfile2 ../../var/pass/secret.barker \
--folder INBOX.oneemail2 --nofoldersizes \
--debug --useheader ALL
}
ll_folder_rev() {
@ -1589,6 +1613,20 @@ ll_regextrans2_slash()
}
ll_regextrans2_dot()
{
$CMD_PERL ./imapsync \
--host1 $HOST1 --user1 tata \
--passfile1 ../../var/pass/secret.tata \
--host2 $HOST2 --user2 titi \
--passfile2 ../../var/pass/secret.titi \
--justfolders \
--folder 'INBOX.yop.yap' \
--regextrans2 "s,\.,_,g" --dry
}
ll_regextrans2_subfolder()
{
$CMD_PERL ./imapsync \
@ -1600,9 +1638,51 @@ ll_regextrans2_subfolder()
--nofoldersizes \
--folder 'INBOX.yop.yap' \
--prefix1 'INBOX.yop.' \
--regextrans2 's,^${h2_prefix}(.*),${h2_prefix}FOO${h2_sep}$1,' --dry
--regextrans2 's,^${h2_prefix}(.*),${h2_prefix}FOO${h2_sep}$1,' \
--regextrans2 's,^INBOX$,${h2_prefix}FOO${h2_sep}INBOX,' --dry
}
ll_regextrans2_subfolder_02()
{
$CMD_PERL ./imapsync \
--host1 $HOST1 --user1 tata \
--passfile1 ../../var/pass/secret.tata \
--host2 $HOST2 --user2 titi \
--passfile2 ../../var/pass/secret.titi \
--justfolders \
--nofoldersizes \
--regextrans2 's,^${h2_prefix}(.*),${h2_prefix}FOO${h2_sep}$1,' \
--regextrans2 's,^INBOX$,${h2_prefix}FOO${h2_sep}INBOX,' --dry
}
ll_subfolder2()
{
$CMD_PERL ./imapsync \
--host1 $HOST1 --user1 tata \
--passfile1 ../../var/pass/secret.tata \
--host2 $HOST2 --user2 titi \
--passfile2 ../../var/pass/secret.titi \
--justfolders \
--subfolder2 SUB
}
ll_nochildren()
{
$CMD_PERL ./imapsync \
--host1 $HOST1 --user1 tata \
--passfile1 ../../var/pass/secret.tata \
--host2 w00d0310.kasserver.com --user2 m0331832 \
--passfile2 ../../var/pass/secret.kasserver \
--justfolders \
--debugimap
}
ll_regextrans2_remove_space()
@ -2593,6 +2673,18 @@ msw2() {
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/test_exe.bat'
}
ll_change_characters_doublequotes() {
$CMD_PERL ./imapsync \
--host1 $HOST1 --user1 tata \
--passfile1 ../../var/pass/secret.tata \
--host2 $HOST2 --user2 titi \
--passfile2 ../../var/pass/secret.titi \
--justfolders --dry --nofoldersizes \
--regextrans2 's,\",_,g'
}
ll_change_characters_gmail() {
$CMD_PERL ./imapsync \
@ -3419,6 +3511,16 @@ l_office365_justlogin()
--justlogin
}
l_office365_justlogin_2()
{
$CMD_PERL ./imapsync \
--host1 imap-mail.outlook.com --port1 993 --ssl1 --user1 gilles.lamiral@outlook.com \
--passfile1 ../../var/pass/secret.outlook.com \
--host2 outlook.office365.com --tls2 --user2 gilles.lamiral@outlook.com \
--passfile2 ../../var/pass/secret.outlook.com \
--justlogin
}
l_office365_bigfolders()
@ -3472,6 +3574,15 @@ l_exchange_maxline()
# specific tests
##########################
mail2World() {
$CMD_PERL ./imapsync \
--host1 mail2.name-services.com --user1 jessica@champlaindoor.com \
--passfile1 ../../var/pass/secret.mail2World \
--host2 mail.emailsrvr.com --user2 jessica@champlaindoor.com \
--passfile2 ../../var/pass/secret.mail2World \
--sep1 / --prefix1 "" \
--noabletosearch --fetch_hash_set "1:*" --delete2 --expunge2 --expunge1 --useuid
}
xgenplus() {
$CMD_PERL ./imapsync \