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 2011-03-12 02:45:02 +00:00
parent 804a713af1
commit 3f8607bd96
32 changed files with 6408 additions and 1456 deletions

26
CONCEPTION Normal file
View File

@ -0,0 +1,26 @@
===== Synopsis =====
$mailbox_1 = Mail::imapsync::mailbox->new();
$mailbox_2 = Mail::imapsync::mailbox->new();
$mailbox_1->host('imap1.lala.org');
$mailbox_1->user('toto1');
...
$mailbox_2->host('imap2.lala.org');
$mailbox_2->user('toto2');
...
$transfer = Mail::imapsync::transfer->new();
$transfer->sync($mailbox_1, $mailbox_2);
- an object for mailbox
- an object for a transfer
- ?an object for a folder?
- ?an object for a message?

51
CREDITS
View File

@ -1,7 +1,8 @@
#!/bin/cat
# $Id: CREDITS,v 1.144 2010/09/06 01:08:41 gilles Exp gilles $
# $Id: CREDITS,v 1.150 2010/10/24 23:54:09 gilles Exp gilles $
If you want to make a donation to the author, Gilles LAMIRAL:
If you want to make a donation to the author, Gilles LAMIRAL,
use any of the following ways:
a) you can use the imapsync wishlist :
http://www.amazon.com/gp/registry/wishlist/1C9UNDIH3P7R7/
@ -14,12 +15,50 @@ b) If you can read french, please use the following wishlist :
c) its paypal account : gilles.lamiral@laposte.net
http://www.linux-france.org/prj/imapsync/paypal.html
Here are the persons who helped me to develop imapsync.
Feel free to tell me if a name is missing or if you want
to remove one.
d) If you prefer making your donation with
cash or cheque then my postal address is:
Gilles LAMIRAL
4 La Billais
35580 Baulon
FRANCE
Here are the persons who helped me to develop and maintain imapsync.
Feel free to tell me if a name is missing or if you want to remove one.
I thank very much all of these people.
Roger Schmid
Contributed by giving money 100 USD
Danny Schulz
Contributed by giving money 15 USD
Christian Kowarzik
Contributed by giving money 90 USD
for --deletefolder2 option.
Harald Petrovitsch
Contributed by giving the book
29.95 "Families and How to Survive Them"
Tobias Fink
Contributed by giving money 5 Eur
Yanick Cyr
Contributed by giving money 25 USD
Trony Tigno
Contributed by giving money 5 USD
Paul Garner
Contributed by giving money 5 USD
Kevin Kretz
Contributed by giving the books
15.25 "Tres Cubano: A Complete Guide To Playing The Cuban Tres Guitar (Book & CD)"
24.00 "Creative Clowning"
Kirk Ismay
Contributed by giving money 50 USD
@ -907,6 +946,8 @@ Eric Yung
Total amount of book prices :
c \
29.95
\
11.20+\
24.95+\
13.57+\

View File

@ -1,17 +1,90 @@
RCS file: RCS/imapsync,v
Working file: imapsync
head: 1.350
head: 1.366
branch:
locks: strict
gilles: 1.350
gilles: 1.366
access list:
symbolic names:
keyword substitution: kv
total revisions: 350; selected revisions: 350
total revisions: 366; selected revisions: 366
description:
----------------------------
revision 1.350 locked by: gilles;
revision 1.366 locked by: gilles;
date: 2010/10/25 17:15:52; author: gilles; state: Exp; lines: +11 -12
Permit host* to have change the case of headers.
----------------------------
revision 1.365
date: 2010/10/25 11:42:41; author: gilles; state: Exp; lines: +131 -157
Fix tls getline pb (read too early)
Changes place of starttls() myconnect() and other functions.
----------------------------
revision 1.364
date: 2010/10/25 09:56:27; author: gilles; state: Exp; lines: +10 -15
Fix STARTTLS capability detection bug.
----------------------------
revision 1.363
date: 2010/10/24 17:16:43; author: gilles; state: Exp; lines: +99 -48
Added --delete2folders option. Deletes folders in host2 that are not in host1.
----------------------------
revision 1.362
date: 2010/10/22 19:23:34; author: gilles; state: Exp; lines: +24 -8
Added imapsync basename to see how imapsync.exe is used.
----------------------------
revision 1.361
date: 2010/10/19 22:58:06; author: gilles; state: Exp; lines: +28 -8
Added --nomodules_version option to avoid Roger libeay32.dll missing problem.
Added test to ckeck if the release number from lfo VERSION file is a number.
----------------------------
revision 1.360
date: 2010/10/19 22:08:23; author: gilles; state: Exp; lines: +8 -7
Better documentation to subscribe to the imapsync list.
----------------------------
revision 1.359
date: 2010/10/08 01:17:29; author: gilles; state: Exp; lines: +15 -9
Fixed "Your vendor has not defined POSIX macro SIGALRM" bug on win32.
----------------------------
revision 1.358
date: 2010/10/08 00:40:42; author: gilles; state: Exp; lines: +97 -18
Add memory_consumption for win32.
----------------------------
revision 1.357
date: 2010/10/04 21:50:56; author: gilles; state: Exp; lines: +10 -10
Suppressed ref passage in foldersizes() sub.
----------------------------
revision 1.356
date: 2010/10/04 02:44:00; author: gilles; state: Exp; lines: +1270 -1251
Move all subroutines below main.
Changed "local $SIG{ALRM}" to "POSIX::sigaction(SIGALRM"
----------------------------
revision 1.355
date: 2010/09/21 01:50:34; author: gilles; state: Exp; lines: +39 -19
Added tests_max() max() functions.
Added memory consumption.
Added memory consumption ratio to biggest message transfered.
----------------------------
revision 1.354
date: 2010/09/16 00:25:20; author: gilles; state: Exp; lines: +27 -15
Added memory_consumption_ratio()
Added memory_consumption_of_pid()
Removed memory_consumption
----------------------------
revision 1.353
date: 2010/09/14 22:46:33; author: gilles; state: Exp; lines: +19 -9
Added --minsize option.
----------------------------
revision 1.352
date: 2010/09/14 21:53:55; author: gilles; state: Exp; lines: +48 -12
Added memory_consumption()
Added tests_memory_consumption()
Started to analyse memory consumption.
----------------------------
revision 1.351
date: 2010/09/06 16:28:17; author: gilles; state: Exp; lines: +9 -7
Fixed PERL_VERSION format in imapsync_version_lfo()
----------------------------
revision 1.350
date: 2010/09/06 01:05:09; author: gilles; state: Exp; lines: +33 -24
Added --noreleasecheck option.
Added User-agent information (OS, perl version, Mail::IMAPClient version)

23
FAQ
View File

@ -1,5 +1,5 @@
#!/bin/cat
# $Id: FAQ,v 1.73 2010/08/08 23:09:04 gilles Exp gilles $
# $Id: FAQ,v 1.75 2010/10/19 23:31:10 gilles Exp gilles $
+------------------+
| FAQ for imapsync |
@ -595,6 +595,14 @@ Examples:
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 "2005-InBox" based on the date (Like all emails received in the
@ -755,13 +763,16 @@ Q. Synchronising from Gmail to XXX
R. Gmail needs SSL
./imapsync \
--host1 imap.gmail.com --ssl1 \
--host1 imap.gmail.com \
--ssl1 \
--authmech1 LOGIN \
--user1 gilles.lamiral@gmail.com \
--passfile1 /var/tmp/secret.gilles_gmail \
--password1 gmailsecret \
--host2 localhost
--user2 tata@est.belle \
--passfile2 /var/tmp/secret.tata \
--useheader="X-Gmail-Received" --skipsize
--user2 tata \
--password2 tatasecret \
--useheader="X-Gmail-Received" \
--useheader 'Message-Id'
If your destination imap server doesn't like "[Gmail]" name, just add
option:

17
INSTALL
View File

@ -1,4 +1,4 @@
# $Id: INSTALL,v 1.17 2010/07/16 22:01:57 gilles Exp gilles $
# $Id: INSTALL,v 1.18 2010/10/25 09:32:49 gilles Exp gilles $
#
# INSTALL file for imapsync
# imapsync : IMAP sync or copy tool.
@ -84,9 +84,6 @@ Here is some individual module help:
- IO:Socket:SSL.pm
perl -mIO::Socket::SSL -e ''
- Date::Manip
perl -mDate::Manip -e ''
- File::Spec
perl -mFile::Spec -e ''
@ -98,7 +95,7 @@ Here is some individual module help:
Everything in one command:
perl -mMail::IMAPClient -mDigest::MD5 -mTerm::ReadKey -mIO::Socket::SSL -mDate::Manip -mFile::Spec -mDigest::HMAC_MD5 -e ''
perl -mMail::IMAPClient -mDigest::MD5 -mTerm::ReadKey -mIO::Socket::SSL -mFile::Spec -mDigest::HMAC_MD5 -e ''
INSTALLING
----------
@ -115,10 +112,14 @@ or copy the file imapsync where you want it to be.
WINDOWS
-------
a) Simplest way:
- Use imapsync.exe
b) Hard way:
- Install Perl if it isn't already installed.
ActivePerl from ActiveState is a good candidate if
you understand nothing at free/open software
and want to run imapsync with success.
Strawberry Perl is a good candidate
- Use PPM to install modules listed in the PREREQUISITES section.
PPM is Perl Package Manager.

View File

@ -1,5 +1,5 @@
# $Id: Makefile,v 1.37 2010/08/24 01:46:36 gilles Exp gilles $
# $Id: Makefile,v 1.42 2010/10/24 23:52:31 gilles Exp gilles $
.PHONY: help usage all
@ -15,6 +15,7 @@ usage:
@echo "make all "
@echo "make upload_index"
@echo "make imapsync.exe"
@echo "make upload_imapsync_exe"
DIST_NAME=imapsync-$(VERSION)
@ -137,6 +138,9 @@ upload_index: index.shtml
../../public_html/www.linux-france.org/html/prj/imapsync/
sh $(HOME)/memo/lfo-rsync
.dosify_bat: build_exe.bat test_exe.bat test.bat
unix2dos build_exe.bat test.bat test_exe.bat
touch .dosify_bat
@ -149,18 +153,39 @@ dosify_bat: .dosify_bat
imapsync_cidone: .imapsync_cidone
copy_win32:
scp imapsync Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
tests_win32: dosify_bat
scp imapsync test.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
ssh Admin@c 'perl C:/msys/1.0/home/Admin/imapsync/imapsync --tests_debug'
# ssh Admin@c 'perl C:/msys/1.0/home/Admin/imapsync/imapsync'
# ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/test.bat'
# ssh Admin@c 'tasklist /FI "PID eq 0"'
# ssh Admin@c 'tasklist /NH /FO CSV'
upload_imapsync_exe:
rsync -avH imapsync.exe \
../../public_html/www.linux-france.org/html/prj/imapsync/
#sh $(HOME)/memo/lfo-rsync
test_imapsync_exe: dosify_bat
scp test_exe.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
time ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/test_exe.bat'
imapsync.exe: imapsync imapsync_cidone dosify_bat
(date "+%s"| tr "\n" " "; echo -n "BEGIN " $(VERSION) ": "; date) >> .BUILD_EXE_TIME
scp imapsync build_exe.bat test_exe.bat \
Admin@c:'C:/msys/1.0/home/Admin/imapsync/'
time ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/build_exe.bat'
time ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/test_exe.bat'
scp Admin@c:'C:/msys/1.0/home/Admin/imapsync/imapsync.exe' .
ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/imapsync.exe --version' > VERSION_EXE
(date "+%s"| tr "\n" " "; echo -n "END " $(VERSION) ": "; date) >> .BUILD_EXE_TIME
zzz:
(date "+%s"| tr "\n" " "; echo -n "BEGIN " $(VERSION) ": "; date) >> .BUILD_EXE_TIME
(date "+%s"| tr "\n" " "; echo -n "END " $(VERSION) ": "; date) >> .BUILD_EXE_TIME
lfo: dist niouze_lfo upload_lfo
@ -173,10 +198,10 @@ upload_lfo:
sh ~/memo/lfo-rsync
niouze_lfo : VERSION
. memo && lfo_announce
. ./memo && lfo_announce
niouze_fm: VERSION
. memo && fm_announce
. ./memo && fm_announce
public: niouze_fm

19
README
View File

@ -3,7 +3,7 @@ NAME
Synchronise mailboxes between two imap servers. Good at IMAP migration.
More than 36 different IMAP server softwares supported with success.
$Revision: 1.350 $
$Revision: 1.366 $
SYNOPSIS
To synchronise imap account "foo" on "imap.truc.org" to imap account
@ -16,12 +16,13 @@ SYNOPSIS
INSTALL
imapsync works fine under any Unix OS with perl.
imapsync works fine under Windows (2000, XP) with ActiveState's 5.8 Perl
or as a standalone binary software.
imapsync works fine under Windows (2000, XP)
with Strawberry Perl 5.10 or 5.12
or as a standalone binary software imapsync.exe
imapsync is already available directly on the following distributions
(at least): FreeBSD, Debian, Ubuntu, Gentoo, NetBSD, Darwin, Mandriva
and OpenBSD (yeah!).
(at least): FreeBSD, Debian, Ubuntu, Gentoo, Fedora, NetBSD, Darwin,
Mandriva and OpenBSD (yeah!).
Get imapsync at
http://www.linux-france.org/prj/imapsync/
@ -70,6 +71,7 @@ USAGE
[--syncacls]
[--regexmess <regex>] [--regexmess <regex>]
[--maxsize <int>]
[--minsize <int>]
[--maxage <int>]
[--minage <int>]
[--skipheader <regex>]
@ -185,8 +187,9 @@ MAILING-LIST
To write on the mailing-list, the address is:
<imapsync@linux-france.org>
To subscribe, send a message to:
<imapsync-subscribe@listes.linux-france.org>
To subscribe, send any message (even empty) to:
<imapsync-subscribe@listes.linux-france.org> then just reply to the
confirmation message.
To unsubscribe, send a message to:
<imapsync-unsubscribe@listes.linux-france.org>
@ -401,5 +404,5 @@ SIMILAR SOFTWARES
Feedback (good or bad) will often be welcome.
$Id: imapsync,v 1.350 2010/09/06 01:05:09 gilles Exp gilles $
$Id: imapsync,v 1.366 2010/10/25 17:15:52 gilles Exp gilles $

17
TIME
View File

@ -1,3 +1,20 @@
90 Permit host* to change the case of headers. 1.366 release.
120 Fix tls capability. 1.365 release.
150 1.363 public release.
240 Added --delete2folders option.
150 Try to fix again win32 libeay32.dll issue. Upload 1.361 and .exe
270 Draw imapsync logo with inkscape. Had a crash after 2 hours of drawing and saved file was also buggy...
120 Bugfix win32. Email. Added and tested linkage with --link libeay32.dll --link ssleay32.dll
120 Bugfix about POSIX alarm on win32. imapsync 1.359 public release.
160 Added memory consumption for win32. imapsync 1.358
300 Local environment. Tests. Moved subroutines below main. Changed alarm call.
90 Memory consumption on Win32
50 Better memory consumption statistics
35 Added memory consumption to final stats.
240 Wrote a message_string_raw() function. Tests.
120 Thinking about performance. Email to italian compagny.
100 Tracking memory consumption. Wrote learn/memory_consumption. Sent bug report to bug-Mail-IMAPClient [at] rt.cpan.org.
180 Tracking memory consumption.
360 Date::Manip away. good_date() rewriting. release check on lfo
210 Better output when copying messages. Profiling memory.
80 Gmail efficiency. Wanted! on homepage, email on list.

26
TODO
View File

@ -1,5 +1,5 @@
#!/bin/cat
# $Id: TODO,v 1.85 2010/09/06 01:08:14 gilles Exp gilles $
# $Id: TODO,v 1.86 2010/10/08 00:43:09 gilles Exp gilles $
TODO file for imapsync
----------------------
@ -13,6 +13,8 @@ Start a wiki for imapsync.
Add a best practice migration tips document.
Write a Mail::imapsync package and use it.
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,19 +23,11 @@ Evaluate
http://www.rackspace.com/apps/email_hosting/migrations
http://www.yippiemove.com/
Evaluate memory consumption with (or better):
print qx{ ps o pid,pcpu,comm,vsz,rss,size $$ }, "\n"
Search memory leaks with
Test-Weaken Test-Memory-Cycle Devel-Cycle Devel-Leak Test-Weaken
sh -x tests.sh ll_bigmail
is a good candidate to stress memory.
Suggestion: it's very difficult to track down messages which are behaving
funny during the sync. It would be great - and presumably easy to code -
to have an option to have imapsync display e.g. the subject of an
e-mail when it gets synced, rather than just the message ID and the date/time.
Add --noauthmd51 --noauthmd52 to permit noauthmd5 by host
Add a well described problem for each problem detected
@ -109,13 +103,14 @@ Add a --skipheaderinfolder option
Fix this:
> - Erreur avec la traditionnelle différence entre Windows
> et LInux sur les retour-chariots : le calcul de la
> et Linux sur les retour-chariots : le calcul de la
> longueur du message ou des entêtes à envoyer au serveur
> cible n'est pas bon sur une machine Windows.
> Ci-dessous la modif :
>
> # No NL Count on Windows my $length = ( -s $file ) + $bare_nl_count;
> my $length = ( -s $file );
I wonder if it is Windows or the imap server used.
Add stdin/stdout filter before transfer:
@ -170,6 +165,17 @@ Explain expunge behavior.
===========================================================================
DONE. Evaluate memory consumption with (or better):
print qx{ ps o pid,pcpu,comm,vsz,rss,size $$ }, "\n"
Search memory leaks with
Test-Weaken Test-Memory-Cycle Devel-Cycle Devel-Leak Test-Weaken
sh -x tests.sh ll_bigmail
sh -x tests.sh ll_memory_consumption
are good candidate to stress memory.
No memory leak detected just up to 8 memory copies of the same data
in Mail::IMAPClient.
Wrote ./learn/memory_consumption to show that it is a Mail::IMAPClient issue.
DONE.Be more effiscient with large mailboxes
Write a Mail::IMAPClient::fetch_hash allowing selecting messages to fetch
4 hours estimated time coding. Time spent 4h30 (with public release and emails)

View File

@ -1 +1 @@
1.350
1.366

View File

@ -1 +1 @@
1.350
1.366

View File

@ -1,10 +1,10 @@
REM $Id: build_exe.bat,v 1.3 2010/09/06 02:16:24 gilles Exp gilles $
REM $Id: build_exe.bat,v 1.6 2010/10/24 23:51:48 gilles Exp gilles $
echo Building imapsync.exe
cd C:\msys\1.0\home\Admin\imapsync
perl -mMail::IMAPClient -mDigest::MD5 -mTerm::ReadKey -mIO::Socket::SSL -mFile::Spec -mDigest::HMAC_MD5 -e ''
pp -o imapsync.exe -M Term::ReadKey -M IO::Socket::SSL -M Digest::HMAC_MD5 imapsync
pp -o imapsync.exe -M Mail::IMAPClient -M IO::Socket -M IO::Socket::SSL -M Digest::MD5 -M Digest::HMAC_MD5 -M Term::ReadKey imapsync
echo Done building imapsync.exe

View File

@ -3,8 +3,8 @@
#RELEASE_FOCUS="Initial freshmeat announcement"
#RELEASE_FOCUS="Documentation"
#RELEASE_FOCUS="Code cleanup"
#RELEASE_FOCUS="Minor feature enhancements"
RELEASE_FOCUS="Major feature enhancements"
RELEASE_FOCUS="Minor feature enhancements"
#RELEASE_FOCUS="Major feature enhancements"
#RELEASE_FOCUS="Minor bugfixes"
#RELEASE_FOCUS="Major bugfixes"
#RELEASE_FOCUS="Minor security fixes"
@ -12,9 +12,4 @@ RELEASE_FOCUS="Major feature enhancements"
#TEXT_BODY="Syntax cleanup"
#TEXT_BODY="Updated documentation"
TEXT_BODY="
Since 1.350:
Bug fixes.
Many thanks to the freshmeat folk that correct my bad and poorly English!
"
TEXT_BODY="Since last public release 1.350: Added --minsize option to transfer messages bigger than a given size. Added memory consumption to know how much concurent imapsync can run in parallel on a system. Thanks to the freshmeat guy who corrects my bad and poorly English!"

View File

@ -1,31 +1,9 @@
{
"release": {
"tag_list": "Major feature enhancements",
"version": "1.350",
"tag_list": "stable, Minor feature enhancements",
"version": "1.359",
"hidden_from_frontpage": false,
"changelog": "
Since 1.286:
Added --noreleasecheck option.
Added new release checking.
Removed Date::Manip dependancy.
Better output when copying messages.
More effiscient with large mailboxes.
Clarity: print capability after authenticated state.
Duplicate messages on host2 are now deleted with --delete2
--skipsize turned on by default.
Usability fix: examples with --password1 instead of --passfile1
Added --debugimap1 --debugimap2 to permit imap outpout with only one host.
Added reconnect statistics.
Added reconnect behavior with Mail::IMAPClient 2.2.9
Added statistic about messages deleted.
Added statistic about average bandwith rate.
Flags are now exactly synced from host1 to host2
(Previous releases just added flags).
Added TLSv1 support.
Filter flags sync with the list given by PERMANENTFLAGS on --host2
and bug fixes.
Many thanks to the freshmeat folk that correct my bad and poorly English!
"
"changelog": "Since last public release 1.350: Added --minsize option to transfer messages bigger than a given size.Added memory consumption to know how much concurent imapsync can run in parallel on a system. Many thanks to the freshmeat folk that correct my bad and poorly English!"
}
}

2352
imapsync

File diff suppressed because it is too large Load Diff

View File

@ -5,7 +5,7 @@
<title>imapsync <!--#exec cmd="cat VERSION" --> </title>
<meta name="generator" content="Bluefish 1.0.7"/>
<meta name="author" content="Gilles LAMIRAL"/>
<meta name="date" content="2010-08-21T15:39:13+0200"/>
<meta name="date" content="2010-10-25T01:49:57+0200"/>
<meta name="copyright" content="None"/>
<meta name="keywords" content="imap, transfert, migration"/>
<meta name="description" content="imap migration tool"/>
@ -13,15 +13,37 @@
<meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8"/>
<meta http-equiv="content-style-type" content="text/css"/>
<meta http-equiv="expires" content="0"/>
<link rel="icon" type="image/png" href="logo_imapsync_s.png" />
<style type="text/css">
body {
color: black;
background-color: #ccdddd
}
div.center {
text-align: center;
}
</style>
</head>
<body>
<div class="center">
<img src="logo_imapsync.png" width="486" height="309" alt="imapsync logo"/>
</div>
<h1><a href="http://www.linux-france.org/prj/imapsync/">imapsync web site</a></h1>
<h2>What is imapsync?</h2>
<p><b>imapsync</b> software is a command line tool allowing incremental and
recursive <b>imap</b> transfers from one mailbox to another, both anywhere on the internet.
recursive <b>imap</b> transfers from one mailbox to another, both anywhere on the internet
or in your local network.
</p>
<p><b>imapsync</b> is useful for imap account <b>migration</b> or imap account <b>backup</b>.
@ -36,26 +58,37 @@ where the user plays independently on both sides. Use <b>offlineimap</b>
<h2><a id="AUTHOR"></a> AUTHOR</h2>
<p>Gilles LAMIRAL<br/>
Email: <b>lamiral@linux-france.org</b></p>
Email: <b>gilles.lamiral@laposte.net</b></p>
<p>Feedback good or bad is often welcome.</p>
<p>Good feedback is always welcome, bad feedback is often welcome.</p>
<p>A good place to talk about imapsync is the public
<p>A nice place to talk about imapsync is the public
imapsync mailing-list (see below).</p>
<p>Gilles LAMIRAL earns his living writing, installing, configuring and
teaching free, open and gratis softwares. <br/>
Do not hesitate to pay him for that services.</p>
<p>If you <b>use imapsync</b> as a <b>professionnal worker</b> you may
<b><a href="http://www.linux-france.org/prj/imapsync_list/msg00470.html">read this call</a></b>
for feedback.
for rewarding.
</p>
<p>Other ways to consider the situation:</p>
<ul>
<li>stop beeing a
<a href="http://en.wikipedia.org/wiki/Leech_%28computing%29">leech</a>.
</li>
<li>think about
<a href="http://en.wikipedia.org/wiki/Free_rider_problem">helping back</a>
a software developper and helper.
</li>
</ul>
<h2><a id="donation"></a> imapsync call for donation</h2>
<p>Are you happy with this <b>free</b>, <b>open</b> and <b>gratis</b> software?<br/></p>
<p>Then <b>you</b> can help the author to <b>maintain</b> imapsync and <b>support</b> happy (or unhappy) users: <b>YOU!</b></p>
<p>Then <b>you</b> can help me back to <b>maintain</b> imapsync
and <b>support you!</b> <br/>
I will personally thank each donation
with an email and add an entry in the imapsync <a href="CREDITS">CREDITS</a> file.</p>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<p>
@ -68,10 +101,25 @@ where the user plays independently on both sides. Use <b>offlineimap</b>
</form>
<p>
Or offer him a book on his
You can also offer me a book on my imapsync amazon
<a href="http://www.amazon.com/gp/registry/wishlist/1C9UNDIH3P7R7/"><b>wishlist</b></a><br/>
</p>
<b><i>Thanks in advance!</i></b></p>
<p>
If you prefer making your donation with cash or cheque then my postal address is:<br/>
<b>Gilles LAMIRAL<br/>
4 La Billais<br/>
35580 Baulon<br/>
FRANCE<br/></b>
</p>
<p>
My phone numbers are:<br/>
<b>+33 951 84 42 42</b> (home/work)<br/>
<b>+33 620 79 76 06</b> (mobile)<br/>
<b>+33 956 84 42 42</b> (fax)<br/>
</p>
<p><b><i>Thanks in advance!</i></b></p>
<h2><a id="latest"></a><a href="imapsync">Latest release
@ -85,13 +133,13 @@ Or offer him a book on his
<p><b>Standalone</b>
<a href="imapsync.exe"><b>imapsync <!--#exec cmd="cat VERSION_EXE" --> executable for win32</b></a>,
thanks to Strawberry Perl 5.12 and Par::Packed module.<br/>
(imapsync.exe built time is <!--#flastmod file="imapsync.exe" -->)</p>
thanks to Strawberry Perl 5.12 and Par::Packer module.<br/>
The imapsync.exe built time is <!--#flastmod file="imapsync.exe" -->.<br/>
The build system for imapsync.exe is XP Pro SP2 on a Intel Celeron 400 MHz 256 Mo RAM.
</p>
<h2><a href="INSTALL">imapsync installation</a></h2>
<h2><a href="README">README</a></h2>
<h2><a href="FAQ">Frequently Asked Questions</a></h2>
@ -100,7 +148,9 @@ thanks to Strawberry Perl 5.12 and Par::Packed module.<br/>
<h2><a id="MAILING-LIST"></a>MAILING-LIST</h2>
<p>
The public mailing-list may be the best way to get support.<br/>
The public mailing-list may be the best way to get free 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>
<p>
To <b>write</b> on the mailing-list, the address is:
@ -123,17 +173,24 @@ thanks to Strawberry Perl 5.12 and Par::Packed module.<br/>
</p>
<p>
The <b>list archives</b> may be available at
The <b>list archives</b> are available at
<a href="http://www.linux-france.org/prj/imapsync_list/">
http://linux-france.org/prj/imapsync_list/</a><br/>
So consider that the list is public, anyone can see your post.<br/>
<i>Use a pseudonym or do not post to
this list if you want to stay private</i>.<br/>
</p>
<form method="get" action="http://www.google.com/search">
<p> <b>Search</b> in the imapsync list <b>archives</b>:
<input type="text" name="q" value="migrate gmail exchange" size="30" />
<input type="hidden" name="as_sitesearch" value="www.linux-france.org/prj/imapsync_list/" />
(change the keywords with your own request and press <b>Enter</b>)
</p>
</form>
<p>
<b>Thank you for your participation!</b>
<b>Thank you for your participation to the imapsync mailing-list!</b>
</p>
@ -142,22 +199,24 @@ thanks to Strawberry Perl 5.12 and Par::Packed module.<br/>
<a href="TODO">WANTED</a></h2>
<p>I code new features for free when I have time and when I find it useful.<br/>
If you really want a feature you can donate money and I'll code it.<br/>
<p>I code new features and fix bugs for free when I have time and when I find it useful.<br/>
If you really want a feature or a fix you can donate money and my next development time
will be to code it or fix it.<br/>
</p>
<p>Some features and their time/money to be done evaluation</p>
<table cellpadding="10" cellspacing="0" border="1">
<tr align="right"><th>DONE</th><th>Feature </th><th>Time guessed</th><th>Time spent</th><th>Money received</th><th>Money needed</th></tr>
<tr align="right"><td> No</td><td>Efficient Gmail backup </td><td> 8 hours </td><td> 80 min </td><td> 0 $ </td><td>240 $ </td></tr>
<tr align="right"><td> No</td><td>Speedup 50% </td><td>10 hours </td><td> 80 min </td><td>10 $ </td><td>300 $ </td></tr>
<tr align="right"><td> No</td><td>Backup to files </td><td> 8 hours </td><td> 60 min </td><td> 0 $ </td><td>240 $ </td></tr>
<tr align="right"><td> No</td><td>--deletefolder2 </td><td> 3 hours </td><td> 30 min </td><td> 0 $ </td><td> 90 $ </td></tr>
<tr align="right"><td> No</td><td>NTLM auth </td><td> 3 hours </td><td> 60 min </td><td> 0 $ </td><td> 90 $ </td></tr>
<tr align="right"><td> Yes</td><td>Win32 imapsync.exe </td><td> 8 hours </td><td>520 min </td><td> 0 $ </td><td>240 $ </td></tr>
<tr align="right"><td> Yes</td><td>Fix capability changes </td><td> 1 hour </td><td> 80 min </td><td> 0 $ </td><td> 30 $ </td></tr>
<tr align="right"><td> Yes</td><td>Large mailbox --maxage </td><td> 4 hours </td><td>270 min </td><td> 0 $ </td><td>120 $ </td></tr>
<tr align="right"><td> No</td><td>Efficient Gmail backup </td><td> 8 hours </td><td> 80 min </td><td> 0 $ </td><td>240 $ </td></tr>
<tr align="right"><td> No</td><td>Speedup 50% </td><td>10 hours </td><td> 80 min </td><td> 10 $ </td><td>300 $ </td></tr>
<tr align="right"><td> No</td><td>Backup to files </td><td> 8 hours </td><td> 60 min </td><td> 0 $ </td><td>240 $ </td></tr>
<tr align="right"><td><b>Yes</b></td><td>--delete2folders </td><td> 3 hours </td><td>270 min </td><td> 90 $ </td><td> 0 $ </td></tr>
<tr align="right"><td> No</td><td>NTLM auth </td><td> 3 hours </td><td> 60 min </td><td> 0 $ </td><td> 90 $ </td></tr>
<tr align="right"><td> Yes</td><td>Win32 imapsync.exe </td><td> 8 hours </td><td>520 min </td><td> 0 $ </td><td>240 $ </td></tr>
<tr align="right"><td> Yes</td><td>Win32 bug fixes </td><td> various </td><td>370 min </td><td>100 $ </td><td> 85 $ </td></tr>
<tr align="right"><td> Yes</td><td>Fix capability changes </td><td> 1 hour </td><td> 80 min </td><td> 0 $ </td><td> 30 $ </td></tr>
<tr align="right"><td> Yes</td><td>Large mailbox --maxage </td><td> 4 hours </td><td>270 min </td><td> 0 $ </td><td>120 $ </td></tr>
</table>
<h2><a href="COPYING">COPYING</a></h2>
@ -175,8 +234,8 @@ If you really want a feature you can donate money and I'll code it.<br/>
<!--#config timefmt="%D" -->
<!--#config timefmt="%A %B %d, %Y" -->
This document last modified <!--#echo var="LAST_MODIFIED" --> <br/>
$Id: index.shtml,v 1.22 2010/08/21 13:39:35 gilles Exp gilles $
$Id: index.shtml,v 1.31 2010/10/25 00:05:35 gilles Exp gilles $
</p>
</body>
</html>
</html>

View File

@ -13,7 +13,7 @@ my $imap = Mail::IMAPClient->new();
$imap->Debug(1);
$imap->Server($host);
$imap->connect() or die;
$imap->isUnconnected();
$imap->IsUnconnected();
$imap->User($user);
$imap->Password($password);
$imap->login() or die;

0
learn/io_socket_get Normal file → Executable file
View File

57
learn/memory_consumption Executable file
View File

@ -0,0 +1,57 @@
#!/usr/bin/perl
use warnings;
use strict;
use English;
use Mail::IMAPClient;
$ARGV[3] or die "usage: $0 host user password folder\n";
my $host = $ARGV[0];
my $user = $ARGV[1];
my $password = $ARGV[2];
my $folder = $ARGV[3];
my $imap = Mail::IMAPClient->new();
$imap->Debug(0);
$imap->Server($host);
$imap->connect() or die;
$imap->User($user);
$imap->Password($password);
$imap->login() or die;
$imap->Uid(1);
$imap->Peek(1);
$imap->Clear(1);
#print map {"$_\n"} $imap->folders();
$imap->select($folder) or die;
my @msgs = $imap->messages or die "Could not messages: $@\n";
print "@msgs\n";
print memory_consumption();
foreach my $msg (@msgs) {
my $size = $imap->size($msg);
print "message size of $msg = $size bytes\n";
my $string = $imap->message_string($msg);
print memory_consumption();
$imap->append('INBOX.Trash', $string);
print memory_consumption();
}
$imap->close();
print memory_consumption();
sub memory_consumption {
my @PID = (@_) ? @_ : ($PROCESS_ID);
my $val;
my ($package, $filename, $line, $subroutine) = caller(0);
$val = "$package $filename line $line: ";
my @ps = qx{ ps o vsz @PID };
my $vsz = $ps[1];
chomp($vsz);
$val .= $vsz * 1024 . " bytes\n";
#$val .= '-' x 80 . "\n";
return($val);
}

110
learn/message_string_raw Executable file
View File

@ -0,0 +1,110 @@
#!/usr/bin/perl
use warnings;
use strict;
use English;
use Mail::IMAPClient;
use Socket;
$ARGV[3] or die "usage: $0 host user password folder\n";
my $host = $ARGV[0];
my $user = $ARGV[1];
my $password = $ARGV[2];
my $folder = $ARGV[3];
my $imap = Mail::IMAPClient->new();
$imap->Debug(0);
$imap->Server($host);
$imap->connect() or die;
$imap->User($user);
$imap->Password($password);
$imap->login() or die;
$imap->Uid(1);
$imap->Peek(1);
$imap->Clear(1);
#print map {"$_\n"} $imap->folders();
$imap->select($folder) or die;
my @msgs = $imap->messages or die "Could not messages: $@\n";
print "@msgs\n";
print memory_consumption_ratio(), "\n";
my $size_max = 0;
foreach my $msg (@msgs) {
my $size = $imap->size($msg);
$size_max = ($size_max > $size) ? $size_max : $size;
print "message size of $msg = $size bytes\n";
my $string_raw = $imap->message_string_raw($msg);
print "ms raw: ", memory_consumption_ratio($size_max), "\n";
my $string = $imap->message_string($msg);
print "ms nor: ", memory_consumption_ratio($size_max), "\n";
print "NOT EQUAL\n" if ($string_raw ne $string);
#print substr($string_raw, 0, 80), "]\n";
#print substr($string_raw, -80, 80), "]\n";
$imap->append('INBOX.Trash', $string_raw);
$imap->append('INBOX.Trash', $string);
}
$imap->close();
print "ap nor: ", memory_consumption_ratio($size_max), "\n";
sub memory_consumption_of_pid {
my @PID = (@_) ? @_ : ($PROCESS_ID);
my $val;
my @ps = qx{ ps o vsz @PID };
shift @ps;
chomp @ps;
my @val = map { $_ * 1024 } @ps;
return(@val);
}
sub memory_consumption_ratio {
my ($base) = @_;
$base ||= 1;
my ($consu) = memory_consumption_of_pid();
return($consu / $base);
}
package Mail::IMAPClient;
sub message_string_raw {
my $self = shift;
my ($msg) = @_;
my $sock = $self->{Socket};
print "Socket:[$sock]\n";
my $count = $self->Count($self->Count+1);
print $sock "$count UID FETCH 1 BODY.PEEK[]\r\n";
my $buf;
my $line;
CORE::select( undef, undef, undef, 0.025 );
my $expected_size;
local $/ = "\r\n";
$line = <$sock>;
print $line;
if ( $line =~ m/.*{(\d+)\}\r\n/o ) {
$expected_size = $1;
print "\nEXPECT $expected_size\n";
}
#local $/;
while ($buf .= <$sock> and (length $buf <= $expected_size)){
#print length $buf, "\n";
#CORE::select( undef, undef, undef, 0.025 );
}
$line = <$sock>;
print $line;
if ( $line =~ m/$count OK FETCH.*\r\n/o ) {
return(substr($buf, 0, $expected_size))
}else{
return(undef);
}
}

209
learn/message_string_raw_pb Executable file
View File

@ -0,0 +1,209 @@
#!/usr/bin/perl
use warnings;
use strict;
use English;
use Mail::IMAPClient;
use Socket;
$ARGV[3] or die "usage: $0 host user password folder\n";
my $host = $ARGV[0];
my $user = $ARGV[1];
my $password = $ARGV[2];
my $folder = $ARGV[3];
my $imap = Mail::IMAPClient->new();
$imap->Debug(0);
$imap->Server($host);
$imap->connect() or die;
$imap->User($user);
$imap->Password($password);
$imap->login() or die;
$imap->Uid(1);
$imap->Peek(1);
$imap->Clear(1);
#print map {"$_\n"} $imap->folders();
$imap->select($folder) or die;
my @msgs = $imap->messages or die "Could not messages: $@\n";
print "@msgs\n";
print memory_consumption_ratio(), "\n";
my $size_max = 0;
foreach my $msg (@msgs) {
my $size = $imap->size($msg);
$size_max = ($size_max > $size) ? $size_max : $size;
print "message size of $msg = $size bytes\n";
my $string_raw = $imap->message_string_raw($msg);
print "ms raw: ", memory_consumption_ratio($size_max), "\n";
#$imap->append_string('INBOX.Trash', $string_raw);
my $uid_raw = $imap->append_string_raw('INBOX.Trash', $string_raw);
print "ap raw $uid_raw: ", memory_consumption_ratio($size_max), "\n";
my $string = $imap->message_string($msg);
print "ms nor: ", memory_consumption_ratio($size_max), "\n";
print "NOT EQUAL\n" if ($string_raw ne $string);
#print substr($string_raw, 0, 80), "]\n";
#print substr($string_raw, -80, 80), "]\n";
my $uid_nor = $imap->append_string('INBOX.Trash', $string_raw);
print "ap nor $uid_nor: ", memory_consumption_ratio($size_max), "\n";
$imap->select('INBOX.Trash') or die;
$string_raw = $imap->message_string_raw($uid_raw);
print "msraw $uid_raw D:", substr($string_raw, 0, 80), "]\n";
print "msraw $uid_raw F:", substr($string_raw, -80, 80), "]\n";
$string = $imap->message_string_raw($uid_nor);
print "msraw $uid_nor D:", substr($string, 0, 80), "]\n";
print "msraw $uid_nor F:", substr($string, -80, 80), "]\n";
print "NOT EQUAL app\n" if ($string_raw ne $string);
print "eq: ", memory_consumption_ratio($size_max), "\n";
}
$imap->close();
sub memory_consumption_of_pid {
my @PID = (@_) ? @_ : ($PROCESS_ID);
my $val;
my @ps = qx{ ps o vsz @PID };
shift @ps;
chomp @ps;
my @val = map { $_ * 1024 } @ps;
return(@val);
}
sub memory_consumption_ratio {
my ($base) = @_;
$base ||= 1;
my ($consu) = memory_consumption_of_pid();
return($consu / $base);
}
package Mail::IMAPClient;
use Errno qw(EAGAIN EPIPE ECONNRESET);
sub message_string_raw {
my $self = shift;
my ($msg) = @_;
my $sock = $self->{Socket};
my $io_sel= IO::Select->new($sock);
my $count = $self->Count($self->Count+1);
print "$count UID FETCH $msg BODY.PEEK[]\r\n";
print $sock "$count UID FETCH $msg BODY.PEEK[]\r\n";
my $buf;
my $line;
CORE::select( undef, undef, undef, 0.025 );
my $expected_size;
local $/ = "\r\n";
$line = <$sock>;
print "msr <> [$line]";
if ( $line =~ m/.*{(\d+)\}\r\n/o ) {
$expected_size = $1;
print "\nEXPECT $expected_size\n";
}
#local $/;
while ($buf .= <$sock> and (length $buf <= $expected_size)){
}
CORE::select( undef, undef, undef, 0.025 );
$line = <$sock>;
print "[$line][$count OK FETCH]\n";
if ( $line =~ m/$count OK FETCH/o ) {
print "GOOD\n";
return(substr($buf, 0, $expected_size))
}else{
print "BAD\n";
return(undef);
}
}
sub append_string_raw {
my $self = shift;
my $folder = $self->Massage(shift);
my ( $text, $flags, $date ) = @_;
defined $text or $text = '';
my $sock = $self->{Socket};
my $io_sel = IO::Select->new($sock);
my($count, $line);
if ( defined $flags ) {
$flags =~ s/^\s+//g;
$flags =~ s/\s+$//g;
$flags = "($flags)" if $flags !~ /^\(.*\)$/;
}
if ( defined $date ) {
$date =~ s/^\s+//g;
$date =~ s/\s+$//g;
$date = qq("$date") if $date !~ /^"/;
}
#$text =~ s/\r?\n/\r\n/og;
my $command =
"APPEND $folder "
. ( $flags ? "$flags " : "" )
. ( $date ? "$date " : "" ) . "{"
. length($text)
. "}\r\n";
local $/ = "\r\n";
#print $command;
$count = $self->Count($self->Count+1);
my $string = "$count ". $command . $text . "\r\n";
$io_sel->can_write();
$self->_send_bytes_2(\$string);
$io_sel->can_read();
$line = <$sock>;
#print "APP 1 [$line]\n";
$io_sel->can_read();
$line = <$sock>;
print "APP 2 [$line]\n";
my $ret;
# <tag> OK [APPENDUID <size> <uid>] APPEND completed
if ($line =~ m{^$count\s+OK\s+\[APPENDUID\s+\d+\s+(\d+)\]}) {
$ret = $1;
}else{
$ret = undef;
}
return($ret);
}
sub _send_bytes_2 {
my ( $self, $byteref ) = @_;
my ( $total ) = ( 0 );
local $SIG{PIPE} = 'IGNORE'; # handle SIGPIPE as normal error
while ( $total < length $$byteref ) {
my $written =
syswrite( $self->Socket, $$byteref, length($$byteref) - $total,
$total );
if ( defined $written ) {
$total += $written;
next;
}
next if ( $! == EAGAIN ) ;
return undef; # no luck
}
$self->_debug("Sent $total bytes");
return $total;
}

4
learn/mi2 Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
perl -I../Mail-IMAPClient-2.2.9 "$@"

4
learn/mi3 Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
perl -I../Mail-IMAPClient-3.25/lib "$@"

BIN
logo_imapsync.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

149
logo_imapsync_2.svg Normal file
View File

@ -0,0 +1,149 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="210mm"
height="297mm"
id="svg2"
sodipodi:version="0.32"
inkscape:version="0.46"
sodipodi:docname="logo_imapsync_2.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape">
<defs
id="defs4">
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 526.18109 : 1"
inkscape:vp_y="6.1230318e-14 : 1000 : 0"
inkscape:vp_z="740.22719 : 526.39646 : 1"
inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
id="perspective10" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1.4"
inkscape:cx="375"
inkscape:cy="651.75749"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1420"
inkscape:window-height="851"
inkscape:window-x="396"
inkscape:window-y="103" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Calque 1"
inkscape:groupmode="layer"
id="layer1">
<g
sodipodi:type="inkscape:box3d"
style="fill:#000080;stroke:#000000;stroke-width:2.5999999;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="g2383"
inkscape:perspectiveID="#perspective10"
inkscape:corner0="2.736105 : 0.56278247 : 0 : 1"
inkscape:corner7="0.42090469 : 0.35662757 : 0.42521183 : 1">
<path
sodipodi:type="inkscape:box3dside"
id="path2395"
style="fill:#e9e9ff;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1"
inkscape:box3dsidetype="11"
d="M 165.04405,433.06625 L 372.02451,316.29166 L 372.02451,427.96116 L 165.04405,482.60704 L 165.04405,433.06625 z" />
<path
sodipodi:type="inkscape:box3dside"
id="path2385"
style="fill:#353564;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1"
inkscape:box3dsidetype="6"
d="M 99.58158,422.49322 L 99.58158,477.67232 L 165.04405,482.60704 L 165.04405,433.06625 L 99.58158,422.49322 z" />
<path
sodipodi:type="inkscape:box3dside"
id="path2387"
style="fill:#4d4d9f;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1"
inkscape:box3dsidetype="5"
d="M 99.58158,422.49322 L 261.83828,253.5458 L 372.02451,316.29166 L 165.04405,433.06625 L 99.58158,422.49322 z" />
<path
sodipodi:type="inkscape:box3dside"
id="path2393"
style="fill:#afafde;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1"
inkscape:box3dsidetype="13"
d="M 99.58158,477.67232 L 261.83828,398.63287 L 372.02451,427.96116 L 165.04405,482.60704 L 99.58158,477.67232 z" />
<path
sodipodi:type="inkscape:box3dside"
id="path2391"
style="fill:#d7d7ff;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1"
inkscape:box3dsidetype="14"
d="M 261.83828,253.5458 L 261.83828,398.63287 L 372.02451,427.96116 L 372.02451,316.29166 L 261.83828,253.5458 z" />
<path
sodipodi:type="inkscape:box3dside"
id="path2389"
style="fill:#8686bf;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1"
inkscape:box3dsidetype="3"
d="M 99.58158,422.49322 L 261.83828,253.5458 L 261.83828,398.63287 L 99.58158,477.67232 L 99.58158,422.49322 z" />
</g>
<g
sodipodi:type="inkscape:box3d"
style="fill:#000080;stroke:#000000;stroke-width:2.5999999;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="g2397"
inkscape:perspectiveID="#perspective10"
inkscape:corner0="-0.13561373 : 0.35358015 : 0 : 1"
inkscape:corner7="-0.32046499 : 0.25593579 : 1.63751 : 1">
<path
sodipodi:type="inkscape:box3dside"
id="path2409"
style="fill:#e9e9ff;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1"
inkscape:box3dsidetype="11"
d="M 633.19039,454.81957 L 683.70561,449.12643 L 683.70561,491.26819 L 633.19039,493.84771 L 633.19039,454.81957 z" />
<path
sodipodi:type="inkscape:box3dside"
id="path2399"
style="fill:#353564;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1"
inkscape:box3dsidetype="6"
d="M 430.4178,320.03894 L 430.4178,433.00274 L 633.19039,493.84771 L 633.19039,454.81957 L 430.4178,320.03894 z" />
<path
sodipodi:type="inkscape:box3dside"
id="path2401"
style="fill:#4d4d9f;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1"
inkscape:box3dsidetype="5"
d="M 430.4178,320.03894 L 547.50268,263.96289 L 683.70561,449.12643 L 633.19039,454.81957 L 430.4178,320.03894 z" />
<path
sodipodi:type="inkscape:box3dside"
id="path2407"
style="fill:#afafde;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1"
inkscape:box3dsidetype="13"
d="M 430.4178,433.00274 L 547.50268,407.65579 L 683.70561,491.26819 L 633.19039,493.84771 L 430.4178,433.00274 z" />
<path
sodipodi:type="inkscape:box3dside"
id="path2405"
style="fill:#d7d7ff;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1"
inkscape:box3dsidetype="14"
d="M 547.50268,263.96289 L 547.50268,407.65579 L 683.70561,491.26819 L 683.70561,449.12643 L 547.50268,263.96289 z" />
<path
sodipodi:type="inkscape:box3dside"
id="path2403"
style="fill:#8686bf;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1"
inkscape:box3dsidetype="3"
d="M 430.4178,320.03894 L 547.50268,263.96289 L 547.50268,407.65579 L 430.4178,433.00274 L 430.4178,320.03894 z" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 7.0 KiB

BIN
logo_imapsync_s.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

19
memo
View File

@ -1,5 +1,6 @@
#!/bin/sh
# $Id: memo,v 1.23 2010/10/24 23:49:28 gilles Exp gilles $
software_version() {
@ -7,6 +8,24 @@ software_version() {
}
statistics_lfo() {
#grep prj/imapsync/VERSION /usr/local/apache/logs/access_log | sort -n | cut -d ' ' -f 1,12,13|uniq -c | sort -n # list ip
cat <<EOFF
grep -h prj/imapsync/VERSION /usr/local/apache/logs/access_log*|sort -n|cut -d ' ' -f 1,12,13|uniq -c|sort -n # list ip
grep -h prj/imapsync/VERSION /usr/local/apache/logs/access_log*|grep MSWin32|cut -d ' ' -f 1,12,13|sort -n|uniq -c| sort -n # Win32
grep -h prj/imapsync/VERSION /usr/local/apache/logs/access_log*|grep -v MSWin32|cut -d ' ' -f 1,12,13|sort -n|uniq -c| sort -n # No Win32
grep -h prj/imapsync/VERSION /usr/local/apache/logs/access_log*|cut -d ' ' -f 13|sort -n|uniq -c| sort -n # OS usage
grep -h prj/imapsync/VERSION /usr/local/apache/logs/access_log*|cut -d ' ' -f 12|sort -n|uniq -c| sort -n # imapsync release
tail -f /usr/local/apache/logs/access_log|cat -n|grep prj/imapsync/VERSION|cat -n |grep VERSION # lfo frequency'
EOFF
}
niouzes_compil() {
DIR_SAVE=`pwd`
cd /home/gilles/public_html/www.linux-france.org/html/

4079
patches/imapsync_minsize Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,17 +1,10 @@
REM $Id: test.bat,v 1.6 2010/08/15 11:10:49 gilles Exp gilles $
REM $Id: test.bat,v 1.7 2010/10/08 01:43:35 gilles Exp gilles $
cd C:\msys\1.0\home\Admin\imapsync
perl -mMail::IMAPClient -mDigest::MD5 -mTerm::ReadKey -mIO::Socket::SSL -mDate::Manip -mFile::Spec -mDigest::HMAC_MD5 -e ''
set TZ="GMT"
REM perl ./imapsync --host1 l --user1 toto --passfile1 secret.toto --host2 l --user2 titi --passfile2 secret.titi --noauthmd5 --delete2 --expunge2
REM perl ./imapsync --host1 l --user1 tata --passfile1 secret.tata --host2 l --user2 titi --passfile2 secret.titi --noauthmd5 --delete2 --expunge2 --folder INBOX
perl ./imapsync
perl ./imapsync --host1 l --user1 toto --passfile1 secret.toto --host2 l --user2 titi --passfile2 secret.titi --noauthmd5 --delete2 --expunge2
perl ./imapsync --host1 l --user1 tata --passfile1 secret.tata --host2 l --user2 titi --passfile2 secret.titi --noauthmd5 --delete2 --expunge2 --folder INBOX
REM -M Date::Manip 6.xx buggy?
pp -o imapsync.exe -M Term::ReadKey -M IO::Socket::SSL -M Digest::HMAC_MD5 imapsync
echo Checking imapsync.exe
.\imapsync.exe --host1 l --user1 toto --passfile1 secret.toto --host2 l --user2 titi --passfile2 secret.titi --noauthmd5 --delete2 --expunge2
.\imapsync.exe --host1 l --user1 tata --passfile1 secret.tata --host2 l --user2 titi --passfile2 secret.titi --noauthmd5 --delete2 --expunge2 --folder INBOX
echo Done Checking imapsync.exe

View File

@ -3,6 +3,7 @@
cd C:\msys\1.0\home\Admin\imapsync
perl -mMail::IMAPClient -mDigest::MD5 -mTerm::ReadKey -mIO::Socket::SSL -mFile::Spec -mDigest::HMAC_MD5 -e ''
.\imapsync.exe --host1 l --user1 toto --passfile1 secret.toto --host2 l --user2 titi --passfile2 secret.titi --noauthmd5 --delete2 --expunge2
.\imapsync.exe --host1 l --user1 tata --passfile1 secret.tata --host2 l --user2 titi --passfile2 secret.titi --noauthmd5 --delete2 --expunge2 --folder INBOX
.\imapsync.exe
.\imapsync.exe --host1 p --user1 toto --passfile1 secret.toto --host2 p --user2 titi --passfile2 secret.titi --noauthmd5 --delete2 --expunge2
.\imapsync.exe --host1 p --user1 tata --passfile1 secret.tata --host2 p --user2 titi --passfile2 secret.titi --noauthmd5 --delete2 --expunge2 --folder INBOX

2
test_exe_2.bat Normal file
View File

@ -0,0 +1,2 @@
imapsync \ --host1 p --user1 toto --passfile1 secret.toto \ --host2 p --user2 titi --passfile2 secret.titi
imapsync \ --host1 p --user1 tata --passfile1 secret.tata \ --host2 p --user2 titi --passfile2 secret.titi

394
tests.sh
View File

@ -1,6 +1,6 @@
#!/bin/sh
# $Id: tests.sh,v 1.116 2010/09/06 01:06:52 gilles Exp gilles $
# $Id: tests.sh,v 1.127 2010/10/25 17:59:09 gilles Exp gilles $
# Example 1:
# CMD_PERL='perl -I./Mail-IMAPClient-3.25/lib' sh -x tests.sh
@ -8,8 +8,11 @@
# Example 2:
# To select which Mail-IMAPClient within arguments:
# sh -x tests.sh 2 locallocal 3 locallocal
# run locallocal() with Mail-IMAPClient-2.2.9 then
# This runs locallocal() with Mail-IMAPClient-2.2.9 then
# again with Mail-IMAPClient-3.xx
# 2 means "use Mail-IMAPClient-2.2.9"
# 3 means "use Mail-IMAPClient-3.xx"
HOST1=${HOST1:-'localhost'}
echo HOST1=$HOST1
@ -86,10 +89,14 @@ no_args() {
# mailbox tata titi on most ll_*() tests
# mailbox tete@est.belle # used on big size tests
# big_transfert()
# big_transfert_sizes_only()
# dprof()
# mailbox tete@est.belle used on big size tests:
# big_transfert()
# big_transfert_sizes_only()
# dprof()
# mailbox big1 big2 used on bigmail tests
# ll_bigmail()
# ll_memory_consumption
sendtestmessage() {
email=${1:-"tata"}
@ -122,6 +129,10 @@ option_tests() {
$CMD_PERL ./imapsync --tests
}
option_tests_debug() {
$CMD_PERL ./imapsync --tests_debug
}
option_bad_delete2() {
! $CMD_PERL ./imapsync --delete 2 --blabla
}
@ -145,8 +156,7 @@ first_sync() {
--passfile1 ../../var/pass/secret.toto \
--host2 $HOST2 --user2 titi \
--passfile2 ../../var/pass/secret.titi \
--noauthmd5 \
--allow3xx
--noauthmd5
}
@ -162,11 +172,10 @@ locallocal() {
--host1 $HOST1 --user1 tata \
--passfile1 ../../var/pass/secret.tata \
--host2 $HOST2 --user2 titi \
--passfile2 ../../var/pass/secret.titi \
--allow3xx
--passfile2 ../../var/pass/secret.titi
}
ll_pidfile() {
pidfile() {
$CMD_PERL ./imapsync \
--justbanner \
@ -174,6 +183,17 @@ ll_pidfile() {
! test -f /var/tmp/imapsync.pid
}
justbanner() {
$CMD_PERL ./imapsync \
--justbanner
}
nomodules_version() {
$CMD_PERL ./imapsync \
--justbanner \
--nomodules_version
}
ll_ask_password() {
@ -204,8 +224,7 @@ ll_timeout_ssl() {
--passfile1 ../../var/pass/secret.tata \
--host2 $HOST2 --user2 titi \
--passfile2 ../../var/pass/secret.titi \
--folder INBOX --timeout 5 --ssl1 --ssl2 \
--allow3xx
--folder INBOX --timeout 5 --ssl1 --ssl2
}
@ -217,8 +236,7 @@ ll_folder() {
--passfile1 ../../var/pass/secret.tata \
--host2 $HOST2 --user2 titi \
--passfile2 ../../var/pass/secret.titi \
--folder INBOX.yop --folder INBOX.Trash \
--allow3xx
--folder INBOX.yop --folder INBOX.Trash
}
ll_oneemail() {
@ -246,8 +264,7 @@ ll_folderrec() {
--passfile1 ../../var/pass/secret.tata \
--host2 $HOST2 --user2 titi \
--passfile2 ../../var/pass/secret.titi \
--folderrec INBOX.yop \
--allow3xx
--folderrec INBOX.yop
}
@ -258,8 +275,7 @@ ll_buffersize() {
--passfile1 ../../var/pass/secret.tata \
--host2 $HOST2 --user2 titi \
--passfile2 ../../var/pass/secret.titi \
--buffersize 8 \
--allow3xx
--buffersize 8
}
@ -269,19 +285,31 @@ ll_justfolders() {
--passfile1 ../../var/pass/secret.tata \
--host2 $HOST2 --user2 titi \
--passfile2 ../../var/pass/secret.titi \
--justfolders \
--allow3xx
--justfolders --nofoldersizes
echo "rm -rf /home/vmail/titi/.new_folder/"
}
ll_delete2folders() {
$CMD_PERL ./imapsync \
--host1 $HOST1 --user1 tata \
--passfile1 ../../var/pass/secret.tata \
--host2 $HOST2 --user2 titi \
--passfile2 ../../var/pass/secret.titi \
--justfolders --nofoldersizes \
--delete2folders
}
ll_bug_folder_name_with_blank() {
$CMD_PERL ./imapsync \
--host1 $HOST1 --user1 tata \
--passfile1 ../../var/pass/secret.tata \
--host2 $HOST2 --user2 titi \
--passfile2 ../../var/pass/secret.titi \
--justfolders \
--allow3xx
--justfolders
echo "rm -rf /home/vmail/titi/.bugs/"
}
@ -294,8 +322,7 @@ ll_prefix12() {
--passfile2 ../../var/pass/secret.titi \
--folder INBOX.qqq \
--prefix1 INBOX.\
--prefix2 INBOX. \
--allow3xx
--prefix2 INBOX.
}
@ -342,8 +369,7 @@ ll_idatefromheader() {
--host2 $HOST2 --user2 titi \
--passfile2 ../../var/pass/secret.titi \
--folder INBOX.oneemail \
--idatefromheader --debug --dry \
--allow3xx
--idatefromheader --debug --dry
}
@ -354,8 +380,7 @@ ll_folder_rev() {
--passfile1 ../../var/pass/secret.titi \
--host2 $HOST2 --user2 tata \
--passfile2 ../../var/pass/secret.tata \
--folder INBOX.yop \
--allow3xx
--folder INBOX.yop
}
ll_subscribed()
@ -365,8 +390,7 @@ ll_subscribed()
--passfile1 ../../var/pass/secret.tata \
--host2 $HOST2 --user2 titi \
--passfile2 ../../var/pass/secret.titi \
--subscribed \
--allow3xx
--subscribed
}
@ -377,8 +401,7 @@ ll_subscribe()
--passfile1 ../../var/pass/secret.tata \
--host2 $HOST2 --user2 titi \
--passfile2 ../../var/pass/secret.titi \
--subscribed --subscribe \
--allow3xx
--subscribed --subscribe
}
ll_justconnect()
@ -386,8 +409,7 @@ ll_justconnect()
$CMD_PERL ./imapsync \
--host2 $HOST2 \
--host1 $HOST1 \
--justconnect \
--allow3xx
--justconnect
}
ll_justfoldersizes()
@ -432,8 +454,7 @@ ll_authmd5()
--passfile1 ../../var/pass/secret.tata \
--host2 $HOST2 --user2 titi \
--passfile2 ../../var/pass/secret.titi \
--justlogin --authmd5 \
--allow3xx
--justlogin --authmd5
}
ll_noauthmd5()
@ -443,11 +464,12 @@ ll_noauthmd5()
--passfile1 ../../var/pass/secret.tata \
--host2 $HOST2 --user2 titi \
--passfile2 ../../var/pass/secret.titi \
--justfoldersizes --noauthmd5 \
--allow3xx
--justlogin --noauthmd5
}
ll_maxage()
{
can_send && sendtestmessage
@ -499,8 +521,7 @@ ll_maxsize()
--passfile1 ../../var/pass/secret.tata \
--host2 $HOST2 --user2 titi \
--passfile2 ../../var/pass/secret.titi \
--maxsize 10 \
--allow3xx
--maxsize 10
}
ll_skipsize()
@ -517,8 +538,7 @@ ll_skipsize()
--passfile1 ../../var/pass/secret.tata \
--host2 $HOST2 --user2 titi \
--passfile2 ../../var/pass/secret.titi \
--skipsize --folder INBOX.yop.yap \
--allow3xx
--skipsize --folder INBOX.yop.yap
}
ll_skipheader()
@ -535,7 +555,7 @@ ll_skipheader()
--host2 $HOST2 --user2 titi \
--passfile2 ../../var/pass/secret.titi \
--skipheader '^X-.*|^Date' --folder INBOX.yop.yap \
--allow3xx --debug
--debug
}
@ -553,8 +573,7 @@ ll_include()
--passfile1 ../../var/pass/secret.tata \
--host2 $HOST2 --user2 titi \
--passfile2 ../../var/pass/secret.titi \
--include '^INBOX.yop' \
--allow3xx
--include '^INBOX.yop'
}
ll_exclude()
@ -570,8 +589,7 @@ ll_exclude()
--passfile1 ../../var/pass/secret.tata \
--host2 $HOST2 --user2 titi \
--passfile2 ../../var/pass/secret.titi \
--exclude '^INBOX.yop' \
--allow3xx
--exclude '^INBOX.yop'
}
@ -637,8 +655,7 @@ ll_sep2()
--host2 $HOST2 --user2 titi \
--passfile2 ../../var/pass/secret.titi \
--folder INBOX.yop.yap \
--sep2 '\\' --dry \
--allow3xx
--sep2 '\\' --dry
}
ll_bad_login()
@ -647,8 +664,7 @@ ll_bad_login()
--host1 $HOST1 --user1 toto \
--passfile1 ../../var/pass/secret.toto \
--host2 $HOST2 --user2 notiti \
--passfile2 ../../var/pass/secret.titi \
--allow3xx
--passfile2 ../../var/pass/secret.titi
}
@ -658,8 +674,7 @@ ll_bad_host()
--host1 badhost --user1 toto \
--passfile1 ../../var/pass/secret.toto \
--host2 badhost --user2 titi \
--passfile2 ../../var/pass/secret.titi \
--allow3xx
--passfile2 ../../var/pass/secret.titi
}
@ -670,8 +685,7 @@ ll_bad_host_ssl()
--passfile1 ../../var/pass/secret.toto \
--host2 badhost --user2 titi \
--passfile2 ../../var/pass/secret.titi \
--ssl1 --ssl2 \
--allow3xx
--ssl1 --ssl2
}
@ -684,9 +698,8 @@ ll_useheader()
--passfile2 ../../var/pass/secret.titi \
--folder INBOX.yop.yap \
--useheader 'Message-ID' \
--dry --debug \
--allow3xx
echo 'rm /home/vmail/tata/.yop.yap/cur/*'
--dry --debug
echo 'rm /home/vmail/titi/.yop.yap/cur/*'
}
@ -703,8 +716,7 @@ ll_regexmess()
--folder INBOX.yop.yap \
--regexmess 's/\157/O/g' \
--regexmess 's/p/Z/g' \
--debug \
--allow3xx
--debug
if can_send; then
file=`ls -t /home/vmail/titi/.yop.yap/cur/* | tail -1`
@ -723,8 +735,7 @@ ll_regexmess_scwchu()
--folder INBOX.scwchu \
--regexmess 's{\A(.*?(?! ^$))^Date:(.*?)$}{$1Date:$2\nReceived: From; $2}gxms' \
--skipsize --skipheader 'Received: From;' \
--debug \
--allow3xx
--debug
echo 'rm /home/vmail/titi/.scwchu/cur/*'
}
@ -802,8 +813,8 @@ ll_regex_flag_keep_only()
ll_tls_justconnect() {
$CMD_PERL ./imapsync \
--host1 l \
--host2 l \
--host1 $HOST1 \
--host2 $HOST2 \
--tls1 --tls2 \
--justconnect --debug
}
@ -869,8 +880,7 @@ ll_ssl() {
--passfile1 ../../var/pass/secret.tata \
--host2 $HOST2 --user2 titi \
--passfile2 ../../var/pass/secret.titi \
--ssl1 --ssl2 \
--allow3xx
--ssl1 --ssl2
}
ll_authmech_PLAIN() {
@ -880,8 +890,7 @@ ll_authmech_PLAIN() {
--host2 $HOST2 --user2 titi \
--passfile2 ../../var/pass/secret.titi \
--justfoldersizes --nofoldersizes \
--authmech1 PLAIN --authmech2 PLAIN \
--allow3xx
--authmech1 PLAIN --authmech2 PLAIN
}
@ -893,13 +902,10 @@ ll_authuser() {
--host2 $HOST2 --user2 titi \
--passfile2 ../../var/pass/secret.titi \
--justfoldersizes --nofoldersizes \
--authuser2 titi \
--allow3xx
--authuser2 titi
}
ll_authmech_LOGIN() {
$CMD_PERL ./imapsync \
@ -908,8 +914,7 @@ ll_authmech_LOGIN() {
--host2 $HOST2 --user2 titi \
--passfile2 ../../var/pass/secret.titi \
--justfoldersizes --nofoldersizes \
--authmech1 LOGIN --authmech2 LOGIN \
--allow3xx
--authmech1 LOGIN --authmech2 LOGIN
}
ll_authmech_CRAMMD5() {
@ -919,8 +924,7 @@ ll_authmech_CRAMMD5() {
--host2 $HOST2 --user2 titi \
--passfile2 ../../var/pass/secret.titi \
--justfoldersizes --nofoldersizes \
--authmech1 CRAM-MD5 --authmech2 CRAM-MD5 \
--allow3xx
--authmech1 CRAM-MD5 --authmech2 CRAM-MD5
}
ll_delete2() {
@ -933,7 +937,7 @@ ll_delete2() {
--host2 $HOST2 --user2 titi \
--passfile2 ../../var/pass/secret.titi \
--folder INBOX \
--delete2 --expunge2
--delete2 --expunge2
}
ll_delete() {
@ -952,12 +956,23 @@ ll_delete() {
ll_bigmail() {
$CMD_PERL ./imapsync \
--host1 $HOST1 --user1 tata \
--passfile1 ../../var/pass/secret.tata \
--host2 $HOST2 --user2 titi \
--passfile2 ../../var/pass/secret.titi \
--host1 $HOST1 --user1 big1 \
--passfile1 ../../var/pass/secret.big1 \
--host2 $HOST2 --user2 big2 \
--passfile2 ../../var/pass/secret.big2 \
--folder INBOX.bigmail
echo 'sudo rm -v /home/vmail/titi/.bigmail/cur/*'
echo 'sudo rm -v /home/vmail/big2/.bigmail/cur/*'
}
ll_memory_consumption() {
$CMD_PERL ./imapsync \
--host1 $HOST1 --user1 big1 \
--passfile1 ../../var/pass/secret.big1 \
--host2 $HOST2 --user2 big2 \
--passfile2 ../../var/pass/secret.big2 \
--folder INBOX.bigmail2 \
--nofoldersizes
echo 'sudo rm -v /home/vmail/big2/.bigmail2/cur/*'
}
@ -995,27 +1010,22 @@ msw2() {
gmail() {
$CMD_PERL ./imapsync \
--allow3xx \
--host1 imap.gmail.com \
--ssl1 \
--authmech1 LOGIN \
--user1 gilles.lamiral@gmail.com \
--passfile1 ../../var/pass/secret.gilles_gmail \
--host2 $HOST2 \
--ssl2 \
--user2 tata \
--passfile2 ../../var/pass/secret.tata \
--useheader 'Message-Id' --skipsize \
--regextrans2 's/\[Gmail\]/Gmail/' \
--authmech1 LOGIN \
--allowsizemismatch
#--dry # --debug --debugimap # --authmech1 LOGIN
--useheader 'Message-Id' \
--useheader="X-Gmail-Received" \
--regextrans2 's/\[Gmail\]/Gmail/'
}
gmail_gmail() {
$CMD_PERL ./imapsync \
--allow3xx \
--host1 imap.gmail.com \
--ssl1 \
--user1 gilles.lamiral@gmail.com \
@ -1029,13 +1039,11 @@ gmail_gmail() {
--folder INBOX \
--authmech1 LOGIN --authmech2 LOGIN \
--allowsizemismatch
#--dry # --debug --debugimap # --authmech1 LOGIN
}
gmail_gmail2() {
$CMD_PERL ./imapsync \
--allow3xx \
--host1 imap.gmail.com \
--ssl1 \
--user1 gilles.lamiral@gmail.com \
@ -1084,8 +1092,7 @@ archiveopteryx_1() {
--passfile1 ../../var/pass/secret.aox_je \
--host2 lupus.aox.org --user2 je \
--passfile2 ../../var/pass/secret.aox_je \
--folder INBOX --regextrans2 's/INBOX/copy/' \
--allow3xx
--folder INBOX --regextrans2 's/INBOX/copy/'
}
ll_justlogin() {
@ -1096,7 +1103,7 @@ ll_justlogin() {
--passfile1 ../../var/pass/secret.tata \
--host2 $HOST2 --user2 titi \
--passfile2 ../../var/pass/secret.titi \
--allow3xx --justlogin --noauthmd5
--justlogin --noauthmd5
}
ll_justlogin_backslash_char() {
@ -1107,7 +1114,7 @@ ll_justlogin_backslash_char() {
--passfile1 ../../var/pass/secret.tata \
--host2 $HOST2 --user2 tptp@est.belle \
--passfile2 ../../var/pass/secret.tptp \
--allow3xx --justlogin --noauthmd5
--justlogin --noauthmd5
}
@ -1210,172 +1217,6 @@ dprof_bigmail()
essnet_justconnect()
{
./imapsync \
--host1 mail2.softwareuno.com \
--user1 gilles@mail2.softwareuno.com \
--passfile1 ../../var/pass/secret.prw \
--host2 mail.softwareuno.com \
--user2 gilles@softwareuno.com \
--passfile2 ../../var/pass/secret.prw \
--dry --noauthmd5 --sep1 / --foldersizes --justconnect
}
essnet_mail2_mail()
{
./imapsync \
--host1 mail2.softwareuno.com \
--user1 gilles@mail2.softwareuno.com \
--passfile1 ../../var/pass/secret.prw \
--host2 mail.softwareuno.com \
--user2 gilles@softwareuno.com \
--passfile2 ../../var/pass/secret.prw \
--noauthmd5 --sep1 / --foldersizes \
--prefix2 "INBOX/" --regextrans2 's¤INBOX/INBOX¤INBOX¤'
}
essnet_mail2_mail_t123()
{
for user1 in test1 test2 test3; do
./imapsync \
--host1 mail2.softwareuno.com \
--user1 ${user1}@mail2.softwareuno.com \
--passfile1 ../../var/pass/secret.prw \
--host2 mail.softwareuno.com \
--user2 gilles@softwareuno.com \
--passfile2 ../../var/pass/secret.prw \
--noauthmd5 --sep1 / --foldersizes \
--prefix2 "INBOX/" --regextrans2 's¤INBOX/INBOX¤INBOX¤' \
--debug \
|| true
done
}
essnet_plume2()
{
./imapsync \
--host1 mail2.softwareuno.com \
--user1 gilles@mail2.softwareuno.com \
--passfile1 ../../var/pass/secret.prw \
--host2 plume --user2 tata \
--passfile2 ../../var/pass/secret.tata \
--noauthmd5 --sep1 / --foldersizes \
--prefix2 INBOX. --regextrans2 's¤INBOX.INBOX¤INBOX¤'
}
dynamicquest_1()
{
perl -I bugs/lib ./imapsync \
--host1 69.38.48.81 \
--user1 testuser1@dq.com \
--passfile1 ../../var/pass/secret.dynamicquest \
--host2 69.38.48.81 \
--user2 testuser2@dq.com \
--passfile2 ../../var/pass/secret.dynamicquest \
--noauthmd5 --sep1 "/" --sep2 "/" \
--justconnect --dry
}
dynamicquest_2()
{
perl -I bugs/lib ./imapsync \
--host1 mail.dynamicquest.com \
--user1 gomez \
--passfile1 ../../var/pass/secret.dynamicquestgomez \
--host2 69.38.48.81 \
--user2 testuser2@dq.com \
--passfile2 ../../var/pass/secret.dynamicquest \
--noauthmd5 \
--justconnect --dry
}
dynamicquest_3()
{
perl -I bugs/lib ./imapsync \
--host1 loul \
--user1 tata \
--passfile1 ../../var/pass/secret.tata \
--host2 69.38.48.81 \
--user2 testuser2@dq.com \
--passfile2 ../../var/pass/secret.dynamicquest \
--noauthmd5 --sep2 "/" --debug --debugimap
}
mailenable() {
./imapsync \
--user1 imapsync@damashekconsulting.com \
--host1 imap.damashekconsulting.com \
--passfile1 ../../var/pass/secret.damashek \
--sep1 "." --prefix1 "" \
--host2 $HOST2 --user2 toto \
--passfile2 ../../var/pass/secret.toto \
--noauthmd5
}
ariasolutions() {
./imapsync \
--host1 209.17.174.20 \
--user1 chrisw@canadapack.com \
--passfile1 ../../var/pass/secret.ariasolutions \
--host2 209.17.174.20 \
--user2 chrisw@canadapack.com \
--passfile2 ../../var/pass/secret.ariasolutions \
--dry --noauthmd5 --justfoldersizes
./imapsync \
--host1 209.17.174.20 \
--user1 test@domain.local \
--passfile1 ../../var/pass/secret.ariasolutions \
--host2 209.17.174.20 \
--user2 test@domain.local \
--passfile2 ../../var/pass/secret.ariasolutions \
--dry --noauthmd5 --ssl1
# hang after auth failure
./imapsync \
--host1 209.17.174.20 \
--user1 test@domain.local \
--passfile1 ../../var/pass/secret.ariasolutions \
--host2 209.17.174.20 \
--user2 test@domain.local \
--passfile2 ../../var/pass/secret.ariasolutions \
--dry --debug --debugimap
}
ariasolutions2() {
./imapsync \
--host1 209.17.174.12 \
--user1 chrisw@basebuilding.net \
--passfile1 ../../var/pass/secret.ariasolutions2 \
--host2 209.17.174.20 \
--user2 chrisw@basebuilding.net\
--passfile2 ../../var/pass/secret.ariasolutions2 \
--noauthmd5 --syncinternaldates
# --dry --debug --debugimap
}
genomics() {
# Blocked, timeout ignored
./imapsync \
--host1 mail.genomics.org.cn --user1 lamiral --passfile1 ../../var/pass/secret.genomics \
--host2 szmail.genomics.cn --user2 lamiral --passfile2 ../../var/pass/secret.genomics \
--sep1 . --prefix1 'INBOX.' --folder INBOX --useheader 'Message-Id' --expunge --skipsize \
--timeout 7 --debug --debugimap
}
##########################
##########################
@ -1385,12 +1226,18 @@ mandatory_tests='
no_args
option_version
option_tests
option_tests_debug
option_bad_delete2
passwords_masked
first_sync_dry
first_sync
locallocal
ll_pidfile
pidfile
justbanner
nomodules_version
gmail
gmail_gmail
gmail_gmail2
ll_ask_password
ll_bug_folder_name_with_blank
ll_timeout
@ -1439,18 +1286,21 @@ ll_authuser
ll_delete2
ll_delete
ll_folderrec
ll_bigmail
gmail
gmail_gmail
gmail_gmail2
archiveopteryx_1
allow3xx
noallow3xx
ll_newmessage'
ll_memory_consumption
ll_newmessage
ll_delete2folders
'
other_tests='
archiveopteryx_1
msw
ll_justlogin_backslash_char'
msw2
ll_bigmail
ll_justlogin_backslash_char
option_tests_debug
'
l() {
echo "$mandatory_tests" "$other_tests"