mirror of
https://github.com/imapsync/imapsync.git
synced 2025-06-10 14:44:32 +02:00
1.525
This commit is contained in:
parent
543e344ac7
commit
32a552f56e
24 changed files with 6784 additions and 254 deletions
5
CREDITS
5
CREDITS
|
@ -1,5 +1,5 @@
|
|||
#!/bin/cat
|
||||
# $Id: CREDITS,v 1.171 2012/10/01 08:58:58 gilles Exp gilles $
|
||||
# $Id: CREDITS,v 1.172 2013/01/29 09:31:00 gilles Exp gilles $
|
||||
|
||||
If you want to make a donation to the author, Gilles LAMIRAL,
|
||||
use any of the following ways:
|
||||
|
@ -30,6 +30,9 @@ 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.
|
||||
|
||||
Marc Weber
|
||||
Suggested --mark-as-deleted1 --mark-as-deleted2
|
||||
|
||||
Jeff Verheyen
|
||||
Contributed by giving an 32GB microSDHC card and the book
|
||||
29.69 "Design by Nature: Using Universal Forms and Principles in Design"
|
||||
|
|
40
ChangeLog
40
ChangeLog
|
@ -1,17 +1,49 @@
|
|||
|
||||
RCS file: RCS/imapsync,v
|
||||
Working file: imapsync
|
||||
head: 1.518
|
||||
head: 1.525
|
||||
branch:
|
||||
locks: strict
|
||||
gilles: 1.518
|
||||
gilles: 1.525
|
||||
access list:
|
||||
symbolic names:
|
||||
keyword substitution: kv
|
||||
total revisions: 518; selected revisions: 518
|
||||
total revisions: 525; selected revisions: 525
|
||||
description:
|
||||
----------------------------
|
||||
revision 1.518 locked by: gilles;
|
||||
revision 1.525 locked by: gilles;
|
||||
date: 2013/02/05 12:52:10; author: gilles; state: Exp; lines: +9 -9
|
||||
Typo synchronise -> synchronize.
|
||||
----------------------------
|
||||
revision 1.524
|
||||
date: 2013/01/31 20:41:29; author: gilles; state: Exp; lines: +8 -7
|
||||
Small fix in help message.
|
||||
\\D
|
||||
----------------------------
|
||||
revision 1.523
|
||||
date: 2013/01/31 14:12:21; author: gilles; state: Exp; lines: +118 -99
|
||||
Reorganized the --help message.
|
||||
----------------------------
|
||||
revision 1.522
|
||||
date: 2013/01/28 02:50:49; author: gilles; state: Exp; lines: +13 -13
|
||||
Printing info with several host1 folder going to one host2 folder is in --debug mode now.
|
||||
----------------------------
|
||||
revision 1.521
|
||||
date: 2013/01/23 07:48:01; author: gilles; state: Exp; lines: +7 -7
|
||||
Speed. --nocheckmessageexists is activated by default since --checkmessageexists often slow down transfers too much.
|
||||
----------------------------
|
||||
revision 1.520
|
||||
date: 2013/01/23 07:41:48; author: gilles; state: Exp; lines: +103 -30
|
||||
Fix. Removed reference to DWTFPL since license is NOLIMIT now.
|
||||
License file is LICENSE now, no longer COPYING.
|
||||
Fix. Handle the case where several folders on host2 go to one folder on host1 with --delete2 option.
|
||||
The bug was imapsync was copying messages and deleting them on next folder.
|
||||
----------------------------
|
||||
revision 1.519
|
||||
date: 2012/12/31 09:51:40; author: gilles; state: Exp; lines: +11 -9
|
||||
Usability fix. --foldersizesatend is on if --foldersizes is on. Off if --nofoldersizesatend
|
||||
----------------------------
|
||||
revision 1.518
|
||||
date: 2012/12/24 00:27:34; author: gilles; state: Exp; lines: +9 -6
|
||||
Bugfix. When identtifying with header, change tabulations to spaces (Gmail bug on with "Received:" on multilines).
|
||||
----------------------------
|
||||
|
|
207
FAQ
207
FAQ
|
@ -1,5 +1,5 @@
|
|||
#!/bin/cat
|
||||
# $Id: FAQ,v 1.120 2012/12/15 00:05:42 gilles Exp gilles $
|
||||
# $Id: FAQ,v 1.124 2013/02/05 18:40:50 gilles Exp gilles $
|
||||
|
||||
+------------------+
|
||||
| FAQ for imapsync |
|
||||
|
@ -177,7 +177,20 @@ R. By using --useuid imapsync avoid getting messages headers and build
|
|||
|
||||
R. Add also --nofoldersizes since the default behavior is to compute
|
||||
folder sizes. Folder sizes are useless for the transfer, just
|
||||
useful to see what has to be done on each folder.
|
||||
useful to see what has to be done on each folder and guess when
|
||||
the transfer will end (ETA).
|
||||
|
||||
R. Add also --nocheckmessageexists
|
||||
Since transfer can be long on a huge mailbox imapsync checks
|
||||
a message exist before copying it, but it takes time and
|
||||
cpu on the host1 server.
|
||||
--nocheckmessageexists is on by default since release 1.520
|
||||
|
||||
R. Add also --noexpungeaftereach if you use --delete but be warn
|
||||
that an interrupted transfer can loose messages on host2 in a
|
||||
second run if you use a combination like
|
||||
|
||||
imapsync ... --delete --noexpunge --noexpungeaftereach --expunge2
|
||||
|
||||
Notes about --useuid
|
||||
|
||||
|
@ -250,7 +263,7 @@ R2. Use --useuid then imapsync will avoid dealing with headers.
|
|||
imapsync ... --useuid
|
||||
|
||||
=======================================================================
|
||||
Q. How can I try imapsync with the new Mail::IMAPClient 3.xx perl library?
|
||||
Q. How can I try imapsync with Mail::IMAPClient 3.xx perl module?
|
||||
|
||||
R. - Download latest Mail::IMAPClient 3.xx at
|
||||
http://search.cpan.org/dist/Mail-IMAPClient/
|
||||
|
@ -299,8 +312,8 @@ You can migrate emails from pop server to imap server with pop2imap:
|
|||
http://www.linux-france.org/prj/pop2imap/
|
||||
|
||||
R2. Yes
|
||||
Many pop3 servers runs in parallel with an imap server on the
|
||||
exactly the same mailboxes. They serve the same INBOX
|
||||
Many pop3 servers runs in parallel with an imap server on exactly
|
||||
the same mailboxes. They serve the same INBOX
|
||||
(imap serves INBOX and several other folders, pop3 serves only INBOX)
|
||||
So have a try with imapsync on the same host1.
|
||||
|
||||
|
@ -321,7 +334,7 @@ designed for this issue, and faster than imapsync.
|
|||
|
||||
=======================================================================
|
||||
Q. We have found that the sent time and date have been changed to the
|
||||
time at which the file was synchronised.
|
||||
time at which the file was synchronized.
|
||||
|
||||
R. This is the case with:
|
||||
- Eudora
|
||||
|
@ -367,9 +380,9 @@ Q. imapsync calculates 479 messages in a folder but only transfers 400
|
|||
|
||||
R1. Unless --useuid is used, imapsync considers a header part
|
||||
of a message to identify a message on both sides.
|
||||
The header part is whole header with "--useheader ALL" or
|
||||
only specific lines depending on --useheader --skipheader
|
||||
or default values.
|
||||
By default the header part used is lines "Message-Id:" "Message-ID:"
|
||||
and "Received:" or specific lines depending on --useheader
|
||||
--skipheader. Whole header can be set by --useheader ALL
|
||||
|
||||
Consequences:
|
||||
|
||||
|
@ -466,12 +479,12 @@ 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 synchronises all flags except the \Recent flag
|
||||
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 synchronises only the flags listed
|
||||
special "\*" then imapsync synchronizes only the flags listed
|
||||
in PERMANENTFLAGS.
|
||||
|
||||
Some imap servers have problems with flags not beginning with
|
||||
|
@ -479,6 +492,156 @@ 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?
|
||||
|
||||
|
@ -743,6 +906,7 @@ output line :
|
|||
|
||||
From folders list : [INBOX] [public.dreams] [etc.]
|
||||
|
||||
|
||||
======================================================================
|
||||
Q. I want to exclude only INBOX
|
||||
|
||||
|
@ -754,6 +918,18 @@ A good way to see what will be done is to first use:
|
|||
|
||||
imapsync ... --exclude "^INBOX$" --justfolders --nofoldersizes --dry
|
||||
|
||||
======================================================================
|
||||
Q. I want to exclude folders matching SPAM no matter the case,
|
||||
aka how to be case insensitive
|
||||
|
||||
R. Use:
|
||||
|
||||
imapsync ... --exclude "(?i)spam"
|
||||
|
||||
A good way to see what will be done is to first use:
|
||||
|
||||
imapsync ... --exclude "(?i)spam" --justfolders --nofoldersizes --dry
|
||||
|
||||
|
||||
======================================================================
|
||||
Q. I want the --folder "MyFolder" option be recursive.
|
||||
|
@ -816,7 +992,6 @@ In case you are not aware:
|
|||
omitted in our case
|
||||
- Use --debugimap when testing initial connectivity, if necessary
|
||||
|
||||
|
||||
======================================================================
|
||||
Q. How to migrate from or to Exchange 2007/2010 with an
|
||||
admin/authuser account?
|
||||
|
@ -876,9 +1051,11 @@ R. Use
|
|||
======================================================================
|
||||
Q. How to migrate from cyrus with an admin account?
|
||||
|
||||
R. Use
|
||||
--authuser1 admin_user ----password1 admin_user_password \
|
||||
--user1 foo_user --ssl1
|
||||
R. Use:
|
||||
|
||||
imapsync ... \
|
||||
--authuser1 admin_user ----password1 admin_user_password \
|
||||
--user1 foo_user --ssl1
|
||||
|
||||
In this case, --authmech1 PLAIN will be used by default since it
|
||||
is the only way to go for now. So don't use --authmech1 SOMETHING
|
||||
|
|
15
LICENSE
Normal file
15
LICENSE
Normal file
|
@ -0,0 +1,15 @@
|
|||
NO LIMIT PUBLIC LICENSE
|
||||
Version 0, June 2012
|
||||
|
||||
Gilles LAMIRAL
|
||||
La Billais
|
||||
35580 Baulon
|
||||
France
|
||||
|
||||
NO LIMIT PUBLIC LICENSE
|
||||
Terms and conditions for copying, distribution, modification
|
||||
or anything else.
|
||||
|
||||
0 No limit to do anything with this work and this license.
|
||||
1 GOTO 0
|
||||
|
14
Makefile
14
Makefile
|
@ -1,5 +1,5 @@
|
|||
|
||||
# $Id: Makefile,v 1.113 2012/12/24 02:24:40 gilles Exp gilles $
|
||||
# $Id: Makefile,v 1.114 2013/01/29 00:26:51 gilles Exp gilles $
|
||||
|
||||
.PHONY: help usage all
|
||||
|
||||
|
@ -116,9 +116,9 @@ testv3: imapsync tests.sh
|
|||
CMD_PERL='perl -I./$(IMAPClient_3xx)' /usr/bin/time sh tests.sh
|
||||
touch .test_3xx
|
||||
|
||||
testv: testv2 testv3
|
||||
testv: testv3
|
||||
|
||||
test: .test_229 .test_3xx
|
||||
test: .test_3xx
|
||||
|
||||
tests: test
|
||||
|
||||
|
@ -277,7 +277,7 @@ ksa:
|
|||
|
||||
publish: upload_ks ksa ml
|
||||
|
||||
PUBLIC_FILES = ./ChangeLog ./COPYING ./CREDITS ./FAQ \
|
||||
PUBLIC_FILES = ./ChangeLog ./COPYING ./LICENSE ./CREDITS ./FAQ \
|
||||
./index.shtml ./INSTALL \
|
||||
./VERSION ./VERSION_EXE \
|
||||
./README ./TODO
|
||||
|
@ -318,10 +318,10 @@ upload_lfo:
|
|||
/home/gilles/public_html/www.linux-france.org/html/prj/imapsync/.htaccess
|
||||
sh ~/memo/lfo-rsync
|
||||
|
||||
upload_index: FAQ COPYING CREDITS W/*.bat examples/*.bat examples/sync_loop_unix.sh index.shtml
|
||||
rcsdiff index.shtml FAQ COPYING CREDITS W/*.bat examples/*.bat index.shtml
|
||||
upload_index: FAQ LICENSE CREDITS W/*.bat examples/*.bat examples/sync_loop_unix.sh index.shtml
|
||||
rcsdiff index.shtml FAQ LICENSE CREDITS W/*.bat examples/*.bat index.shtml
|
||||
validate --verbose index.shtml
|
||||
rsync -avH index.shtml FAQ COPYING CREDITS root@ks.lamiral.info:/var/www/imapsync/
|
||||
rsync -avH index.shtml FAQ COPYING LICENSE CREDITS root@ks.lamiral.info:/var/www/imapsync/
|
||||
rsync -avH W/*.bat root@ks.lamiral.info:/var/www/imapsync/W/
|
||||
rsync -avH examples/*.bat examples/sync_loop_unix.sh root@ks.lamiral.info:/var/www/imapsync/examples/
|
||||
|
||||
|
|
37
README
37
README
|
@ -3,10 +3,10 @@ NAME
|
|||
Synchronise mailboxes between two imap servers. Good at IMAP migration.
|
||||
More than 44 different IMAP server softwares supported with success.
|
||||
|
||||
$Revision: 1.518 $
|
||||
$Revision: 1.525 $
|
||||
|
||||
SYNOPSIS
|
||||
To synchronise imap account "foo" on "imap.truc.org" to imap account
|
||||
To synchronize imap account "foo" on "imap.truc.org" to imap account
|
||||
"bar" on "imap.trac.org" with foo password "secret1" and bar password
|
||||
"secret2":
|
||||
|
||||
|
@ -114,14 +114,17 @@ DESCRIPTION
|
|||
later, imapsync works well with bad connections.
|
||||
|
||||
You can decide to delete the messages from the source mailbox after a
|
||||
successful transfer (it is a good feature when migrating). In that case,
|
||||
use the --delete option. Option --delete implies also option --expunge
|
||||
so all messages marked deleted on host1 will be really deleted. (you can
|
||||
use --noexpunge to avoid this but I don't see any real world scenario
|
||||
successful transfer, it can be a good feature when migrating live
|
||||
mailboxes since messages will be only one side. In that case, use the
|
||||
--delete option. Option --delete implies also option --expunge so all
|
||||
messages marked deleted on host1 will be really deleted. (you can use
|
||||
--noexpunge to avoid this but I don't see any good real world scenario
|
||||
for the combinaison --delete --noexpunge).
|
||||
|
||||
You can also just synchronize a mailbox A from another mailbox B in case
|
||||
you just want to keep a "live" copy of B in A (--delete2 may help)
|
||||
You can also just synchronize a mailbox B from another mailbox A in case
|
||||
you just want to keep a "live" copy of A in B. In that case --delete2
|
||||
can be used, it deletes messages in host2 folder B that are not in host1
|
||||
folder A.
|
||||
|
||||
imapsync is not adequate for maintaining two active imap accounts in
|
||||
synchronization where the user plays independently on both sides. Use
|
||||
|
@ -194,10 +197,10 @@ EXIT STATUS
|
|||
done
|
||||
|
||||
LICENSE
|
||||
imapsync is free, open source but not always gratis software cover by
|
||||
the No Limit Public License (NLPL). See COPYING
|
||||
file included in the distribution or the web site
|
||||
http://imapsync.lamiral.info/COPYING
|
||||
imapsync is free, open, public but not always gratis software cover by
|
||||
the NOLIMIT Public License. See the LICENSE file included in the
|
||||
distribution or just read this: No limit to do anything with this work
|
||||
and this license.
|
||||
|
||||
MAILING-LIST
|
||||
The public mailing-list may be the best way to get support.
|
||||
|
@ -356,7 +359,7 @@ IMAP SERVERS
|
|||
- 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
|
||||
- SmarterMail, Smarter Mail 5.0 Enterprise, Smarter Mail 5.5 [host1].
|
||||
- SmarterMail, Smarter Mail 5.0 Enterprise, Smarter Mail 5.5 [host1], SmarterMail Professional 10.2 [host1].
|
||||
- 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
|
||||
|
@ -385,8 +388,8 @@ IMAP SERVERS
|
|||
|
||||
HUGE MIGRATION
|
||||
Pay special attention to options --subscribed --subscribe --delete
|
||||
--delete2 --delete2folders --expunge --expunge1 --expunge2 --uidexpunge2
|
||||
--maxage --minage --maxsize --useheader --fast --useuid --usecache
|
||||
--delete2 --delete2folders --maxage --minage --maxsize --useuid
|
||||
--usecache
|
||||
|
||||
If you have many mailboxes to migrate think about a little shell
|
||||
program. Write a file called file.txt (for example) containing users and
|
||||
|
@ -418,7 +421,7 @@ HUGE MIGRATION
|
|||
Welcome in shell programming !
|
||||
|
||||
Hacking
|
||||
Feel free to hack imapsync as the NLPL Licence permits it.
|
||||
Feel free to hack imapsync as the NOLIMIT license permits it.
|
||||
|
||||
Links
|
||||
Entries for imapsync: http://www.imap.org/products/showall.php
|
||||
|
@ -442,5 +445,5 @@ SIMILAR SOFTWARES
|
|||
|
||||
Feedback (good or bad) will often be welcome.
|
||||
|
||||
$Id: imapsync,v 1.518 2012/12/24 00:27:34 gilles Exp gilles $
|
||||
$Id: imapsync,v 1.525 2013/02/05 12:52:10 gilles Exp gilles $
|
||||
|
||||
|
|
15
TODO
15
TODO
|
@ -1,5 +1,5 @@
|
|||
#!/bin/cat
|
||||
# $Id: TODO,v 1.114 2012/11/02 22:19:14 gilles Exp gilles $
|
||||
# $Id: TODO,v 1.118 2013/02/08 06:28:40 gilles Exp gilles $
|
||||
|
||||
TODO file for imapsync
|
||||
----------------------
|
||||
|
@ -11,6 +11,8 @@ Add a best practice migration tips document.
|
|||
|
||||
Write a Mail::imapsync package and use it.
|
||||
|
||||
Remove 2.2.9 Mail::IMAPClient support.
|
||||
|
||||
Fix the mailing-list archive bug with From at
|
||||
the beginning of a line
|
||||
http://www.linux-france.org/prj/imapsync_list/msg00307.html
|
||||
|
@ -21,6 +23,17 @@ http://www.yippiemove.com/
|
|||
http://www.migrationwiz.com/
|
||||
http://www.microsoft.com/download/en/details.aspx?id=1329 "Microsoft Transporter Suite"
|
||||
|
||||
Add --delete1 as an alias for --delete
|
||||
Add --mark-as-deleted1 --mark-as-deleted2 as
|
||||
aliases for --noexpunge1 --delete1 and --noexpunge2 --delete2
|
||||
|
||||
Move --help documentation into the man page so that description is easier to find.
|
||||
|
||||
Feature request for ImapSync.
|
||||
Can you setup an option to make it stop if the destination mailbox reports that it is over quota?
|
||||
|
||||
Print the list of messages not copied and why (duplicates or void header)
|
||||
|
||||
Fix bug found by Pavel Stano on 01/06/2012 (june) imapsync never stop login
|
||||
when login fails with a "* BYE Temp error" from server.
|
||||
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
1.518
|
||||
1.525
|
||||
|
|
|
@ -1 +1 @@
|
|||
1.518
|
||||
1.525
|
||||
|
|
|
@ -164,3 +164,11 @@
|
|||
1356315575 END 1.518 : lundi 24 décembre 2012, 03:19:35 (UTC+0100)
|
||||
1356340377 BEGIN 1.518 : lundi 24 décembre 2012, 10:12:57 (UTC+0100)
|
||||
1356341221 END 1.518 : lundi 24 décembre 2012, 10:27:01 (UTC+0100)
|
||||
1359077003 BEGIN 1.521 : vendredi 25 janvier 2013, 02:23:23 (UTC+0100)
|
||||
1359077793 END 1.521 : vendredi 25 janvier 2013, 02:36:33 (UTC+0100)
|
||||
1359419422 BEGIN 1.522 : mardi 29 janvier 2013, 01:30:22 (UTC+0100)
|
||||
1359420274 END 1.522 : mardi 29 janvier 2013, 01:44:34 (UTC+0100)
|
||||
1359421115 BEGIN 1.522 : mardi 29 janvier 2013, 01:58:35 (UTC+0100)
|
||||
1359421989 END 1.522 : mardi 29 janvier 2013, 02:13:09 (UTC+0100)
|
||||
1360108747 BEGIN 1.525 : mercredi 6 février 2013, 00:59:07 (UTC+0100)
|
||||
1360109581 END 1.525 : mercredi 6 février 2013, 01:13:01 (UTC+0100)
|
||||
|
|
36
W/learn/dbfile
Executable file
36
W/learn/dbfile
Executable file
|
@ -0,0 +1,36 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
# $Id: dbfile,v 1.1 2013/01/02 16:33:19 gilles Exp gilles $
|
||||
|
||||
use strict ;
|
||||
use warnings ;
|
||||
|
||||
use DB_File ;
|
||||
|
||||
my %hash ;
|
||||
|
||||
my $X = tie %hash, 'DB_File', 'test_dbfile.db' ;
|
||||
|
||||
|
||||
print ( scalar keys %hash, "\n" ) ;
|
||||
exit ;
|
||||
|
||||
for my $num ( 0 .. 255 ) {
|
||||
print "$num\n" ;
|
||||
|
||||
my $key = chr $num ;
|
||||
for my $num2 ( 1 .. 500 ) {
|
||||
my $keylong = "$num2 $key" . ( $key x 1024 ) ;
|
||||
my $val_1 = "V$key" ;
|
||||
#print "$keylong\n" ;
|
||||
my $val_2 ;
|
||||
my $status ;
|
||||
$status = $X->put( $keylong, $val_1 ) ;
|
||||
$status = $X->get( $keylong, $val_2 ) ;
|
||||
|
||||
my $cmp = $val_1 cmp $val_2 ;
|
||||
print " $cmp $val_1 $val_2\n" if $cmp ;
|
||||
#$status = $X->del( $keylong ) ;
|
||||
}
|
||||
}
|
||||
|
39
W/learn/dbmdeep
Executable file
39
W/learn/dbmdeep
Executable file
|
@ -0,0 +1,39 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
# $Id: dbfile,v 1.1 2013/01/02 16:33:19 gilles Exp gilles $
|
||||
|
||||
use strict ;
|
||||
use warnings ;
|
||||
|
||||
use DBM::Deep ;
|
||||
|
||||
my %hash ;
|
||||
|
||||
my $db = DBM::Deep->new(
|
||||
file => "test_dbmdeep.db",
|
||||
locking => 0,
|
||||
autoflush => 0
|
||||
);
|
||||
|
||||
print ( scalar keys %$db, "\n" ) ;
|
||||
#exit ;
|
||||
|
||||
for my $num ( 0 .. 255 ) {
|
||||
print "$num\n" ;
|
||||
|
||||
my $key = chr $num ;
|
||||
for my $num2 ( 1 .. 500 ) {
|
||||
my $keylong = "$num2 $key" . ( $key x 1024 ) ;
|
||||
my $val_1 = "V$key" ;
|
||||
#print "$keylong\n" ;
|
||||
my $val_2 ;
|
||||
|
||||
$db->{ $keylong } = $val_1 ;
|
||||
$val_2 = $db->{ $keylong } ;
|
||||
|
||||
my $cmp = $val_1 cmp $val_2 ;
|
||||
print " $cmp $val_1 $val_2\n" if $cmp ;
|
||||
#$db->delete( $keylong ) ;
|
||||
}
|
||||
}
|
||||
|
BIN
W/learn/test_dbmdeep.db
Normal file
BIN
W/learn/test_dbmdeep.db
Normal file
Binary file not shown.
|
@ -1,4 +1,4 @@
|
|||
m4_dnl $Id: ml_announce.in,v 1.4 2012/11/03 01:38:45 gilles Exp gilles $
|
||||
m4_dnl $Id: ml_announce.in,v 1.6 2012/12/24 10:35:38 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
|
||||
|
@ -10,8 +10,6 @@ To: imapsync_update@lists.lamiral.info
|
|||
|
||||
Hello imapsync user,
|
||||
|
||||
Sorry for the previous link given, it was the one of release 1.508
|
||||
|
||||
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
|
||||
don't want to receive those announces anymore.
|
||||
|
|
6033
W/patches/imapsync-xgwtrustedapp
Normal file
6033
W/patches/imapsync-xgwtrustedapp
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
# $Id: paypal_build_invoices,v 1.43 2012/12/15 00:15:56 gilles Exp gilles $
|
||||
# $Id: paypal_build_invoices,v 1.45 2013/01/10 03:08:23 gilles Exp gilles $
|
||||
|
||||
# usage: sh paypal_build_invoices /g/var/paypal_invoices/????
|
||||
|
||||
|
@ -32,7 +32,8 @@ 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 1963 /g/paypal/paypal_2012_09_complet.csv
|
||||
#/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 2047 /g/paypal/paypal_2012_10_complet.csv
|
||||
#/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 2133 /g/paypal/paypal_2012_11_complet.csv
|
||||
/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 2224 /g/paypal/paypal_2012_12_complet.csv
|
||||
#/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 2224 /g/paypal/paypal_2012_12_complet.csv
|
||||
/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 2299 /g/paypal/paypal_2013_01_complet.csv
|
||||
|
||||
|
||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 147 /g/paypal/paypal_2010_11_complet.csv
|
||||
|
@ -59,20 +60,23 @@ 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 1891 /g/paypal/paypal_2012_08_complet.csv
|
||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 1963 /g/paypal/paypal_2012_09_complet.csv
|
||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 2047 /g/paypal/paypal_2012_10_complet.csv
|
||||
set -x
|
||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 2133 /g/paypal/paypal_2012_11_complet.csv
|
||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 2224 /g/paypal/paypal_2012_12_complet.csv
|
||||
set -x
|
||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 2299 /g/paypal/paypal_2013_01_complet.csv
|
||||
set +x
|
||||
|
||||
# La totale
|
||||
|
||||
: || /g/public_html/imapsync/W/paypal_reply/paypal_bilan --bnc --debug \
|
||||
--first_in 147 --avoid_numbers '292 293 643 644 731 732 1093 1330 1331 1332 1333 1334 1652 1653 2131 2132' \
|
||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --bnc --debug \
|
||||
--first_in 147 --avoid_numbers '292 293 643 644 731 732 1093 1330 1331 1332 1333 1334 1652 1653 2131 2132 2295 2296 2297 2298' \
|
||||
/g/paypal/paypal_201?_??_complet.csv
|
||||
|
||||
: || /g/public_html/imapsync/W/paypal_reply/paypal_bilan \
|
||||
--first_in 147 --avoid_numbers '292 293 643 644 731 732 1093 1330 1331 1332 1333 1334 1652 1653 2131 2132' \
|
||||
set -v
|
||||
: /g/public_html/imapsync/W/paypal_reply/paypal_bilan \
|
||||
--first_in 147 --avoid_numbers '292 293 643 644 731 732 1093 1330 1331 1332 1333 1334 1652 1653 2131 2132 2295 2296 2297 2298' \
|
||||
/g/paypal/paypal_201?_??_complet.csv
|
||||
set +v
|
||||
|
||||
echo 'sh paypal_build_invoices /g/var/paypal_invoices/2???'
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
# $Id: paypal_build_reply,v 1.19 2012/04/30 22:57:04 gilles Exp gilles $
|
||||
# $Id: paypal_build_reply,v 1.20 2013/02/07 17:00:41 gilles Exp gilles $
|
||||
|
||||
use warnings;
|
||||
use strict;
|
||||
|
@ -40,10 +40,12 @@ while(<>) {
|
|||
while(<>) {
|
||||
if ( /^Vous avez re.*paiement d'un montant de (.*) de la part de (.*) \((.*)\)/) {
|
||||
($amount, $name, $email) = ($1, $2, $3);
|
||||
$debug and print "1 ($amount, $name, $email)\n" ;
|
||||
last;
|
||||
}
|
||||
if ( /^Vous avez re.*paiement d'un montant de (.*) de la part de (.*)/) {
|
||||
($amount, $name, $email) = ($1, "", $2);
|
||||
$debug and print "2 ($amount, $name, $email)\n" ;
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
@ -55,18 +57,20 @@ my $path_last = firstline( '/g/public_html/imapsync/dist/path_last.txt' ) ;
|
|||
|
||||
$url = "http://ks.lamiral.info/imapsync/dist/$path_last/" ;
|
||||
|
||||
#print "[$amount] [$name] [$email] [$paypal_line]\n";
|
||||
$debug and print "[$amount] [$name] [$email] [$paypal_line]\n";
|
||||
|
||||
|
||||
while(<>) {
|
||||
if ( /^Acheteur/ ) {
|
||||
$buyer .= "===== Acheteur =====\n";
|
||||
$debug and print "1 $buyer\n" ;
|
||||
last;
|
||||
}
|
||||
if ( /^Informations sur l'acheteur/ ) {
|
||||
$buyer .= "===== Acheteur =====\n";
|
||||
chomp( $name = <> );
|
||||
$buyer .= "$name\n" ;
|
||||
$debug and print "2 $buyer\n" ;
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
@ -75,16 +79,17 @@ while(<>) {
|
|||
$buyer .= $_ if ( ! /^-----------------------------------/ );
|
||||
last if ( /^-----------------------------------/ );
|
||||
}
|
||||
$debug and print "3 $buyer\n" ;
|
||||
|
||||
|
||||
while(<>) {
|
||||
next if ( ! /^Description :(.*)/ );
|
||||
while(<>) {
|
||||
$debug and print "Search Description [$_]\n" ;
|
||||
next if ( ! /Description..?:(.*)/ );
|
||||
$object = $1 ;
|
||||
$description = "===== Details =====\n";
|
||||
$description .= $_;
|
||||
last;
|
||||
}
|
||||
|
||||
$debug and print "[$object] [$description]\n";
|
||||
|
||||
|
||||
while(<>) {
|
||||
|
@ -97,7 +102,7 @@ while(<>) {
|
|||
|
||||
my $address = 'gilles.lamiral@laposte.net';
|
||||
my $address2 = 'gilles@lamiral.info';
|
||||
my $rcstag = '$Id: paypal_build_reply,v 1.19 2012/04/30 22:57:04 gilles Exp gilles $';
|
||||
my $rcstag = '$Id: paypal_build_reply,v 1.20 2013/02/07 17:00:41 gilles Exp gilles $';
|
||||
|
||||
my $download_info = "You will find the latest imapsync.exe binary (release $release_exe)
|
||||
and the latest imapsync source code (release $release) at the following link:
|
||||
|
|
|
@ -240,7 +240,6 @@ paypal_all_dev() {
|
|||
echo "Will send_reply $@"
|
||||
send_reply "$@"
|
||||
echo "Done send_reply $@"
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ set -e
|
|||
|
||||
# Add path to commands at home
|
||||
PATH=$PATH:/g/public_html/imapsync/W/paypal_reply
|
||||
PERL5LIB=/g/public_html/imapsync/Mail-IMAPClient-3.32/lib
|
||||
PERL5LIB=/g/public_html/imapsync/W/Mail-IMAPClient-3.32/lib
|
||||
export PERL5LIB
|
||||
|
||||
test -f /g/public_html/imapsync/W/paypal_reply/paypal_functions \
|
||||
|
|
|
@ -5,10 +5,9 @@
|
|||
set -e
|
||||
#set -x
|
||||
|
||||
|
||||
# Add path to commands at home
|
||||
PATH=$PATH:/g/public_html/imapsync/W/paypal_reply
|
||||
PERL5LIB=/g/public_html/imapsync/Mail-IMAPClient-3.32/lib
|
||||
PERL5LIB=/g/public_html/imapsync/W/Mail-IMAPClient-3.32/lib
|
||||
export PERL5LIB
|
||||
|
||||
test -f /g/public_html/imapsync/W/paypal_reply/paypal_functions \
|
||||
|
|
|
@ -7,12 +7,12 @@ set -e
|
|||
|
||||
|
||||
# Add path to commands at home
|
||||
PATH=$PATH:/g/public_html/imapsync/paypal_reply
|
||||
PERL5LIB=/g/public_html/imapsync/Mail-IMAPClient-3.28/lib
|
||||
PATH=$PATH:/g/public_html/imapsync/W/paypal_reply
|
||||
PERL5LIB=/g/public_html/imapsync/W/Mail-IMAPClient-3.32/lib
|
||||
export PERL5LIB
|
||||
|
||||
test -f /g/public_html/imapsync/paypal_reply/paypal_functions \
|
||||
&& . /g/public_html/imapsync/paypal_reply/paypal_functions
|
||||
test -f /g/public_html/imapsync/W/paypal_reply/paypal_functions \
|
||||
&& . /g/public_html/imapsync/W/paypal_reply/paypal_functions
|
||||
|
||||
|
||||
DATE_1=`date`
|
||||
|
|
353
imapsync
353
imapsync
|
@ -20,11 +20,11 @@ Synchronise mailboxes between two imap servers.
|
|||
Good at IMAP migration. More than 44 different IMAP server softwares
|
||||
supported with success.
|
||||
|
||||
$Revision: 1.518 $
|
||||
$Revision: 1.525 $
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
To synchronise imap account "foo" on "imap.truc.org"
|
||||
To synchronize imap account "foo" on "imap.truc.org"
|
||||
to imap account "bar" on "imap.trac.org"
|
||||
with foo password "secret1"
|
||||
and bar password "secret2":
|
||||
|
@ -143,16 +143,18 @@ time and restart it later, imapsync works well with bad
|
|||
connections.
|
||||
|
||||
You can decide to delete the messages from the source mailbox
|
||||
after a successful transfer (it is a good feature when migrating).
|
||||
after a successful transfer, it can be a good feature when migrating
|
||||
live mailboxes since messages will be only one side.
|
||||
In that case, use the --delete option. Option --delete implies
|
||||
also option --expunge so all messages marked deleted on host1
|
||||
will be really deleted.
|
||||
(you can use --noexpunge to avoid this but I don't see any
|
||||
real world scenario for the combinaison --delete --noexpunge).
|
||||
good real world scenario for the combinaison --delete --noexpunge).
|
||||
|
||||
You can also just synchronize a mailbox A from another mailbox B
|
||||
in case you just want to keep a "live" copy of B in A (--delete2
|
||||
may help)
|
||||
You can also just synchronize a mailbox B from another mailbox A
|
||||
in case you just want to keep a "live" copy of A in B.
|
||||
In that case --delete2 can be used, it deletes messages in host2
|
||||
folder B that are not in host1 folder A.
|
||||
|
||||
imapsync is not adequate for maintaining two active imap accounts
|
||||
in synchronization where the user plays independently on both sides.
|
||||
|
@ -236,10 +238,10 @@ in a Bourne shell:
|
|||
|
||||
=head1 LICENSE
|
||||
|
||||
imapsync is free, open source but not always gratis software cover by
|
||||
the No Limit Public License (NLPL).
|
||||
See COPYING file included in the distribution or the web site
|
||||
http://imapsync.lamiral.info/COPYING
|
||||
imapsync is free, open, public but not always gratis software
|
||||
cover by the NOLIMIT Public License.
|
||||
See the LICENSE file included in the distribution or just read this:
|
||||
No limit to do anything with this work and this license.
|
||||
|
||||
=head1 MAILING-LIST
|
||||
|
||||
|
@ -405,7 +407,7 @@ Success stories reported with the following 48 imap servers
|
|||
- 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
|
||||
- SmarterMail, Smarter Mail 5.0 Enterprise, Smarter Mail 5.5 [host1].
|
||||
- SmarterMail, Smarter Mail 5.0 Enterprise, Smarter Mail 5.5 [host1], SmarterMail Professional 10.2 [host1].
|
||||
- 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
|
||||
|
@ -443,15 +445,9 @@ Pay special attention to options
|
|||
--delete
|
||||
--delete2
|
||||
--delete2folders
|
||||
--expunge
|
||||
--expunge1
|
||||
--expunge2
|
||||
--uidexpunge2
|
||||
--maxage
|
||||
--minage
|
||||
--maxsize
|
||||
--useheader
|
||||
--fast
|
||||
--useuid
|
||||
--usecache
|
||||
|
||||
|
@ -488,7 +484,7 @@ Welcome in shell programming !
|
|||
|
||||
=head1 Hacking
|
||||
|
||||
Feel free to hack imapsync as the NLPL Licence permits it.
|
||||
Feel free to hack imapsync as the NOLIMIT license permits it.
|
||||
|
||||
=head1 Links
|
||||
|
||||
|
@ -517,7 +513,7 @@ Entries for imapsync:
|
|||
|
||||
Feedback (good or bad) will often be welcome.
|
||||
|
||||
$Id: imapsync,v 1.518 2012/12/24 00:27:34 gilles Exp gilles $
|
||||
$Id: imapsync,v 1.525 2013/02/05 12:52:10 gilles Exp gilles $
|
||||
|
||||
=cut
|
||||
|
||||
|
@ -648,7 +644,7 @@ my(
|
|||
|
||||
# global variables initialisation
|
||||
|
||||
$rcs = '$Id: imapsync,v 1.518 2012/12/24 00:27:34 gilles Exp gilles $ ';
|
||||
$rcs = '$Id: imapsync,v 1.525 2013/02/05 12:52:10 gilles Exp gilles $ ';
|
||||
|
||||
$total_bytes_transferred = 0;
|
||||
$total_bytes_skipped = 0;
|
||||
|
@ -746,7 +742,7 @@ $usecache = 1 if ( $useuid and ( ! defined( $usecache ) ) ) ;
|
|||
$cacheaftercopy = 1 if ( $usecache and ( ! defined( $cacheaftercopy ) ) ) ;
|
||||
|
||||
$checkselectable = defined( $checkselectable ) ? $checkselectable : 1 ;
|
||||
$checkmessageexists = defined( $checkmessageexists ) ? $checkmessageexists : 1 ;
|
||||
$checkmessageexists = defined( $checkmessageexists ) ? $checkmessageexists : 0 ;
|
||||
$expungeaftereach = defined( $expungeaftereach ) ? $expungeaftereach : 1 ;
|
||||
$abletosearch = defined( $abletosearch ) ? $abletosearch : 1 ;
|
||||
$checkmessageexists = 0 if ( not $abletosearch ) ;
|
||||
|
@ -886,9 +882,11 @@ $authuser2 ||= $user2;
|
|||
print "Info: will try to use $authmech1 authentication on host1\n";
|
||||
print "Info: will try to use $authmech2 authentication on host2\n";
|
||||
|
||||
$syncacls = (defined($syncacls)) ? $syncacls : 0;
|
||||
$foldersizes = (defined($foldersizes)) ? $foldersizes : 1;
|
||||
$foldersizesatend = (defined($foldersizesatend)) ? $foldersizesatend : 1;
|
||||
$syncacls = (defined($syncacls)) ? $syncacls : 0 ;
|
||||
$foldersizes = (defined($foldersizes)) ? $foldersizes : 1 ;
|
||||
$foldersizesatend = (defined($foldersizesatend)) ? $foldersizesatend : $foldersizes ;
|
||||
|
||||
|
||||
|
||||
$fastio1 = (defined($fastio1)) ? $fastio1 : 0;
|
||||
$fastio2 = (defined($fastio2)) ? $fastio2 : 0;
|
||||
|
@ -968,7 +966,9 @@ exit_clean(0) if ($justlogin);
|
|||
my (
|
||||
@h1_folders_all, %h1_folders_all, @h1_folders_wanted, %requested_folder,
|
||||
%h1_subscribed_folder, %h2_subscribed_folder,
|
||||
@h2_folders_all, %h2_folders_all, @h2_folders_from_1_wanted, %h2_folders_from_1_wanted,
|
||||
@h2_folders_all, %h2_folders_all,
|
||||
@h2_folders_from_1_wanted, %h2_folders_from_1_wanted,
|
||||
%h2_folders_from_1_several,
|
||||
@h2_folders_from_1_all, %h2_folders_from_1_all,
|
||||
);
|
||||
|
||||
|
@ -1073,11 +1073,14 @@ print "Host2 separator and prefix: [$h2_sep][$h2_prefix]\n";
|
|||
|
||||
#exit ;
|
||||
|
||||
foreach my $h1_fold (@h1_folders_wanted) {
|
||||
my $h2_fold;
|
||||
$h2_fold = imap2_folder_name($h1_fold);
|
||||
$h2_folders_from_1_wanted{$h2_fold}++;
|
||||
}
|
||||
foreach my $h1_fold ( @h1_folders_wanted ) {
|
||||
my $h2_fold ;
|
||||
$h2_fold = imap2_folder_name( $h1_fold ) ;
|
||||
$h2_folders_from_1_wanted{ $h2_fold }++ ;
|
||||
if ( 1 < $h2_folders_from_1_wanted{ $h2_fold } ) {
|
||||
$h2_folders_from_1_several{ $h2_fold }++ ;
|
||||
}
|
||||
}
|
||||
@h2_folders_from_1_wanted = sort keys(%h2_folders_from_1_wanted);
|
||||
|
||||
foreach my $h1_fold (@h1_folders_all) {
|
||||
|
@ -1120,7 +1123,11 @@ print "++++ Looping on each folder\n";
|
|||
|
||||
my $begin_transfer_time = time ;
|
||||
|
||||
FOLDER: foreach my $h1_fold (@h1_folders_wanted) {
|
||||
|
||||
my %uid_candidate_for_deletion ;
|
||||
my %uid_candidate_no_deletion ;
|
||||
|
||||
FOLDER: foreach my $h1_fold ( @h1_folders_wanted ) {
|
||||
|
||||
last FOLDER if $imap1->IsUnconnected();
|
||||
last FOLDER if $imap2->IsUnconnected();
|
||||
|
@ -1318,7 +1325,7 @@ FOLDER: foreach my $h1_fold (@h1_folders_wanted) {
|
|||
my $h2_msgs_duplicate_nb = scalar( @h2_msgs_duplicate ) ;
|
||||
$h2{ $h2_fold }{ 'duplicates_nb' } = $h2_msgs_duplicate_nb ;
|
||||
|
||||
print "Host2 selected: $h2_msgs_nb, duplicates: $h2_msgs_duplicate_nb\n"
|
||||
print "Host2 folder $h2_fold selected: $h2_msgs_nb messages, duplicates: $h2_msgs_duplicate_nb\n"
|
||||
if ( $debug or $delete2duplicates or $h2_msgs_duplicate_nb ) ;
|
||||
$debug and print "Host2 whole time parsing headers took ", timenext(), " s\n";
|
||||
|
||||
|
@ -1348,7 +1355,7 @@ FOLDER: foreach my $h1_fold (@h1_folders_wanted) {
|
|||
|
||||
#next FOLDER ;
|
||||
|
||||
if( $delete2duplicates ) {
|
||||
if( $delete2duplicates and not exists( $h2_folders_from_1_several{ $h2_fold } ) ) {
|
||||
my @h2_expunge ;
|
||||
|
||||
foreach my $h2_msg ( @h2_msgs_duplicate ) {
|
||||
|
@ -1370,7 +1377,8 @@ FOLDER: foreach my $h1_fold (@h1_folders_wanted) {
|
|||
}
|
||||
}
|
||||
|
||||
if($delete2) {
|
||||
if( $delete2 and not exists( $h2_folders_from_1_several{ $h2_fold } ) ) {
|
||||
# No host1 folders f1a f1b ... going all to same f2 (via --regextrans2)
|
||||
my @h2_expunge;
|
||||
foreach my $m_id (@h2_hash_keys_sorted_by_uid) {
|
||||
#print "$m_id ";
|
||||
|
@ -1406,6 +1414,66 @@ FOLDER: foreach my $h1_fold (@h1_folders_wanted) {
|
|||
}
|
||||
}
|
||||
|
||||
if( $delete2 and exists( $h2_folders_from_1_several{ $h2_fold } ) ) {
|
||||
print "Host2 folder $h2_fold $h2_folders_from_1_several{ $h2_fold } folders left to sync there\n" ;
|
||||
my @h2_expunge;
|
||||
foreach my $m_id ( @h2_hash_keys_sorted_by_uid ) {
|
||||
my $h2_msg = $h2_hash{ $m_id }{ 'm' } ;
|
||||
unless ( exists( $h1_hash{ $m_id } ) ) {
|
||||
my $h2_flags = $h2_hash{ $m_id }{ 'F' } || "" ;
|
||||
my $isdel = $h2_flags =~ /\B\\Deleted\b/ ? 1 : 0 ;
|
||||
unless ( $isdel ) {
|
||||
$debug and print "msg $h2_fold/$h2_msg candidate for deletion on host2 [$m_id]\n" ;
|
||||
$uid_candidate_for_deletion{ $h2_fold }{ $h2_msg }++ ;
|
||||
}
|
||||
}else{
|
||||
$debug and print "msg $h2_fold/$h2_msg will cancel deletion on host2 [$m_id]\n" ;
|
||||
$uid_candidate_no_deletion{ $h2_fold }{ $h2_msg }++ ;
|
||||
}
|
||||
}
|
||||
foreach my $h2_msg ( @h2_msgs_delete2_not_in_cache ) {
|
||||
print "msg $h2_fold/$h2_msg candidate for deletion [not in cache] on host2\n";
|
||||
$uid_candidate_for_deletion{ $h2_fold }{ $h2_msg }++ ;
|
||||
}
|
||||
|
||||
foreach my $h2_msg ( @h2_msgs_in_cache ) {
|
||||
print "msg $h2_fold/$h2_msg will cancel deletion [in cache] on host2\n";
|
||||
$uid_candidate_no_deletion{ $h2_fold }{ $h2_msg }++ ;
|
||||
}
|
||||
|
||||
|
||||
if ( 0 == $h2_folders_from_1_several{ $h2_fold } ) {
|
||||
# last host1 folder going to $h2_fold
|
||||
print "Last host1 folder going to $h2_fold\n" ;
|
||||
foreach my $h2_msg ( keys %{ $uid_candidate_for_deletion{ $h2_fold } } ) {
|
||||
$debug and print "msg $h2_fold/$h2_msg candidate for deletion on host2\n" ;
|
||||
if ( exists( $uid_candidate_no_deletion{ $h2_fold }{ $h2_msg } ) ) {
|
||||
$debug and print "msg $h2_fold/$h2_msg canceled deletion on host2\n" ;
|
||||
}else{
|
||||
print "msg $h2_fold/$h2_msg marked \\Deleted on host2 $dry_message\n";
|
||||
push( @h2_expunge, $h2_msg ) if $uidexpunge2 ;
|
||||
unless ( $dry ) {
|
||||
$imap2->delete_message( $h2_msg ) ;
|
||||
$h2_nb_msg_deleted += 1 ;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
my $cnt = scalar @h2_expunge ;
|
||||
if( @h2_expunge ) {
|
||||
print "uidexpunge $cnt message(s) $dry_message\n" ;
|
||||
$imap2->uidexpunge( \@h2_expunge ) if ! $dry ;
|
||||
}
|
||||
if ( $expunge2 ) {
|
||||
print "Expunging host2 folder $h2_fold $dry_message\n" ;
|
||||
$imap2->expunge( ) if ! $dry ;
|
||||
}
|
||||
|
||||
$h2_folders_from_1_several{ $h2_fold }-- ;
|
||||
}
|
||||
|
||||
|
||||
my $h2_uidnext = $imap2->uidnext( $h2_fold ) ;
|
||||
$debug and print "Host2 uidnext: $h2_uidnext\n" ;
|
||||
$h2_uidguess = $h2_uidnext ;
|
||||
|
@ -1419,7 +1487,11 @@ FOLDER: foreach my $h1_fold (@h1_folders_wanted) {
|
|||
# copy
|
||||
last FOLDER if $imap1->IsUnconnected();
|
||||
last FOLDER if $imap2->IsUnconnected();
|
||||
copy_message( $h1_msg, $h1_fold, $h2_fold, $h1_fir_ref, $permanentflags2, $cache_dir ) ;
|
||||
my $h2_msg = copy_message( $h1_msg, $h1_fold, $h2_fold, $h1_fir_ref, $permanentflags2, $cache_dir ) ;
|
||||
if( $delete2 and exists( $h2_folders_from_1_several{ $h2_fold } ) and $h2_msg ) {
|
||||
print "msg $h2_fold/$h2_msg will cancel deletion [fresh copy] on host2\n" ;
|
||||
$uid_candidate_no_deletion{ $h2_fold }{ $h2_msg }++ ;
|
||||
}
|
||||
last FOLDER if total_bytes_max_reached( ) ;
|
||||
next MESS;
|
||||
}
|
||||
|
@ -1478,7 +1550,11 @@ FOLDER: foreach my $h1_fold (@h1_folders_wanted) {
|
|||
$debug and print "Copy by uid $h1_fold/$h1_msg\n" ;
|
||||
last FOLDER if $imap1->IsUnconnected();
|
||||
last FOLDER if $imap2->IsUnconnected();
|
||||
copy_message( $h1_msg, $h1_fold, $h2_fold, $h1_fir_ref, $permanentflags2, $cache_dir ) ;
|
||||
my $h2_msg = copy_message( $h1_msg, $h1_fold, $h2_fold, $h1_fir_ref, $permanentflags2, $cache_dir ) ;
|
||||
if( $delete2 and exists( $h2_folders_from_1_several{ $h2_fold } ) and $h2_msg ) {
|
||||
print "msg $h2_fold/$h2_msg will cancel deletion [fresh copy] on host2\n" ;
|
||||
$uid_candidate_no_deletion{ $h2_fold }{ $h2_msg }++ ;
|
||||
}
|
||||
last FOLDER if total_bytes_max_reached( ) ;
|
||||
}
|
||||
|
||||
|
@ -1990,8 +2066,8 @@ sub banner_imapsync {
|
|||
my @argv_copy = @_;
|
||||
my $banner_imapsync = join("",
|
||||
'$RCSfile: imapsync,v $ ',
|
||||
'$Revision: 1.518 $ ',
|
||||
'$Date: 2012/12/24 00:27:34 $ ',
|
||||
'$Revision: 1.525 $ ',
|
||||
'$Date: 2013/02/05 12:52:10 $ ',
|
||||
"\n",localhost_info(), "\n",
|
||||
"Command line used:\n",
|
||||
"$0 ", command_line_nopassword(@argv_copy), "\n",
|
||||
|
@ -2975,12 +3051,14 @@ sub copy_message {
|
|||
}
|
||||
}
|
||||
#print "PRESS ENTER" and my $a = <> ;
|
||||
return( $new_id ) ;
|
||||
}
|
||||
}
|
||||
else{
|
||||
$nb_msg_skipped_dry_mode += 1;
|
||||
$h1_nb_msg_processed +=1 ;
|
||||
}
|
||||
return( ) ;
|
||||
}
|
||||
|
||||
sub eta {
|
||||
|
@ -3656,14 +3734,7 @@ sub stats {
|
|||
}
|
||||
|
||||
sub thank_author {
|
||||
|
||||
return("Homepage: http://imapsync.lamiral.info/\n");
|
||||
|
||||
# used to be
|
||||
return(join("", "Happy with this free, open and gratis NLPL software?\n",
|
||||
"Encourage the author (Gilles LAMIRAL) by giving him a book\n",
|
||||
"or just money via paypal:\n",
|
||||
"http://imapsync.lamiral.info/\n"));
|
||||
}
|
||||
|
||||
sub get_options {
|
||||
|
@ -3986,7 +4057,7 @@ sub check_last_release {
|
|||
}
|
||||
|
||||
sub imapsync_version {
|
||||
my $rcs = '$Id: imapsync,v 1.518 2012/12/24 00:27:34 gilles Exp gilles $ ';
|
||||
my $rcs = '$Id: imapsync,v 1.525 2013/02/05 12:52:10 gilles Exp gilles $ ';
|
||||
$rcs =~ m/,v (\d+\.\d+)/;
|
||||
my $VERSION = ($1) ? $1: "UNKNOWN";
|
||||
return($VERSION);
|
||||
|
@ -4100,69 +4171,84 @@ usage: $0 [options]
|
|||
|
||||
Several options are mandatory.
|
||||
|
||||
--host1 <string> : "from" imap server. Mandatory.
|
||||
--port1 <int> : port to connect on host1. Default is 143.
|
||||
--user1 <string> : user to login on host1. Mandatory.
|
||||
--domain1 <string> : domain on host1 (NTLM authentication).
|
||||
--authuser1 <string> : user to auth with on host1 (admin user).
|
||||
--dry : Makes imapsync doing nothing, just print what would
|
||||
be done without --dry.
|
||||
|
||||
--host1 <string> : Source or "from" imap server. Mandatory.
|
||||
--port1 <int> : Port to connect on host1. Default is 143.
|
||||
--user1 <string> : User to login on host1. Mandatory.
|
||||
--showpasswords : Shows passwords on output instead of "MASKED".
|
||||
Useful to restart a complete run by just reading a log.
|
||||
--password1 <string> : Password for the user1.
|
||||
--host2 <string> : "destination" imap server. Mandatory.
|
||||
--port2 <int> : Port to connect on host2. Default is 143.
|
||||
--user2 <string> : User to login on host2. Mandatory.
|
||||
--password2 <string> : Password for the user2.
|
||||
|
||||
--passfile1 <string> : Password file for the user1. It must contain the
|
||||
password on the first line. This option avoids to show
|
||||
the password on the command line like --password1 does.
|
||||
--passfile2 <string> : Password file for the user2. Contains the password.
|
||||
--domain1 <string> : Domain on host1 (NTLM authentication).
|
||||
--domain2 <string> : Domain on host2 (NTLM authentication).
|
||||
--authuser1 <string> : User to auth with on host1 (admin user).
|
||||
Avoid using --authmech1 SOMETHING with --authuser1.
|
||||
--authuser2 <string> : User to auth with on host2 (admin user).
|
||||
--proxyauth1 : Use proxyauth on host1. Requires --authuser1.
|
||||
Required by Sun/iPlanet/Netscape IMAP servers to
|
||||
be able to use an administrative user
|
||||
--password1 <string> : password for the user1. Dangerous, use --passfile1
|
||||
--showpasswords : shows passwords on output instead of "MASKED".
|
||||
Useful to restart a complete run by just reading a log.
|
||||
--passfile1 <string> : password file for the user1. Contains the password.
|
||||
--host2 <string> : "destination" imap server. Mandatory.
|
||||
--port2 <int> : port to connect on host2. Default is 143.
|
||||
--user2 <string> : user to login on host2. Mandatory.
|
||||
--domain2 <string> : domain on host2 (NTLM authentication).
|
||||
--authuser2 <string> : user to auth with on host2 (admin user).
|
||||
be able to use an administrative user.
|
||||
--proxyauth2 : Use proxyauth on host2. Requires --authuser2.
|
||||
Required by Sun/iPlanet/Netscape IMAP servers to
|
||||
be able to use an administrative user
|
||||
--password2 <string> : password for the user2. Dangerous, use --passfile2
|
||||
--passfile2 <string> : password file for the user2. Contains the password.
|
||||
|
||||
--authmd51 : Use MD5 authentification for host1.
|
||||
--authmd52 : Use MD5 authentification for host2.
|
||||
--authmech1 <string> : auth mechanism to use with host1:
|
||||
--authmech1 <string> : Auth mechanism to use with host1:
|
||||
PLAIN, LOGIN, CRAM-MD5 etc. Use UPPERCASE.
|
||||
--authmech2 <string> : auth mechanism to use with host2. See --authmech1
|
||||
--ssl1 : use an SSL connection on host1.
|
||||
--ssl2 : use an SSL connection on host2.
|
||||
--tls1 : use an TLS connection on host1.
|
||||
--tls2 : use an TLS connection on host2.
|
||||
--folder <string> : sync this folder.
|
||||
--authmech2 <string> : Auth mechanism to use with host2. See --authmech1
|
||||
--ssl1 : Use an SSL connection on host1.
|
||||
--ssl2 : Use an SSL connection on host2.
|
||||
--tls1 : Use an TLS connection on host1.
|
||||
--tls2 : Use an TLS connection on host2.
|
||||
|
||||
--folder <string> : Sync this folder.
|
||||
--folder <string> : and this one, etc.
|
||||
--folderrec <string> : sync this folder recursively.
|
||||
--folderrec <string> : Sync this folder recursively.
|
||||
--folderrec <string> : and this one, etc.
|
||||
--include <regex> : sync folders matching this regular expression
|
||||
--include <regex> : Sync folders matching this regular expression
|
||||
--include <regex> : or this one, etc.
|
||||
in case both --include --exclude options are
|
||||
use, include is done before.
|
||||
--exclude <regex> : skips folders matching this regular expression
|
||||
--exclude <regex> : Skips folders matching this regular expression
|
||||
Several folders to avoid:
|
||||
--exclude 'fold1|fold2|f3' skips fold1, fold2 and f3.
|
||||
--exclude <regex> : or this one, etc.
|
||||
--tmpdir <string> : where to store temporary files and subdirectories.
|
||||
Will be created if it doesn't exist.
|
||||
Default is system specific and should be ok.
|
||||
--pidfile <string> : the file where imapsync pid is written.
|
||||
--pidfilelocking : Abort if pidfile already exists. Usefull to avoid
|
||||
concurrent transfers on the same mailbox.
|
||||
--prefix1 <string> : remove prefix to all destination folders
|
||||
(usually INBOX. for cyrus imap servers)
|
||||
you can use --prefix1 if your source imap server
|
||||
does not have NAMESPACE capability.
|
||||
--prefix2 <string> : add prefix to all destination folders
|
||||
(usually INBOX. for cyrus imap servers)
|
||||
use --prefix2 if your target imap server does not
|
||||
have NAMESPACE capability.
|
||||
--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
|
||||
Then, when happy, remove --dry, remove --justfolders.
|
||||
Have in mind that --regextrans2 is applied after prefix
|
||||
and separator inversion.
|
||||
|
||||
--tmpdir <string> : Where to store temporary files and subdirectories.
|
||||
Will be created if it doesn't exist.
|
||||
Default is system specific, Unix is /tmp but
|
||||
it's often small and deleted at reboot.
|
||||
--tmpdir /var/tmp should be better.
|
||||
--pidfile <string> : The file where imapsync pid is written.
|
||||
--pidfilelocking : Abort if pidfile already exists. Usefull to avoid
|
||||
concurrent transfers on the same mailbox.
|
||||
|
||||
--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.
|
||||
--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.
|
||||
|
||||
--regexmess <regex> : Apply the whole regex to each message before transfer.
|
||||
Example: 's/\\000/ /g' # to replace null by space.
|
||||
--regexmess <regex> : and this one.
|
||||
|
@ -4170,23 +4256,22 @@ Several options are mandatory.
|
|||
--regexflag <regex> : Apply the whole regex to each flags list.
|
||||
Example: 's/\"Junk"//g' # to remove "Junk" flag.
|
||||
--regexflag <regex> : and this one, etc.
|
||||
--sep1 <string> : host1 separator in case namespace is not supported.
|
||||
--sep2 <string> : idem for host2.
|
||||
--delete : Deletes messages on host1 server after
|
||||
a successful transfer. Useful in case you
|
||||
want to migrate from one server to another one.
|
||||
With imapsync, --delete tags messages as deleted and
|
||||
they are really deleted unless --noexpunge is used.
|
||||
--delete2 : delete messages in host2 that are not in
|
||||
|
||||
--delete : Deletes messages on host1 server after a successful
|
||||
transfer. Option --delete has the following behavior:
|
||||
it marks messages as deleted with the IMAP flag
|
||||
\\Deleted, then messages are really deleted with an
|
||||
EXPUNGE IMAP command.
|
||||
--delete2 : Delete messages in host2 that are not in
|
||||
host1 server. Useful for backup or pre-sync.
|
||||
--delete2duplicates : delete messages in host2 that are duplicates.
|
||||
--delete2duplicates : Delete messages in host2 that are duplicates.
|
||||
Works only without --useuid since duplicates are
|
||||
detected with header part of each message.
|
||||
--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>: delete only folders matching regex.
|
||||
--delete2foldersbutnot <regex>: do not delete folders matching regex.
|
||||
--delete2foldersonly <regex>: Deleted only folders matching regex.
|
||||
--delete2foldersbutnot <regex>: Do not delete folders matching regex.
|
||||
Example: --delete2foldersbutnot "/Tasks|Contacts|Foo/"
|
||||
--noexpunge : Do not expunge messages on host1.
|
||||
Expunge really deletes messages marked deleted.
|
||||
|
@ -4198,17 +4283,19 @@ Several options are mandatory.
|
|||
--expunge2 : Expunge messages on host2 after messages transfer.
|
||||
--uidexpunge2 : uidexpunge messages on the host2 account
|
||||
that are not on the host1 account, requires --delete2
|
||||
--syncinternaldates : sets the internal dates on host2 same as host1.
|
||||
|
||||
--syncinternaldates : Sets the internal dates on host2 same as host1.
|
||||
Turned on by default. Internal date is the date
|
||||
a message arrived on a host (mtime).
|
||||
--idatefromheader : sets the internal dates on host2 same as the
|
||||
--idatefromheader : Sets the internal dates on host2 same as the
|
||||
"Date:" headers.
|
||||
--maxsize <int> : skip messages larger (or equal) than <int> bytes
|
||||
--minsize <int> : skip messages smaller (or equal) than <int> bytes
|
||||
--maxage <int> : skip messages older than <int> days.
|
||||
|
||||
--maxsize <int> : Skip messages larger (or equal) than <int> bytes
|
||||
--minsize <int> : Skip messages smaller (or equal) than <int> bytes
|
||||
--maxage <int> : Skip messages older than <int> days.
|
||||
final stats (skipped) don't count older messages
|
||||
see also --minage
|
||||
--minage <int> : skip messages newer than <int> days.
|
||||
--minage <int> : Skip messages newer than <int> days.
|
||||
final stats (skipped) don't count newer messages
|
||||
You can do (+ are the messages selected):
|
||||
past|----maxage+++++++++++++++>now
|
||||
|
@ -4216,47 +4303,55 @@ Several options are mandatory.
|
|||
past|----maxage+++++minage---->now (intersection)
|
||||
past|++++minage-----maxage++++>now (union)
|
||||
--search <string> : Select messages returned by this IMAP SEARCH command.
|
||||
|
||||
--exitwhenover <int> : Stop syncing when total bytes transferred reached.
|
||||
Gmail per day allows 2500000000 down 500000000 upload.
|
||||
|
||||
--useheader <string> : Use this header to compare messages on both sides.
|
||||
Ex: Message-ID or Subject or Date.
|
||||
--useheader <string> and this one, etc.
|
||||
--dry : do nothing, just print what would be done.
|
||||
--subscribed : transfers subscribed folders.
|
||||
--subscribe : subscribe to the folders transferred on the
|
||||
|
||||
--subscribed : Transfers subscribed folders.
|
||||
--subscribe : Subscribe to the folders transferred on the
|
||||
host2 that are subscribed on host1. On by default.
|
||||
--subscribe_all : subscribe to the folders transferred on the
|
||||
--subscribe_all : Subscribe to the folders transferred on the
|
||||
host2 even if they are not subscribed on host1.
|
||||
|
||||
--nofoldersizes : Do not calculate the size of each folder in bytes
|
||||
and message counts. Default is to calculate them.
|
||||
--nofoldersizesatend : Do not calculate the size of each folder in bytes
|
||||
and message counts at the end. Default is on.
|
||||
--justfoldersizes : exit after printed the folder sizes.
|
||||
--syncacls : synchronises acls (Access Control Lists).
|
||||
--nosyncacls : does not synchronise acls. This is the default.
|
||||
--justfoldersizes : Exit after having printed the folder sizes.
|
||||
|
||||
--syncacls : Synchronises acls (Access Control Lists).
|
||||
--nosyncacls : Does not synchronize acls. This is the default.
|
||||
Acls in IMAP are not standardized, be careful.
|
||||
|
||||
--usecache : Use cache to speedup.
|
||||
--nousecache : Do not use cache. Caveat: --useuid --nousecache creates
|
||||
duplicates on multiple runs.
|
||||
--useuid : Use uid instead of header as a criterium to sync.
|
||||
--usecache is then implied unless --nousecache is
|
||||
used.
|
||||
--debug : debug mode.
|
||||
--debugcontent : debug content of the messages transfered.
|
||||
--debugflags : debug flags.
|
||||
--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.
|
||||
--version : print software version.
|
||||
--noreleasecheck : do not check for new imapsync release (a http request).
|
||||
--justconnect : just connect to both servers and print useful
|
||||
--useuid : Use uid instead of header as a criterium to recognize
|
||||
messages. Option --usecache is then implied unless
|
||||
--nousecache is used.
|
||||
|
||||
--debug : Debug mode.
|
||||
--debugcontent : Debug content of the messages transfered.
|
||||
--debugflags : Debug flags.
|
||||
--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.
|
||||
|
||||
--version : Print software version.
|
||||
--noreleasecheck : Do not check for new imapsync release (a http request).
|
||||
--justconnect : Just connect to both servers and print useful
|
||||
information. Need only --host1 and --host2 options.
|
||||
--justlogin : just login to both host1 and host2 with users
|
||||
--justlogin : Just login to both host1 and host2 with users
|
||||
credentials, then exit.
|
||||
--justfolders : just do things about folders (ignore messages).
|
||||
--fast : be faster, equivalent to --nofoldersizes
|
||||
--justfolders : Do only things about folders (ignore messages).
|
||||
|
||||
--help : print this help.
|
||||
|
||||
Example: to synchronise imap account "foo" on "imap.truc.org"
|
||||
Example: to synchronize imap account "foo" on "imap.truc.org"
|
||||
to imap account "bar" on "imap.trac.org"
|
||||
with foo password "secret1"
|
||||
and bar password "secret2"
|
||||
|
|
97
index.shtml
97
index.shtml
|
@ -5,7 +5,7 @@
|
|||
<title>Imapsync: an IMAP migration tool ( release <!--#exec cmd="cat ./VERSION"--> )</title>
|
||||
<meta name="generator" content="Bluefish 1.0.7"/>
|
||||
<meta name="author" content="Gilles LAMIRAL"/>
|
||||
<meta name="date" content="2012-12-24T01:58:51+0100"/>
|
||||
<meta name="date" content="2013-01-16T11:02:15+0100"/>
|
||||
<meta name="copyright" content="None"/>
|
||||
<meta name="keywords" content="imap, transfert, migration"/>
|
||||
<meta name="description" content="imap migration tool"/>
|
||||
|
@ -31,7 +31,7 @@
|
|||
<ul class="none">
|
||||
<li>Buy <a href="#buy_source"><b>imapsync source code</b></a> (any OS)</li>
|
||||
<li>Buy <a href="#buy_exe"><b>standalone win32</b></a> <b>imapsync.exe</b> (also <b>works on win64</b>)</li>
|
||||
<li>Buy <b>full professional</b> <a href="#buy_support">imapsync <b>support</b></a> to succeed your migration</li>
|
||||
<li>Buy <b>full professional</b> <a href="#buy_support">imapsync <b>support</b></a> to successfully perform your migration</li>
|
||||
<li>Are your <a href="#imap_server_success">imap servers <b>supported</b></a> by imapsync?</li>
|
||||
</ul>
|
||||
|
||||
|
@ -43,50 +43,56 @@
|
|||
|
||||
<h2>What is imapsync?</h2>
|
||||
|
||||
<p><b>imapsync</b> software is a command line tool allowing incremental and
|
||||
<p><b>imapsync</b> software is a command line tool that allows incremental and
|
||||
recursive <b>IMAP</b> transfers from one mailbox to another, both anywhere on the internet
|
||||
or in your local network. "Incremental" means you can stop the transfer at any time
|
||||
and restart it later efficiently. "Recursive" means all folders hierarchy can be copied.
|
||||
"Command line" means it's not a graphical tool, imapsync on Windows has to be run in a DOS box
|
||||
or in your local network.
|
||||
|
||||
"Incremental" means you can stop the transfer at any time
|
||||
and restart it later efficiently.
|
||||
|
||||
"Recursive" means the complete folders hierarchy can be copied.
|
||||
|
||||
"Command line" means it's not a graphical tool, on Windows you have to run imapsync in a DOS box
|
||||
(cmd.exe) or from a <a href="#DOC_BASIC">batch file</a>.
|
||||
</p>
|
||||
|
||||
<p><b>imapsync</b> is useful for imap account <b>migration</b> or imap account <b>backup</b>.
|
||||
<p>
|
||||
The purpose of imapsync is to <b>migrate</b> imap accounts or to <b>backup</b> imap accounts.
|
||||
</p>
|
||||
|
||||
|
||||
<p><b>imapsync</b> is <b>not adequate</b> for maintaining two active imap accounts
|
||||
in synchronization where the user plays independently on both sides.
|
||||
<p>
|
||||
<b>imapsync</b> is not suitable for maintaining a synchronization between two active imap accounts while the user
|
||||
is working on both sides.
|
||||
|
||||
Use <a href="https://github.com/nicolas33/offlineimap"><b>offlineimap</b></a> (written by John Goerzen)
|
||||
or <a href="http://isync.sourceforge.net/"><b>mbsync</b></a> (written by Michael R. Elkins)
|
||||
for <b>2 ways synchronizations</b>.
|
||||
for <b>bidirectionnal (2 ways) synchronizations</b>.
|
||||
</p>
|
||||
|
||||
<p>Alternatives to imapsync are listed in the <a href="#similar"><b>Similar softwares</b></a> section.
|
||||
</p>
|
||||
|
||||
<h2><a id="NUMBERS"></a>Some numbers for 2011 and 2012</h2>
|
||||
<h2><a id="NUMBERS"></a>Facts and figures for 2011 and 2012</h2>
|
||||
|
||||
<ul>
|
||||
<li>Number of <b>imapsync users</b> per month: between <b>3000 and 4000 </b>users
|
||||
(34000 users a year)</li>
|
||||
<li><b>3000 to 4000 </b>users (34000 users a year)</li>
|
||||
|
||||
<li>Number of <b>imapsync transfers</b> between
|
||||
<b>5 and 25 millions mailboxes </b>transfers per month,
|
||||
<li><b>5 to 25 millions mailboxes </b>transfers per month,
|
||||
total is 93 millions for 2011, 90 millions for 2012.</li>
|
||||
|
||||
<li>Percentage between <b>operating systems</b> users running imapsync:
|
||||
<li><b>Operating systems</b> run by imapsync users:
|
||||
<ul>
|
||||
<li><b>Linux: 67 %</b></li>
|
||||
<li><b>Win32: 16 %</b></li>
|
||||
<li><b>Darwin: 9 %</b></li>
|
||||
<li>FreeBSD: 7 %</li>
|
||||
<li>Solaris: 0.3 %</li>
|
||||
<li>OpenBSD: 0.03 %</li>
|
||||
<li>Other: 0.67 %</li>
|
||||
<li><b>Linux: 67%</b></li>
|
||||
<li><b>Win32: 16%</b></li>
|
||||
<li><b>Darwin: 9%</b></li>
|
||||
<li>FreeBSD: 7%</li>
|
||||
<li>Solaris: 0.3%</li>
|
||||
<li>OpenBSD: 0.03%</li>
|
||||
<li>Other: 0.67%</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><b>Biggest user usage</b>: about <b>21 millions</b> of IMAP mailbox transfers (in one month)</li>
|
||||
<li><b>Highest use rate</b>: about <b>21 millions</b> of IMAP mailbox transfers (in a single month)</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
@ -122,7 +128,7 @@ total is 93 millions for 2011, 90 millions for 2012.</li>
|
|||
<li><b>1.518</b></li>
|
||||
|
||||
<li><b>Bug fix</b>: When identtifying with header, change tabulations to spaces
|
||||
(Gmail bug on with "Received:" on multilines).</li>
|
||||
(Gmail bug with "Received:" header on multilines).</li>
|
||||
<li><b>Bug fix</b>: Bugfix. Automatic --nocheckmessageexists when --noabletosearch is set.</li>
|
||||
</ul>
|
||||
|
||||
|
@ -254,18 +260,19 @@ by ignoring PERMANENTFLAGS (Exchange tests)</li>
|
|||
<h2><a id="DOC_BASIC"></a>Simple transfer on Windows</h2>
|
||||
|
||||
<p>
|
||||
See <b><a href="./examples/imapsync_example.bat">imapsync_example.bat</a></b>
|
||||
batch file example that you can easily adapt with your parameters.
|
||||
Batch file example <b><a href="./examples/imapsync_example.bat">imapsync_example.bat</a></b>
|
||||
that you can easily adapt with your parameters.
|
||||
</p>
|
||||
|
||||
|
||||
<h2><a id="DOC_MASS"></a>Massive transfers (many mailboxes)</h2>
|
||||
|
||||
<p>
|
||||
In order to migrate many mailboxes a good way is to use a loop over a csv
|
||||
file containing only the data credentials.
|
||||
A example of this file is <b><a href="./examples/file.txt">file.txt</a></b>,
|
||||
it can be used by the two following command scripts.<br/>
|
||||
In order to migrate many mailboxes, you should use a loop over a csv
|
||||
file containing only the data credentials.
|
||||
|
||||
An example of this file is <b><a href="./examples/file.txt">file.txt</a></b>,
|
||||
it can be used with the two following command scripts.<br/>
|
||||
|
||||
On Windows, see <b><a href="./examples/sync_loop_windows.bat">sync_loop_windows.bat</a></b>
|
||||
batch example.<br/>
|
||||
|
@ -301,13 +308,14 @@ any Unix, Linux, Windows, or Mac OS operating system.
|
|||
</p>
|
||||
|
||||
<p>
|
||||
<b>+ Two years</b> of imapsync <b>updates</b> without extra payment.<br/>
|
||||
<b>+ Lifetime</b> of imapsync <b>updates</b> without extra payment.<br/>
|
||||
<b>+ 30 days money-back guarantee!</b> (any reason qualifies)<br/>
|
||||
<b>+</b> Standalone <b>imapsync.exe</b>.<br/>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Payment by Paypal account and credit card accepted. <br/>
|
||||
Price <b>42 EUR</b> is equal to around <b>50 USD</b>,
|
||||
Price <b>42 EUR</b> is equal to around <b>55 USD</b>,
|
||||
no problem to pay in USD (or any currency) via paypal:
|
||||
</p>
|
||||
|
||||
|
@ -334,7 +342,7 @@ name="submit" alt="PayPal - The safer, easier way to pay online!"/>
|
|||
</p>
|
||||
</form>
|
||||
|
||||
<p>You will receive a <b>download link just after</b> the payment.<br/>
|
||||
<p>You will receive a <b>download link just after</b> the payment from gilles.lamiral@laposte.net (can fall in Spam folder sometimes).<br/>
|
||||
You will also receive a gpg signed <b>invoice</b> within <b>a few days by email</b>.<br/>
|
||||
Please give a <b>delivery postal address where the invoice will be needed</b>
|
||||
(your company for example), since reedit is not easy (and forbidden by law).
|
||||
|
@ -350,13 +358,14 @@ buying the latest win32 <b>standalone imapsync.exe</b> for <b>42 EUR</b>
|
|||
</p>
|
||||
|
||||
<p>
|
||||
<b>+ Two years</b> of imapsync <b>updates</b> without extra payment.<br/>
|
||||
<b>+ Lifetime</b> of imapsync <b>updates</b> without extra payment.<br/>
|
||||
<b>+ 30 days money-back guarantee!</b> (any reason qualifies)<br/>
|
||||
<b>+</b> Source code of <b>imapsync</b>.<br/>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Payment by Paypal account and credit card accepted. <br/>
|
||||
Price <b>42 EUR</b> is equal to around <b>50 USD</b>,
|
||||
Price <b>42 EUR</b> is equal to around <b>55 USD</b>,
|
||||
no problem to pay in USD (or any currency) via paypal:
|
||||
</p>
|
||||
|
||||
|
@ -382,7 +391,7 @@ name="submit" alt="PayPal - The safer, easier way to pay online!"/>
|
|||
</p>
|
||||
</form>
|
||||
|
||||
<p>You will receive a download link <b>just after</b> the payment.<br/>
|
||||
<p>You will receive a download link <b>just after</b> the payment, from gilles.lamiral@laposte.net (can fall in Spam folder sometimes).<br/>
|
||||
You will also receive a gpg signed <b>invoice</b> within <b>a few days by email</b>.<br/>
|
||||
Please give a <b>delivery postal address where the invoice will be needed</b>
|
||||
(your company for example), since reedit is not easy (and forbidden by law).
|
||||
|
@ -406,7 +415,7 @@ done by the imapsync designer/developper.
|
|||
</p>
|
||||
<p>
|
||||
Payment by Paypal account and credit card accepted. <br/>
|
||||
90 EUR is equal to around <b>110 USD</b>,
|
||||
90 EUR is equal to around <b>120 USD</b>,
|
||||
no problem to pay in USD (or any currency) with paypal:
|
||||
</p>
|
||||
|
||||
|
@ -435,7 +444,8 @@ It's 2 letters followed by 11 digits, for example mine is FR74429303332.
|
|||
</p>
|
||||
</form>
|
||||
|
||||
<p>You will also receive a gpg signed <b>invoice</b> within <b>a few days by email</b>.<br/>
|
||||
<p>You will receive instructions to contact me <b>just after</b> the payment, from gilles.lamiral@laposte.net (can fall in Spam folder sometimes).<br/>
|
||||
You will also receive a gpg signed <b>invoice</b> within <b>a few days by email</b>.<br/>
|
||||
Please give a <b>delivery postal address where the invoice will be needed</b>
|
||||
(your company for example), since reedit is not easy (and forbidden by law).
|
||||
</p>
|
||||
|
@ -465,13 +475,13 @@ lists what may be coded or done in the future.
|
|||
<a href="CREDITS">CREDITS</a> file.
|
||||
</p>
|
||||
|
||||
<p>What you can do with imapsync is listed in <a href="COPYING">COPYING</a>.
|
||||
<p>What you're allowed to do with imapsync is listed in the <a href="LICENSE">LICENSE</a> file (well worth it).
|
||||
</p>
|
||||
|
||||
<h2><a id="MAILING-LIST"></a>The imapsync mailing list</h2>
|
||||
|
||||
<p>
|
||||
The public mailing-list may be the best way to get free support.<br/>
|
||||
The public mailing-list may be the best way to get free and gratis support (not as quick as the professional support).<br/>
|
||||
You can write to the mailing-list even if you're not subscribed to it.<br/>
|
||||
In that case you will receive a confirmation message each time you post (to avoid spam).
|
||||
</p>
|
||||
|
@ -527,6 +537,7 @@ Don't hesitate to have a try, I will help you and make efforts to switch them to
|
|||
|
||||
<ul>
|
||||
<li>DBMail 0.9, 2.0.7 (GPL). But most other DBMail releases are supported (see below)</li>
|
||||
<li><b>Hotmail</b> since hotmail.com does not provide IMAP access</li>
|
||||
<li>Imail 7.04 (maybe).</li>
|
||||
<li>MailEnable 1.54 (Proprietary) but MailEnable 4.23 is supported. </li>
|
||||
<li>(2011) <b>MDaemon 12.0.3</b> as <b>host2</b>
|
||||
|
@ -607,7 +618,7 @@ Don't hesitate to have a try, I will help you and make efforts to switch them to
|
|||
<li>Rockliffe Mailsite 5.3.11, 4.5.6 (<a href="http://www.mailsite.com/">http://www.mailsite.com/</a>) </li>
|
||||
<li>Samsung Contact IMAP server 8.5.0 </li>
|
||||
<li>Scalix v10.1, 10.0.1.3, 11.0.0.431, 11.4.6 (<a href="http://www.scalix.com/">http://www.scalix.com/</a>) </li>
|
||||
<li>SmarterMail, Smarter Mail 5.0 Enterprise, Smarter Mail 5.5 [host1]. (<a href="http://www.smartertools.com/">http://www.smartertools.com/</a>) </li>
|
||||
<li>SmarterMail, Smarter Mail 5.0 Enterprise, Smarter Mail 5.5 [host1], SmarterMail Professional 10.2 [host1]. (<a href="http://www.smartertools.com/">http://www.smartertools.com/</a>) </li>
|
||||
<li>Softalk Workgroup Mail 7.6.4 [host1] (<a href="http://www.softalkltd.com/products/download_wm_v7.asp">http://www.softalkltd.com/products/download_wm_v7.asp</a>).</li>
|
||||
<li>SunONE Messaging server 5.2, 6.0 (SUN JES - Java Enterprise System) (<a href="http://www.oracle.com/">http://www.oracle.com/</a>) </li>
|
||||
<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>
|
||||
|
@ -685,7 +696,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.141 2012/12/24 01:03:07 gilles Exp gilles $)
|
||||
($Id: index.shtml,v 1.148 2013/02/08 06:28:18 gilles Exp gilles $)
|
||||
</p>
|
||||
|
||||
</body>
|
||||
|
|
80
tests.sh
80
tests.sh
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
# $Id: tests.sh,v 1.209 2012/12/24 02:24:09 gilles Exp gilles $
|
||||
# $Id: tests.sh,v 1.212 2013/01/28 02:52:34 gilles Exp gilles $
|
||||
|
||||
# Example 1:
|
||||
# CMD_PERL='perl -I./Mail-IMAPClient-3.32/lib' sh -x tests.sh
|
||||
|
@ -309,6 +309,15 @@ ll_folder() {
|
|||
--folder INBOX.yop --folder INBOX.Trash
|
||||
}
|
||||
|
||||
ll_star() {
|
||||
$CMD_PERL ./imapsync \
|
||||
--host1 $HOST1 --user1 tata \
|
||||
--passfile1 ../../var/pass/secret.tata \
|
||||
--host2 $HOST2 --user2 titi \
|
||||
--passfile2 ../../var/pass/secret.titi \
|
||||
--folder 'INBOX.backstar\*' --dry --justfolders --debugimap1 --regextrans2 's#\\|\*#_#g'
|
||||
}
|
||||
|
||||
|
||||
|
||||
ll_folder_noexist() {
|
||||
|
@ -1103,15 +1112,15 @@ ll_include()
|
|||
--include '^INBOX.yop'
|
||||
}
|
||||
|
||||
ll_exclude()
|
||||
{
|
||||
$CMD_PERL ./imapsync \
|
||||
--host1 $HOST1 --user1 tata \
|
||||
--passfile1 ../../var/pass/secret.tata \
|
||||
--host2 $HOST2 --user2 titi \
|
||||
--passfile2 ../../var/pass/secret.titi \
|
||||
--exclude '^INBOX.yop' --justfolders --nofoldersizes
|
||||
}
|
||||
ll_exclude()
|
||||
{
|
||||
$CMD_PERL ./imapsync \
|
||||
--host1 $HOST1 --user1 tata \
|
||||
--passfile1 ../../var/pass/secret.tata \
|
||||
--host2 $HOST2 --user2 titi \
|
||||
--passfile2 ../../var/pass/secret.titi \
|
||||
--exclude '^(?i)INBOX.YOP' --justfolders --nofoldersizes
|
||||
}
|
||||
|
||||
ll_exclude_2()
|
||||
{
|
||||
|
@ -1249,6 +1258,57 @@ ll_regextrans2_archive_per_month()
|
|||
}
|
||||
|
||||
|
||||
|
||||
ll_regextrans2_ALLIN()
|
||||
{
|
||||
$CMD_PERL ./imapsync \
|
||||
--host1 $HOST1 --user1 tata \
|
||||
--passfile1 ../../var/pass/secret.tata \
|
||||
--host2 $HOST2 --user2 titi \
|
||||
--passfile2 ../../var/pass/secret.titi \
|
||||
--nofoldersizes \
|
||||
--regextrans2 's/.*/INBOX.ALLIN/' \
|
||||
--folderrec 'INBOX.yop' --delete2
|
||||
}
|
||||
|
||||
ll_regextrans2_ALLIN_usecache()
|
||||
{
|
||||
$CMD_PERL ./imapsync \
|
||||
--host1 $HOST1 --user1 tata \
|
||||
--passfile1 ../../var/pass/secret.tata \
|
||||
--host2 $HOST2 --user2 titi \
|
||||
--passfile2 ../../var/pass/secret.titi \
|
||||
--regextrans2 's/.*/INBOX.ALLIN/' \
|
||||
--folderrec 'INBOX.yop' --delete2 --usecache --nodelete2duplicates
|
||||
}
|
||||
|
||||
ll_regextrans2_ALLIN_fake()
|
||||
{
|
||||
$CMD_PERL ./imapsync \
|
||||
--host1 $HOST1 --user1 tata \
|
||||
--passfile1 ../../var/pass/secret.tata \
|
||||
--host2 $HOST2 --user2 titi \
|
||||
--passfile2 ../../var/pass/secret.titi \
|
||||
--regextrans2 's/.*/INBOX.ALLIN/' \
|
||||
--foldersizes \
|
||||
--folderrec 'INBOX.yop' --delete2
|
||||
}
|
||||
|
||||
|
||||
ll_regextrans2_ALLIN_useuid()
|
||||
{
|
||||
$CMD_PERL ./imapsync \
|
||||
--host1 $HOST1 --user1 tata \
|
||||
--passfile1 ../../var/pass/secret.tata \
|
||||
--host2 $HOST2 --user2 titi \
|
||||
--passfile2 ../../var/pass/secret.titi \
|
||||
--foldersizes \
|
||||
--regextrans2 's/.*/INBOX.ALLIN/' \
|
||||
--folderrec 'INBOX.yop' --delete2 --useuid
|
||||
}
|
||||
|
||||
|
||||
|
||||
ll_sep2()
|
||||
{
|
||||
$CMD_PERL ./imapsync \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue