diff --git a/CREDITS b/CREDITS index 8931c9e..ca8fb31 100644 --- a/CREDITS +++ b/CREDITS @@ -1,5 +1,5 @@ #!/bin/cat -# $Id: CREDITS,v 1.173 2013/05/06 08:16:53 gilles Exp gilles $ +# $Id: CREDITS,v 1.174 2013/06/07 10:05:12 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. +Jim Klimov +Gave patch to handle proxyauth failures. + Eduardo Bortoluzzi Junior Write the XOAUTH code and FAQ item. diff --git a/ChangeLog b/ChangeLog index 673bd12..9edce3b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,17 +1,44 @@ RCS file: RCS/imapsync,v Working file: imapsync -head: 1.542 +head: 1.547 branch: locks: strict - gilles: 1.542 + gilles: 1.547 access list: symbolic names: keyword substitution: kv -total revisions: 542; selected revisions: 542 +total revisions: 547; selected revisions: 547 description: ---------------------------- -revision 1.542 locked by: gilles; +revision 1.547 locked by: gilles; +date: 2013/07/03 01:24:34; author: gilles; state: Exp; lines: +11 -8 +DBOX 2.41 success. +Kerio 8 success. +---------------------------- +revision 1.546 +date: 2013/07/02 03:49:32; author: gilles; state: Exp; lines: +14 -8 +Fixed IO::Socket::IP bug on Win32? +Removed SSL::DEBUG +Added "copying.." in dry mode. +---------------------------- +revision 1.545 +date: 2013/06/06 20:43:56; author: gilles; state: Exp; lines: +27 -125 +Rmoved sub starttls() +Removed sub myconnect() +Removed sub RawSocket2() +Applied patch from Jim Klimov to handle proxyauth failures +---------------------------- +revision 1.544 +date: 2013/06/02 23:36:16; author: gilles; state: Exp; lines: +25 -24 +Remove myconnect() use. Replaced by $imap->connect() +Removed sub Split add in Mail::IMAPClient +---------------------------- +revision 1.543 +date: 2013/05/22 01:22:03; author: gilles; state: Exp; lines: +12 -7 +SSL_verify_mode 0 to avoid warning about Man-In-The-Middle. +---------------------------- +revision 1.542 date: 2013/05/06 08:30:35; author: gilles; state: Exp; lines: +7 -7 Syntax with "" fix. ---------------------------- diff --git a/FAQ b/FAQ index 4d1c044..395bcec 100644 --- a/FAQ +++ b/FAQ @@ -1,5 +1,5 @@ #!/bin/cat -# $Id: FAQ,v 1.133 2013/05/06 08:17:13 gilles Exp gilles $ +# $Id: FAQ,v 1.134 2013/06/02 23:34:02 gilles Exp gilles $ +------------------+ | FAQ for imapsync | @@ -301,7 +301,7 @@ Q. How can I try imapsync with Mail::IMAPClient 3.xx perl module? R. The answer R2 deals with any Perl module use. R1 - Look at the script named i3 in the tarball, it can be used to - run imapsync with included Mail-IMAPClient-3.32/ wherever you + run imapsync with included Mail-IMAPClient-3.33/ wherever you unpacked the imapsync tarball R2 - Download latest Mail::IMAPClient 3.xx at @@ -314,10 +314,10 @@ R2 - Download latest Mail::IMAPClient 3.xx at - run imapsync with perl and -I option tailing to use the perl module Mail-IMAPClient-3.xx. Example: - perl -I./Mail-IMAPClient-3.32/lib ./imapsync ... + perl -I./Mail-IMAPClient-3.33/lib ./imapsync ... or if imapsync is in directory /path/ - perl -I./Mail-IMAPClient-3.32/lib /path/imapsync ... + perl -I./Mail-IMAPClient-3.33/lib /path/imapsync ... ======================================================================= @@ -1208,7 +1208,12 @@ Examples: --regextrans2 's/^INBOX\.(.+)/$1/' -2) To sync a complete account in a subfolder called FOO: +2a) To sync all folders to INBOX: + + imapsync ... --regextrans2 "s/.*/INBOX/" + + +2b) To sync a complete account in a subfolder called FOO: a) Seperator is dot character "." and "INBOX" prefixes every folder diff --git a/INSTALL b/INSTALL index ac9dee6..b75f96a 100644 --- a/INSTALL +++ b/INSTALL @@ -1,4 +1,4 @@ -# $Id: INSTALL,v 1.28 2013/05/14 08:19:08 gilles Exp gilles $ +# $Id: INSTALL,v 1.30 2013/07/03 04:13:52 gilles Exp gilles $ # # INSTALL file for imapsync # imapsync : IMAP sync or copy tool. @@ -55,7 +55,7 @@ b) Hard way: c) How to build imapsync.exe? - Do the hard stuff in b) -- Run W/build_exe.bat (found in the tarball) +- Run build_exe.bat (found in the tarball) PREREQUISITES ------------- @@ -94,10 +94,10 @@ Here is some individual module help: New Mail-IMAPClient-3.xx works very well with imapsync, Use at least Mail-IMAPClient-3.25 (previous may bug). Don't hesitate to use latest Mail-IMAPClient-3.xx - (3.xx >= 3.32 at the time of this writing) + (3.xx >= 3.33 at the time of this writing) Look at the script named "i3" in the tarball, it can be used to - run imapsync with included Mail-IMAPClient-3.32/ wherever you + run imapsync with included Mail-IMAPClient-3.33/ wherever you unpacked the imapsync tarball. diff --git a/Makefile b/Makefile index 71f86df..5cab5b2 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ -# $Id: Makefile,v 1.118 2013/05/14 05:59:55 gilles Exp gilles $ +# $Id: Makefile,v 1.121 2013/06/02 23:34:14 gilles Exp gilles $ .PHONY: help usage all @@ -11,9 +11,10 @@ usage: @echo "make testf # run tests" @echo "make testv # run tests verbosely" @echo "make test_quick # few tests verbosely" - @echo "make tests_win32 # run tests on win32" - @echo "make tests_win32_dev # run test2.bat on win32" - @echo "make prereq_win32 # run W/install_modules.bat on win32" + @echo "make tests_win32 # run --test and W/test.bat on win32" + @echo "make tests_win32_dev # run W/test2.bat on win32" + @echo "make tests_win32_dev3 # run W/test3.bat on win32" + @echo "make prereq_win32 # run examples/install_modules.bat on win32" @echo "make all " @echo "make upload_index" @echo "make upload_ks" @@ -31,7 +32,7 @@ VERSION=$(shell perl -I$(IMAPClient) ./imapsync --version) VERSION_EXE=$(shell cat ./VERSION_EXE) HELLO=$(shell date;uname -a) -IMAPClient_3xx=./W/Mail-IMAPClient-3.32/lib +IMAPClient_3xx=./W/Mail-IMAPClient-3.33/lib IMAPClient=$(IMAPClient_3xx) hello: @@ -143,19 +144,25 @@ tests_win32_dev: dosify_bat scp imapsync examples/file.txt W/test2.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/' ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/test2.bat' +tests_win32_dev3: dosify_bat + scp imapsync W/test3.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/' + ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/test3.bat' + + + test_imapsync_exe: dosify_bat scp W/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' -prereq_win32: imapsync examples/install_modules.bat .dosify_bat +prereq_win32: examples/install_modules.bat .dosify_bat scp examples/install_modules.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/' - time ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/install_modules.bat' + ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/install_modules.bat' -imapsync.exe: imapsync W/build_exe.bat .dosify_bat +imapsync.exe: imapsync prereq_win32 build_exe.bat .dosify_bat rcsdiff imapsync ssh Admin@c 'perl -V' (date "+%s"| tr "\n" " "; echo -n "BEGIN " $(VERSION) ": "; date) >> W/.BUILD_EXE_TIME - scp imapsync W/build_exe.bat W/test_exe.bat \ + scp imapsync build_exe.bat W/test_exe.bat \ Admin@c:'C:/msys/1.0/home/Admin/imapsync/' ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/build_exe.bat' ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/test_exe.bat' @@ -164,6 +171,18 @@ imapsync.exe: imapsync W/build_exe.bat .dosify_bat dos2unix ./VERSION_EXE (date "+%s"| tr "\n" " "; echo -n "END " $(VERSION) ": "; date) >> W/.BUILD_EXE_TIME +exe: imapsync build_exe.bat .dosify_bat + (date "+%s"| tr "\n" " "; echo -n "BEGIN " $(VERSION) ": "; date) >> W/.BUILD_EXE_TIME + scp imapsync build_exe.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/' + ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/build_exe.bat' + ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/imapsync.exe --modules_version' + scp Admin@c:'C:/msys/1.0/home/Admin/imapsync/imapsync.exe' . + (date "+%s"| tr "\n" " "; echo -n "END " $(VERSION) ": "; date) >> W/.BUILD_EXE_TIME + + + + +# C:\Users\mansour\Desktop\imapsync # vadrouille or petite imapsync_elf_x86.bin: imapsync diff --git a/README b/README index baab76d..23cbd40 100644 --- a/README +++ b/README @@ -4,7 +4,7 @@ NAME More than 52 different IMAP server softwares supported with success, few failures. - $Revision: 1.542 $ + $Revision: 1.547 $ SYNOPSIS To synchronize imap account "foo" on "imap.truc.org" to imap account @@ -317,7 +317,7 @@ IMAP SERVERS - Hotmail since hotmail.com does not provide IMAP access - Outlook.com since outlook.com does not provide IMAP access - Success stories reported with the following 52 imap servers (software + Success stories reported with the following 53 imap servers (software names are in alphabetic order): - 1und1 H mimap1 84498 [host1] H mibap4 95231 [host1] @@ -340,6 +340,7 @@ IMAP SERVERS - Deerfield VisNetic MailServer 5.8.6 [host1] (http://www.deerfield.net/products/visnetic-mailserver/) - DBMail 1.2.1, 2.0.4, 2.0.9, 2.2rc1 (GPL) (http://www.dbmail.org/). 2.0.7 seems buggy. + - DBOX 2.41 System [host1] (http://www.dbox.handshake.de/). - Deerfield VisNetic MailServer 5.8.6 [host1] - dkimap4 [host1] - Domino (Notes) 4.61[host1], 6.5[host1], 5.0.6, 5.0.7, 7.0.2, 6.0.2CF1, @@ -353,7 +354,7 @@ IMAP SERVERS - hMailServer 5.3.3 [host2], 4.4.1 [host1] (see FAQ) - iPlanet Messaging server 4.15, 5.1, 5.2 - IMail 7.15 (Ipswitch/Win2003), 8.12, 11.03 [host1] - - Kerio 7.2.0 Patch 1 [host1] [host2] + - Kerio 7.2.0 Patch 1 [host12], Kerio 8 [host1] - Mail2World IMAP4 Server 2.5 [host1] (http://www.mail2world.com/) - MailEnable 4.23 [host1] [host2], 4.26 [host1][host2], 5 [host1] - MDaemon 7.0.1, 8.0.2, 8.1, 9.5.4 (Windows server 2003 R2 platform), @@ -463,5 +464,5 @@ SIMILAR SOFTWARES Feedback (good or bad) will often be welcome. - $Id: imapsync,v 1.542 2013/05/06 08:30:35 gilles Exp gilles $ + $Id: imapsync,v 1.547 2013/07/03 01:24:34 gilles Exp gilles $ diff --git a/VERSION b/VERSION index 972a4c1..e87c784 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.542 +1.547 diff --git a/VERSION_EXE b/VERSION_EXE index 972a4c1..e87c784 100644 --- a/VERSION_EXE +++ b/VERSION_EXE @@ -1 +1 @@ -1.542 +1.547 diff --git a/W/.BUILD_EXE_TIME b/W/.BUILD_EXE_TIME index 08d4baa..2b2d14f 100644 --- a/W/.BUILD_EXE_TIME +++ b/W/.BUILD_EXE_TIME @@ -188,3 +188,38 @@ 1366592337 END 1.538 : lundi 22 avril 2013, 02:58:57 (UTC+0200) 1367829058 BEGIN 1.542 : lundi 6 mai 2013, 10:30:58 (UTC+0200) 1367829799 END 1.542 : lundi 6 mai 2013, 10:43:19 (UTC+0200) +1369002420 BEGIN 1.542 : lundi 20 mai 2013, 00:27:00 (UTC+0200) +1369002592 BEGIN 1.542 : lundi 20 mai 2013, 00:29:52 (UTC+0200) +1369003347 END 1.542 : lundi 20 mai 2013, 00:42:27 (UTC+0200) +1369004592 BEGIN 1.542 : lundi 20 mai 2013, 01:03:12 (UTC+0200) +1369005205 BEGIN 1.542 : lundi 20 mai 2013, 01:13:25 (UTC+0200) +1369007256 BEGIN 1.542 : lundi 20 mai 2013, 01:47:36 (UTC+0200) +1369007618 END 1.542 : lundi 20 mai 2013, 01:53:38 (UTC+0200) +1369008471 BEGIN 1.542 : lundi 20 mai 2013, 02:07:51 (UTC+0200) +1369008871 END 1.542 : lundi 20 mai 2013, 02:14:31 (UTC+0200) +1369009301 BEGIN 1.542 : lundi 20 mai 2013, 02:21:41 (UTC+0200) +1369009684 END 1.542 : lundi 20 mai 2013, 02:28:04 (UTC+0200) +1369066181 BEGIN 1.542 : lundi 20 mai 2013, 18:09:41 (UTC+0200) +1369066684 END 1.542 : lundi 20 mai 2013, 18:18:04 (UTC+0200) +1369091275 BEGIN 1.542 : mardi 21 mai 2013, 01:07:55 (UTC+0200) +1369091715 END 1.542 : mardi 21 mai 2013, 01:15:15 (UTC+0200) +1369093368 BEGIN 1.542 : mardi 21 mai 2013, 01:42:48 (UTC+0200) +1369093884 END 1.542 : mardi 21 mai 2013, 01:51:24 (UTC+0200) +1369185777 BEGIN 1.543 : mercredi 22 mai 2013, 03:22:57 (UTC+0200) +1369186219 END 1.543 : mercredi 22 mai 2013, 03:30:19 (UTC+0200) +1369217503 BEGIN 1.543 : mercredi 22 mai 2013, 12:11:43 (UTC+0200) +1369218286 END 1.543 : mercredi 22 mai 2013, 12:24:46 (UTC+0200) +1369236897 BEGIN 1.543 : mercredi 22 mai 2013, 17:34:57 (UTC+0200) +1369237336 END 1.543 : mercredi 22 mai 2013, 17:42:16 (UTC+0200) +1369237945 BEGIN 1.543 : mercredi 22 mai 2013, 17:52:25 (UTC+0200) +1369238373 END 1.543 : mercredi 22 mai 2013, 17:59:33 (UTC+0200) +1370216259 BEGIN 1.544 : lundi 3 juin 2013, 01:37:39 (UTC+0200) +1370216695 END 1.544 : lundi 3 juin 2013, 01:44:55 (UTC+0200) +1372753674 BEGIN 1.546 : mardi 2 juillet 2013, 10:27:54 (UTC+0200) +1372754442 END 1.546 : mardi 2 juillet 2013, 10:40:42 (UTC+0200) +1372815752 BEGIN 1.547 : mercredi 3 juillet 2013, 03:42:32 (UTC+0200) +1372816528 END 1.547 : mercredi 3 juillet 2013, 03:55:28 (UTC+0200) +1372851174 BEGIN 1.547 : mercredi 3 juillet 2013, 13:32:54 (UTC+0200) +1372851958 END 1.547 : mercredi 3 juillet 2013, 13:45:58 (UTC+0200) +1372852860 BEGIN 1.547 : mercredi 3 juillet 2013, 14:01:00 (UTC+0200) +1372853599 END 1.547 : mercredi 3 juillet 2013, 14:13:19 (UTC+0200) diff --git a/W/Mail-IMAPClient-3.32/Changes b/W/Mail-IMAPClient-3.33/Changes similarity index 99% rename from W/Mail-IMAPClient-3.32/Changes rename to W/Mail-IMAPClient-3.33/Changes index dd3e5e8..44dadc6 100644 --- a/W/Mail-IMAPClient-3.32/Changes +++ b/W/Mail-IMAPClient-3.33/Changes @@ -5,6 +5,18 @@ Changes from 2.99_01 to 3.16 made by Mark Overmeer Changes from 0.09 to 2.99_01 made by David Kernen - Potential compatibility issues from 3.17+ highlighted with '*' +version 3.33: Tue, May 14, 2013 10:12:43 AM + - more cleanup on use of $@ and $! + - cleanup get_bodystructure / get_envelope + - allow Ssl arg as an arrayref to pass args to IO::Socket::SSL + [Ramana V Mokkapati] + - no need to Massage() the folder name in uidnext() + - rt.cpan.org#84028: get_envelope() fails when subject ends w/backslash + [Andy Lyttle] + - rt.cpan.org#79476: move()/copy() with sequence causes numeric warning + [Oleg G] + - *move()/copy() no longer sort message(s) provided by caller + version 3.32: Fri, Aug 10, 2012 4:43:24 PM - document RFC2087 quota related calls [Mathias Reitinger] documentation request diff --git a/W/Mail-IMAPClient-3.32/MANIFEST b/W/Mail-IMAPClient-3.33/MANIFEST similarity index 100% rename from W/Mail-IMAPClient-3.32/MANIFEST rename to W/Mail-IMAPClient-3.33/MANIFEST diff --git a/W/Mail-IMAPClient-3.32/META.yml b/W/Mail-IMAPClient-3.33/META.yml similarity index 65% rename from W/Mail-IMAPClient-3.32/META.yml rename to W/Mail-IMAPClient-3.33/META.yml index 9d992ce..bd86a12 100644 --- a/W/Mail-IMAPClient-3.32/META.yml +++ b/W/Mail-IMAPClient-3.33/META.yml @@ -1,10 +1,10 @@ --- #YAML:1.0 name: Mail-IMAPClient -version: 3.32 +version: 3.33 abstract: IMAP4 client library author: - Phil Pearl (Lobbes) -license: unknown +license: perl distribution_type: module configure_requires: ExtUtils::MakeMaker: 0 @@ -24,6 +24,15 @@ requires: Parse::RecDescent: 1.94 perl: 5.008 Test::More: 0 +resources: + bugtracker: + mailto: bug-Mail-IMAPClient@rt.cpan.org + web: http://rt.cpan.org/Public/Dist/Display.html?Name=Mail-IMAPClient + homepage: http://sourceforge.net/projects/mail-imapclient/ + repository: + type: git + url: git://git.code.sf.net/p/mail-imapclient/git + web: http://sourceforge.net/p/mail-imapclient/git/ no_index: directory: - t diff --git a/W/Mail-IMAPClient-3.32/Makefile.PL b/W/Mail-IMAPClient-3.33/Makefile.PL similarity index 84% rename from W/Mail-IMAPClient-3.32/Makefile.PL rename to W/Mail-IMAPClient-3.33/Makefile.PL index 6a37ea7..1d0f5bb 100644 --- a/W/Mail-IMAPClient-3.32/Makefile.PL +++ b/W/Mail-IMAPClient-3.33/Makefile.PL @@ -47,17 +47,35 @@ do { my $broke = version->parse("1.966002"); my $fixed = version->parse("1.967009"); if ( $found < $fixed and $found >= $broke ) { - die("Found broken Parse::RecDescent $found in your environment.\n", - "Please upgrade to version $fixed or greater.\n"); + die( + "Found broken Parse::RecDescent $found in your environment.\n", + "Please upgrade to version $fixed or greater.\n" + ); } } }; WriteMakefile( - NAME => 'Mail::IMAPClient', - AUTHOR => 'Phil Pearl (Lobbes) ', - ABSTRACT => 'IMAP4 client library', - VERSION_FROM => 'lib/Mail/IMAPClient.pm', + NAME => 'Mail::IMAPClient', + AUTHOR => 'Phil Pearl (Lobbes) ', + ABSTRACT => 'IMAP4 client library', + VERSION_FROM => 'lib/Mail/IMAPClient.pm', + LICENSE => 'perl', + META_MERGE => { + resources => { + bugtracker => { + web => +'http://rt.cpan.org/Public/Dist/Display.html?Name=Mail-IMAPClient', + mailto => 'bug-Mail-IMAPClient@rt.cpan.org', + }, + homepage => 'http://sourceforge.net/projects/mail-imapclient/', + repository => { + url => 'git://git.code.sf.net/p/mail-imapclient/git', + web => 'http://sourceforge.net/p/mail-imapclient/git/', + type => 'git', + }, + }, + }, MIN_PERL_VERSION => '5.008', PREREQ_PM => { 'Carp' => 0, diff --git a/W/Mail-IMAPClient-3.32/README b/W/Mail-IMAPClient-3.33/README similarity index 95% rename from W/Mail-IMAPClient-3.32/README rename to W/Mail-IMAPClient-3.33/README index 455f0fc..f474be0 100644 --- a/W/Mail-IMAPClient-3.32/README +++ b/W/Mail-IMAPClient-3.33/README @@ -58,13 +58,13 @@ Project Links - CPAN releases: http://search.cpan.org/dist/Mail-IMAPClient/ - Project website - http://mail-imapclient.sf.net/ + http://sourceforge.net/projects/mail-imapclient/ COPYRIGHT AND LICENSE ===================== Copyright (C) 1999-2003 The Kernen Group, Inc. Copyright (C) 2007-2009 Mark Overmeer -Copyright (C) 2010-2012 Phil Pearl (Lobbes) +Copyright (C) 2010-2013 Phil Pearl (Lobbes) All rights reserved. This library is free software; you can redistribute it and/or modify diff --git a/W/Mail-IMAPClient-3.32/examples/build_dist.pl b/W/Mail-IMAPClient-3.33/examples/build_dist.pl similarity index 100% rename from W/Mail-IMAPClient-3.32/examples/build_dist.pl rename to W/Mail-IMAPClient-3.33/examples/build_dist.pl diff --git a/W/Mail-IMAPClient-3.32/examples/build_ldif.pl b/W/Mail-IMAPClient-3.33/examples/build_ldif.pl similarity index 100% rename from W/Mail-IMAPClient-3.32/examples/build_ldif.pl rename to W/Mail-IMAPClient-3.33/examples/build_ldif.pl diff --git a/W/Mail-IMAPClient-3.32/examples/cleanTest.pl b/W/Mail-IMAPClient-3.33/examples/cleanTest.pl similarity index 100% rename from W/Mail-IMAPClient-3.32/examples/cleanTest.pl rename to W/Mail-IMAPClient-3.33/examples/cleanTest.pl diff --git a/W/Mail-IMAPClient-3.32/examples/copy_folder.pl b/W/Mail-IMAPClient-3.33/examples/copy_folder.pl similarity index 100% rename from W/Mail-IMAPClient-3.32/examples/copy_folder.pl rename to W/Mail-IMAPClient-3.33/examples/copy_folder.pl diff --git a/W/Mail-IMAPClient-3.32/examples/cyrus_expire.pl b/W/Mail-IMAPClient-3.33/examples/cyrus_expire.pl similarity index 100% rename from W/Mail-IMAPClient-3.32/examples/cyrus_expire.pl rename to W/Mail-IMAPClient-3.33/examples/cyrus_expire.pl diff --git a/W/Mail-IMAPClient-3.32/examples/cyrus_expunge.pl b/W/Mail-IMAPClient-3.33/examples/cyrus_expunge.pl similarity index 100% rename from W/Mail-IMAPClient-3.32/examples/cyrus_expunge.pl rename to W/Mail-IMAPClient-3.33/examples/cyrus_expunge.pl diff --git a/W/Mail-IMAPClient-3.32/examples/find_dup_msgs.pl b/W/Mail-IMAPClient-3.33/examples/find_dup_msgs.pl similarity index 100% rename from W/Mail-IMAPClient-3.32/examples/find_dup_msgs.pl rename to W/Mail-IMAPClient-3.33/examples/find_dup_msgs.pl diff --git a/W/Mail-IMAPClient-3.32/examples/idle.pl b/W/Mail-IMAPClient-3.33/examples/idle.pl similarity index 100% rename from W/Mail-IMAPClient-3.32/examples/idle.pl rename to W/Mail-IMAPClient-3.33/examples/idle.pl diff --git a/W/Mail-IMAPClient-3.32/examples/imap_to_mbox.pl b/W/Mail-IMAPClient-3.33/examples/imap_to_mbox.pl similarity index 100% rename from W/Mail-IMAPClient-3.32/examples/imap_to_mbox.pl rename to W/Mail-IMAPClient-3.33/examples/imap_to_mbox.pl diff --git a/W/Mail-IMAPClient-3.32/examples/imtestExample.pl b/W/Mail-IMAPClient-3.33/examples/imtestExample.pl similarity index 100% rename from W/Mail-IMAPClient-3.32/examples/imtestExample.pl rename to W/Mail-IMAPClient-3.33/examples/imtestExample.pl diff --git a/W/Mail-IMAPClient-3.32/examples/migrate_mail2.pl b/W/Mail-IMAPClient-3.33/examples/migrate_mail2.pl similarity index 100% rename from W/Mail-IMAPClient-3.32/examples/migrate_mail2.pl rename to W/Mail-IMAPClient-3.33/examples/migrate_mail2.pl diff --git a/W/Mail-IMAPClient-3.32/examples/migrate_mbox.pl b/W/Mail-IMAPClient-3.33/examples/migrate_mbox.pl similarity index 100% rename from W/Mail-IMAPClient-3.32/examples/migrate_mbox.pl rename to W/Mail-IMAPClient-3.33/examples/migrate_mbox.pl diff --git a/W/Mail-IMAPClient-3.32/examples/populate_mailbox.pl b/W/Mail-IMAPClient-3.33/examples/populate_mailbox.pl similarity index 100% rename from W/Mail-IMAPClient-3.32/examples/populate_mailbox.pl rename to W/Mail-IMAPClient-3.33/examples/populate_mailbox.pl diff --git a/W/Mail-IMAPClient-3.32/examples/sharedFolder.pl b/W/Mail-IMAPClient-3.33/examples/sharedFolder.pl similarity index 100% rename from W/Mail-IMAPClient-3.32/examples/sharedFolder.pl rename to W/Mail-IMAPClient-3.33/examples/sharedFolder.pl diff --git a/W/Mail-IMAPClient-3.32/lib/Mail/IMAPClient.pm b/W/Mail-IMAPClient-3.33/lib/Mail/IMAPClient.pm similarity index 97% rename from W/Mail-IMAPClient-3.32/lib/Mail/IMAPClient.pm rename to W/Mail-IMAPClient-3.33/lib/Mail/IMAPClient.pm index d171b01..08ab69a 100644 --- a/W/Mail-IMAPClient-3.32/lib/Mail/IMAPClient.pm +++ b/W/Mail-IMAPClient-3.33/lib/Mail/IMAPClient.pm @@ -7,7 +7,7 @@ use strict; use warnings; package Mail::IMAPClient; -our $VERSION = '3.32'; +our $VERSION = '3.33'; use Mail::IMAPClient::MessageSet; @@ -59,9 +59,13 @@ sub _load_module { my $modkey = shift; my $module = $Load_Module{$modkey} || $modkey; - eval "require $module"; - if ($@) { - $self->LastError("Unable to load '$module': $@"); + my $err = do { + local ($@); + eval "require $module"; + $@; + }; + if ($err) { + $self->LastError("Unable to load '$module': $err"); return undef; } return $module; @@ -118,6 +122,8 @@ sub LastError { Carp::cluck($emsg); } } + + # 2.x API support requires setting $@ $@ = $self->{LastError} = $err; } @@ -129,7 +135,7 @@ sub Fast_io(;$) { my $socket = $self->{Socket} or return undef; - local ($@); # avoid stomping on global $@ + local ( $@, $! ); # avoid stomping on globals unless ($use) { eval { fcntl( $socket, F_SETFL, delete $self->{_fcntl} ) } if exists $self->{_fcntl}; @@ -331,7 +337,17 @@ sub connect(@) { } else { my $ioclass = "IO::Socket::INET"; - $ioclass = $self->_load_module("SSL") if ( $self->Ssl ); + my @args; + + if ( $self->Ssl ) { + $ioclass = $self->_load_module("SSL"); + + # give caller control of args to new if desired + @args = + ( ref( $self->Ssl ) eq "ARRAY" ) + ? ( @{ $self->Ssl } ) + : (); + } if ($ioclass) { $self->_debug("Connecting via $ioclass to $server:$port @timeout"); @@ -340,7 +356,8 @@ sub connect(@) { PeerPort => $port, Proto => 'tcp', Debug => $self->Debug, - @timeout + @timeout, + @args ); } } @@ -350,7 +367,8 @@ sub connect(@) { return $self->Socket($sock); } else { - $self->LastError("Unable to connect to $server: $@"); + my $lasterr = $self->LastError || ""; + $self->LastError("Unable to connect to $server: $lasterr"); return undef; } } @@ -889,6 +907,7 @@ sub message_to_file { } else { $$file = "" if ( ref $file eq "SCALAR" and !defined $$file ); + local ($!); open( $fh, ">>", $file ); unless ( defined($fh) ) { $self->LastError("Unable to open file '$file': $!"); @@ -1883,7 +1902,7 @@ sub _disconnect { delete $self->{_IMAP4REV1}; $self->State(Unconnected); if ( my $sock = delete $self->{Socket} ) { - local ($@); # avoid stomping on global $@ + local ($@); eval { $sock->close }; } return $self; @@ -1948,32 +1967,34 @@ sub get_bodystructure { my $out = $self->fetch( $msg, "BODYSTRUCTURE" ) or return undef; my $bs = ""; - my $output = first { /BODYSTRUCTURE\s+\(/i } @$out; # Wee! ;-) - if ( $output =~ /$CRLF$/o ) { - $bs = eval { $class->new($output) }; # BUG? localize $@ here? - } - else { + my $output = first { /BODYSTRUCTURE\s+\(/i } @$out; + + unless ( $output =~ /$CRLF$/o ) { + $output = ''; $self->_debug("get_bodystructure: reassembling original response"); my $started = 0; - my $output = ''; foreach my $o ( $self->_transaction ) { next unless $self->_is_output_or_literal($o); $started++ if $o->[DATA] =~ /BODYSTRUCTURE \(/i; - ; # Hi, vi! ;-) $started or next; - if ( length $output && $self->_is_literal($o) ) { + if ( length($output) && $self->_is_literal($o) ) { my $data = $o->[DATA]; $data =~ s/"/\\"/g; $data =~ s/\(/\\\(/g; $data =~ s/\)/\\\)/g; $output .= qq("$data"); } - else { $output .= $o->[DATA] } - - $self->_debug("get_bodystructure: reassembled output=$output"); + else { + $output .= $o->[DATA]; + } } - eval { $bs = $class->new($output) }; # BUG? localize $@ here? + $self->_debug("get_bodystructure: reassembled output=$output"); + } + + { + local ($@); + $bs = eval { $class->new($output) }; } $self->_debug( @@ -1992,25 +2013,15 @@ sub get_envelope { my $out = $self->fetch( $msg, 'ENVELOPE' ) or return undef; my $bs = ""; - my $output = first { /ENVELOPE \(/i } @$out; # vi ;-) + my $output = first { /ENVELOPE \(/i } @$out; - unless ($output) { - $self->LastError("Unable to use get_envelope: $@"); - return undef; - } - - if ( $output =~ /$CRLF$/o ) { - eval { $bs = $class->new($output) }; # BUG? localize $@ here? - } - else { + unless ( $output =~ /$CRLF$/o ) { + $output = ''; $self->_debug("get_envelope: reassembling original response"); my $started = 0; - $output = ''; foreach my $o ( $self->_transaction ) { next unless $self->_is_output_or_literal($o); - $self->_debug("o->[DATA] is $o->[DATA]"); - - $started++ if $o->[DATA] =~ /ENVELOPE \(/i; # Hi, vi! ;-) + $started++ if $o->[DATA] =~ /ENVELOPE \(/i; $started or next; if ( length($output) && $self->_is_literal($o) ) { @@ -2018,18 +2029,21 @@ sub get_envelope { $data =~ s/"/\\"/g; $data =~ s/\(/\\\(/g; $data =~ s/\)/\\\)/g; - $output .= '"' . $data . '"'; + $output .= qq("$data"); } else { $output .= $o->[DATA]; } - $self->_debug("get_envelope: reassembled output=$output"); } - - eval { $bs = $class->new($output) }; # BUG? localize $@ here? + $self->_debug("get_envelope: reassembled output=$output"); } - $self->_debug( "get_envelope: msg $msg returns ref: " . $bs || "UNDEF" ); + { + local ($@); + $bs = eval { $class->new($output) }; + } + + $self->_debug( "get_envelope: msg $msg returns: " . ( $bs || "UNDEF" ) ); $bs; } @@ -2723,17 +2737,15 @@ sub restore_message { scalar grep /^\*\s\d+\sFETCH\s\(.*FLAGS.*(?!\\Deleted)/, $self->Results; } -#??? compare to uidnext. Why is Massage missing? sub uidvalidity { my ( $self, $folder ) = @_; $self->status( $folder, "UIDVALIDITY" ) or return undef; - my $vline = first { /UIDVALIDITY/i } $self->History; - defined $vline && $vline =~ /\(UIDVALIDITY\s+([^\)]+)/ ? $1 : undef; + my $line = first { /UIDVALIDITY/i } $self->History; + defined $line && $line =~ /\(UIDVALIDITY\s+([^\)]+)/ ? $1 : undef; } sub uidnext { - my $self = shift; - my $folder = $self->Massage(shift); + my ( $self, $folder ) = @_; $self->status( $folder, "UIDNEXT" ) or return undef; my $line = first { /UIDNEXT/i } $self->History; defined $line && $line =~ /\(UIDNEXT\s+([^\)]+)/ ? $1 : undef; @@ -2964,6 +2976,7 @@ sub append_file { # $file can be a name or a scalar reference (for in memory file) # avoid IO::File bug handling scalar refs in perl <= 5.8.8? # - buggy: $fh = IO::File->new( $file, 'r' ) + local ($!); open( $fh, "<", $file ) or push( @err, "Unable to open file '$file': $!" ); } @@ -3214,18 +3227,12 @@ sub authenticate { sub copy { my ( $self, $target, @msgs ) = @_; - $target = $self->Massage($target); - @msgs = - $self->Ranges - ? $self->Range(@msgs) - : sort { $a <=> $b } map { ref $_ ? @$_ : split( ',', $_ ) } @msgs; - my $msgs = $self->Ranges ? $self->Range(@msgs) : join ',', map { ref $_ ? @$_ : $_ } @msgs; - $self->_imap_uid_command( COPY => $msgs, $target ) + $self->_imap_uid_command( COPY => $msgs, $self->Massage($target) ) or return undef; my @results = $self->History; diff --git a/W/Mail-IMAPClient-3.32/lib/Mail/IMAPClient.pod b/W/Mail-IMAPClient-3.33/lib/Mail/IMAPClient.pod similarity index 99% rename from W/Mail-IMAPClient-3.32/lib/Mail/IMAPClient.pod rename to W/Mail-IMAPClient-3.33/lib/Mail/IMAPClient.pod index 27a3f43..e3dfe1e 100644 --- a/W/Mail-IMAPClient-3.32/lib/Mail/IMAPClient.pod +++ b/W/Mail-IMAPClient-3.33/lib/Mail/IMAPClient.pod @@ -1818,7 +1818,7 @@ See also C. Example: - my $newUid = $imap->move($newFolder, $oldUid) + my $newUid = $imap->move( $newFolder, $oldUid ) or die "Could not move: $@\n"; $imap->expunge; @@ -1829,15 +1829,15 @@ be either: =over 4 -=item > +=item a) a message sequence number, -=item > +=item b) a comma-separated list of message sequence numbers, or -=item > +=item c) a reference to an array of message sequence numbers. @@ -1847,15 +1847,15 @@ If the L parameter is true, then the arguments should be: =over 4 -=item > +=item a) a message UID, -=item > +=item b) a comma-separated list of message UID's, or -=item > +=item c) a reference to an array of message UID's. @@ -1867,8 +1867,8 @@ If move is successful, then it returns a true value. Furthermore, if the Mail::IMAPClient object is connected to a server that has the UIDPLUS capability, then the true value will be the comma-separated list of UID's for the newly copied messages. The list will be in the -order in which the messages were moved. (Since B uses the copy -method, the messages will be moved in numerical order.) +order in which the messages were moved which should correspond to the +order of the message UID provided by the caller. If the move is not successful then B returns C. @@ -3444,11 +3444,13 @@ fancier authentication method, see L. If an IMAP connection must start TLS/SSL after connecting to a server then set this attribute. If the value is set to an arrayref then they -will be used as arguments to IO::Socket::SSL::start_SSL. By default +will be used as arguments to IO::Socket::SSL->start_SSL. By default this connection is set to blocking while establishing the connection with a timeout of 30 seconds. The socket will be reset to the original blocking/non-blocking value after a successful TLS -negotiation has occured. +negotiation has occured. The arguments used in the call to start_SSL +can be controlled by setting this attribute to an ARRAY reference +containing the desired arguments. Version note: attribute added in Mail::IMAPClient 3.22 @@ -3457,7 +3459,9 @@ Version note: attribute added in Mail::IMAPClient 3.22 If an IMAP connection requires SSL you can set the Ssl attribute to '1' and Mail::IMAPClient will automatically use L instead of L to connect to the server. This -attribute is used in the L method. +attribute is used in the L method. The arguments used in +the call to IO::Socket::SSL->new can be controlled by setting this +attribute to an ARRAY reference containing the desired arguments. See also L for details on connection initiatiation and L and L if you need to take more control of @@ -3870,7 +3874,7 @@ http://rt.cpan.org/Public/Dist/Display.html?Name=Mail-IMAPClient Copyright (C) 1999-2003 The Kernen Group, Inc. Copyright (C) 2007-2009 Mark Overmeer - Copyright (C) 2010-2012 Phil Pearl (Lobbes) + Copyright (C) 2010-2013 Phil Pearl (Lobbes) All rights reserved. This library is free software; you can redistribute it and/or modify diff --git a/W/Mail-IMAPClient-3.32/lib/Mail/IMAPClient/BodyStructure.pm b/W/Mail-IMAPClient-3.33/lib/Mail/IMAPClient/BodyStructure.pm similarity index 100% rename from W/Mail-IMAPClient-3.32/lib/Mail/IMAPClient/BodyStructure.pm rename to W/Mail-IMAPClient-3.33/lib/Mail/IMAPClient/BodyStructure.pm diff --git a/W/Mail-IMAPClient-3.32/lib/Mail/IMAPClient/BodyStructure/Parse.grammar b/W/Mail-IMAPClient-3.33/lib/Mail/IMAPClient/BodyStructure/Parse.grammar similarity index 100% rename from W/Mail-IMAPClient-3.32/lib/Mail/IMAPClient/BodyStructure/Parse.grammar rename to W/Mail-IMAPClient-3.33/lib/Mail/IMAPClient/BodyStructure/Parse.grammar diff --git a/W/Mail-IMAPClient-3.32/lib/Mail/IMAPClient/BodyStructure/Parse.pm b/W/Mail-IMAPClient-3.33/lib/Mail/IMAPClient/BodyStructure/Parse.pm similarity index 100% rename from W/Mail-IMAPClient-3.32/lib/Mail/IMAPClient/BodyStructure/Parse.pm rename to W/Mail-IMAPClient-3.33/lib/Mail/IMAPClient/BodyStructure/Parse.pm diff --git a/W/Mail-IMAPClient-3.32/lib/Mail/IMAPClient/BodyStructure/Parse.pod b/W/Mail-IMAPClient-3.33/lib/Mail/IMAPClient/BodyStructure/Parse.pod similarity index 100% rename from W/Mail-IMAPClient-3.32/lib/Mail/IMAPClient/BodyStructure/Parse.pod rename to W/Mail-IMAPClient-3.33/lib/Mail/IMAPClient/BodyStructure/Parse.pod diff --git a/W/Mail-IMAPClient-3.32/lib/Mail/IMAPClient/MessageSet.pm b/W/Mail-IMAPClient-3.33/lib/Mail/IMAPClient/MessageSet.pm similarity index 100% rename from W/Mail-IMAPClient-3.32/lib/Mail/IMAPClient/MessageSet.pm rename to W/Mail-IMAPClient-3.33/lib/Mail/IMAPClient/MessageSet.pm diff --git a/W/Mail-IMAPClient-3.32/lib/Mail/IMAPClient/Thread.grammar b/W/Mail-IMAPClient-3.33/lib/Mail/IMAPClient/Thread.grammar similarity index 100% rename from W/Mail-IMAPClient-3.32/lib/Mail/IMAPClient/Thread.grammar rename to W/Mail-IMAPClient-3.33/lib/Mail/IMAPClient/Thread.grammar diff --git a/W/Mail-IMAPClient-3.32/lib/Mail/IMAPClient/Thread.pm b/W/Mail-IMAPClient-3.33/lib/Mail/IMAPClient/Thread.pm similarity index 100% rename from W/Mail-IMAPClient-3.32/lib/Mail/IMAPClient/Thread.pm rename to W/Mail-IMAPClient-3.33/lib/Mail/IMAPClient/Thread.pm diff --git a/W/Mail-IMAPClient-3.32/lib/Mail/IMAPClient/Thread.pod b/W/Mail-IMAPClient-3.33/lib/Mail/IMAPClient/Thread.pod similarity index 100% rename from W/Mail-IMAPClient-3.32/lib/Mail/IMAPClient/Thread.pod rename to W/Mail-IMAPClient-3.33/lib/Mail/IMAPClient/Thread.pod diff --git a/W/Mail-IMAPClient-3.32/prepare_dist b/W/Mail-IMAPClient-3.33/prepare_dist similarity index 100% rename from W/Mail-IMAPClient-3.32/prepare_dist rename to W/Mail-IMAPClient-3.33/prepare_dist diff --git a/W/Mail-IMAPClient-3.32/t/basic.t b/W/Mail-IMAPClient-3.33/t/basic.t similarity index 100% rename from W/Mail-IMAPClient-3.32/t/basic.t rename to W/Mail-IMAPClient-3.33/t/basic.t diff --git a/W/Mail-IMAPClient-3.32/t/body_string.t b/W/Mail-IMAPClient-3.33/t/body_string.t similarity index 100% rename from W/Mail-IMAPClient-3.32/t/body_string.t rename to W/Mail-IMAPClient-3.33/t/body_string.t diff --git a/W/Mail-IMAPClient-3.32/t/bodystructure.t b/W/Mail-IMAPClient-3.33/t/bodystructure.t similarity index 100% rename from W/Mail-IMAPClient-3.32/t/bodystructure.t rename to W/Mail-IMAPClient-3.33/t/bodystructure.t diff --git a/W/Mail-IMAPClient-3.32/t/fetch_hash.t b/W/Mail-IMAPClient-3.33/t/fetch_hash.t similarity index 100% rename from W/Mail-IMAPClient-3.32/t/fetch_hash.t rename to W/Mail-IMAPClient-3.33/t/fetch_hash.t diff --git a/W/Mail-IMAPClient-3.32/t/messageset.t b/W/Mail-IMAPClient-3.33/t/messageset.t similarity index 100% rename from W/Mail-IMAPClient-3.32/t/messageset.t rename to W/Mail-IMAPClient-3.33/t/messageset.t diff --git a/W/Mail-IMAPClient-3.32/t/pod.t b/W/Mail-IMAPClient-3.33/t/pod.t similarity index 100% rename from W/Mail-IMAPClient-3.32/t/pod.t rename to W/Mail-IMAPClient-3.33/t/pod.t diff --git a/W/Mail-IMAPClient-3.32/t/simple.t b/W/Mail-IMAPClient-3.33/t/simple.t similarity index 100% rename from W/Mail-IMAPClient-3.32/t/simple.t rename to W/Mail-IMAPClient-3.33/t/simple.t diff --git a/W/Mail-IMAPClient-3.32/t/thread.t b/W/Mail-IMAPClient-3.33/t/thread.t similarity index 100% rename from W/Mail-IMAPClient-3.32/t/thread.t rename to W/Mail-IMAPClient-3.33/t/thread.t diff --git a/W/Mail-IMAPClient-3.32/test_template.txt b/W/Mail-IMAPClient-3.33/test_template.txt similarity index 100% rename from W/Mail-IMAPClient-3.32/test_template.txt rename to W/Mail-IMAPClient-3.33/test_template.txt diff --git a/W/bugs/BUG_219_windows b/W/bugs/BUG_219_windows deleted file mode 100644 index de0e3e5..0000000 --- a/W/bugs/BUG_219_windows +++ /dev/null @@ -1,17 +0,0 @@ - - -Users reported a problem with Windows and the imapsync release 1.219 -To fix the problem try this : - -Near line 1170 there are 2 lines : - -#unless($new_id = $to->append_string($t_fold,$string, $flags_f, $d)){ -unless($new_id = $to->append_file2($t_fold, $message_file, "", $flags_f, $d)){ - -The first is commented with a # character, the second is not. -Remove the # on the first line and add a # at the beginning -of the second line. Run imapsync again and tell me if -your problem is solved. - -This bug is fixed in revision 1.231 - diff --git a/W/bugs/Makefile b/W/bugs/Makefile new file mode 100644 index 0000000..0ef2135 --- /dev/null +++ b/W/bugs/Makefile @@ -0,0 +1,20 @@ + + +all: + @echo "make buid_ssl_exe" + @echo "make test_ssl_exe" + + +check: + perl -I../Mail-IMAPClient-3.33/lib/ -c bug_ssl_win32_1 + perl -I../Mail-IMAPClient-3.33/lib/ -c bug_ssl_win32_2 + +buid_ssl_exe: check + unix2dos *.bat + scp build_test_ssl.bat bug_ssl_win32_?* Admin@c:'C:/msys/1.0/home/Admin/imapsync/' + ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/build_test_ssl.bat' + +test_ssl_exe: check + unix2dos *.bat + scp test_ssl.bat Admin@c:'C:/msys/1.0/home/Admin/imapsync/' + ssh Admin@c 'C:/msys/1.0/home/Admin/imapsync/test_ssl.bat' diff --git a/W/bugs/bug_ssl_win32_1 b/W/bugs/bug_ssl_win32_1 new file mode 100755 index 0000000..be7d4fa --- /dev/null +++ b/W/bugs/bug_ssl_win32_1 @@ -0,0 +1,30 @@ +#!/usr/bin/perl -w + +use Mail::IMAPClient; +use IO::Socket::SSL; + +$ARGV[3] or die "usage: $0 host user password folder\n"; + +$host = $ARGV[0]; +$user = $ARGV[1]; +$password = $ARGV[2]; +$folder = $ARGV[3]; + +my $imap = Mail::IMAPClient->new(); +my $ssl = IO::Socket::SSL->new( + Proto => 'tcp', + PeerAddr => $host, + PeerPort => 993, # IMAP over SSL standard port +); + +$imap->Debug(1); +#$imap->Server($host); +$imap->Socket($ssl); +#$imap->connect() or die; +$imap->User($user); +$imap->Password($password); +$imap->login() or die; +$imap->Uid(1); +$imap->Peek(1); +$imap->select($folder) or die; +$imap->close(); diff --git a/W/bugs/bug_ssl_win32_2 b/W/bugs/bug_ssl_win32_2 new file mode 100755 index 0000000..ad3680b --- /dev/null +++ b/W/bugs/bug_ssl_win32_2 @@ -0,0 +1,44 @@ +#!/usr/bin/perl -w + +# $Id: $ + +use strict ; +use English ; +use Mail::IMAPClient ; +use IO::Socket::SSL ; + +$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] ; + +IO::Socket::SSL::set_ctx_defaults( SSL_verify_mode => 0 ) ; +$IO::Socket::SSL::DEBUG = 3 ; + +printf( "Perl %vd", $PERL_VERSION ) ; +print "\nMail::IMAPClient $Mail::IMAPClient::VERSION \n", +"IO::Socket $IO::Socket::VERSION\n" , +"IO::Socket::INET $IO::Socket::INET::VERSION \n", +"IO::Socket::SSL $IO::Socket::SSL::VERSION \n", +"Net::SSLeay $Net::SSLeay::VERSION \n", +" \n", +; + +my $imap ; + +$imap = Mail::IMAPClient->new( + Server => $host, + User => $user, + Password => $password, + Ssl => 1, + Uid => 1, +) or die( "Connect: ", $imap->LastError, "\n" ) ; + +$imap->Debug( 1 ) ; +$imap->Peek( 1 ) ; +my $folders = $imap->folders ; +$imap->select( $folder ) or die ; +$imap->logout( ) ; + diff --git a/W/bugs/bug_ssl_win32_3_http b/W/bugs/bug_ssl_win32_3_http new file mode 100755 index 0000000..9b9ef13 --- /dev/null +++ b/W/bugs/bug_ssl_win32_3_http @@ -0,0 +1,33 @@ +#!/usr/bin/perl + + +use strict ; +use warnings ; +use English ; +use IO::Socket::SSL ; + +printf( "Perl %vd", $PERL_VERSION ) ; +print +"\nIO::Socket $IO::Socket::VERSION\n" , +"IO::Socket::INET $IO::Socket::INET::VERSION \n", +"IO::Socket::INET6 $IO::Socket::INET6::VERSION \n", +"IO::Socket::SSL $IO::Socket::SSL::VERSION \n", +"Net::SSLeay $Net::SSLeay::VERSION \n", +" \n", +; + + +my $sock = IO::Socket::SSL->new( + # where to connect + PeerHost => "www.google.com", + PeerPort => "https", + + # certificate verification + SSL_verify_mode => SSL_VERIFY_NONE, + SSL_verifycn_schema => 'http', +) or die "failed connect or ssl handshake: $!,$SSL_ERROR"; + +# send and receive over SSL connection +print $sock "GET / HTTP/1.0\r\n\r\n"; +print <$sock>; + diff --git a/W/bugs/build_test_ssl.bat b/W/bugs/build_test_ssl.bat new file mode 100644 index 0000000..35f14bb --- /dev/null +++ b/W/bugs/build_test_ssl.bat @@ -0,0 +1,12 @@ + +REM $Id: $ + +cd /D %~dp0 + +REM pp -o bug_ssl_win32_1.exe bug_ssl_win32_1 + +pp -M IO::Socket::IP -o bug_ssl_win32_2.exe bug_ssl_win32_2 + +REM pp -o bug_ssl_win32_3_http.exe bug_ssl_win32_3_http + + diff --git a/W/bugs/test_ssl.bat b/W/bugs/test_ssl.bat new file mode 100644 index 0000000..d33b630 --- /dev/null +++ b/W/bugs/test_ssl.bat @@ -0,0 +1,13 @@ + +REM $Id: $ + +cd /D %~dp0 + +perl bug_ssl_win32_2 imap.gmail.com imapsync.gl@gmail.com sss INBOX +REM perl bug_ssl_win32_3_http +PAUSE +bug_ssl_win32_2.exe imap.gmail.com imapsync.gl@gmail.com sss INBOX +REM bug_ssl_win32_3_http.exe +PAUSE + + diff --git a/W/build_exe.bat b/W/build_exe.bat deleted file mode 100644 index dba1053..0000000 --- a/W/build_exe.bat +++ /dev/null @@ -1,20 +0,0 @@ - -REM $Id: build_exe.bat,v 1.12 2013/05/06 08:16:26 gilles Exp gilles $ -REM - -echo Building imapsync.exe -cd C:\msys\1.0\home\Admin\imapsync -perl -mMail::IMAPClient -mIO::Socket -mIO::Socket::SSL ^ - -mDigest::MD5 -mDigest::HMAC_MD5 -mDigest::HMAC_SHA1 ^ - -mTerm::ReadKey -mFile::Spec -mAuthen::NTLM ^ - -mTime::Local -mURI::Escape -mData::Uniqid^ - -e '' - -pp -o imapsync.exe --link libeay32_.dll --link libssl32_.dll ^ - -M Mail::IMAPClient -M IO::Socket -M IO::Socket::SSL ^ - -M Digest::MD5 -M Digest::HMAC_MD5 -M Digest::HMAC_SHA1 ^ - -M Term::ReadKey -M Authen::NTLM ^ - -M Time::Local -M URI::Escape -M Data::Uniqid ^ - imapsync - -echo Done building imapsync.exe diff --git a/W/memo b/W/memo index e0307c0..2b3c3e9 100644 --- a/W/memo +++ b/W/memo @@ -1,6 +1,31 @@ #!/bin/sh -# $Id: memo,v 1.43 2012/12/24 02:25:00 gilles Exp gilles $ +# $Id: memo,v 1.44 2013/07/03 04:14:44 gilles Exp gilles $ + +count_nice() { + + #set -x + # count # prints 01 02 03 04 05 06 07 08 09 10 + # count 2 # prints 2 3 4 5 6 7 8 9 10 11 + # count 005 # prints 005 006 007 008 009 010 011 012 013 014 + # count 5 23 # prints 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 + # count 5 23 3 # prints 5 8 11 14 17 20 23 + + nb_from=${1:-"01"} + nb_from_ln=`expr length $nb_from` + + nb_to=${2:-`expr $nb_from + 9`} + nb_incr=${3:-"1"} + nb_counter=$nb_from + while test $nb_counter -le $nb_to;do + nb_list="$nb_list $nb_counter" + nb_counter=`expr $nb_counter + $nb_incr` + nb_counter=`printf %0${nb_from_ln}d $nb_counter` + done + echo $nb_list + #set +x +} + software_version() { @@ -144,6 +169,14 @@ statistics_VERSION_yearly_ip() { ) } +statistics_VERSION_yearly_runs() { + year=${1:-`date '+%Y'`} + ( + cd /home/lf/glamiral/imapsync_stats + test -f stats_imapsync_${year}.ip && cat stats_imapsync_${year}.ip | awk '{ sum+=$1 } END {print sum}' + ) +} + echo "statistics_VERSION_synthesis 2012 # short" statistics_VERSION_synthesis() { @@ -152,16 +185,19 @@ statistics_VERSION_synthesis() { cd /home/lf/glamiral/imapsync_stats echo Nb users each month wc -l stats_imapsync_${year}_??.ip - echo Nb users each year - wc -l stats_imapsync_????.ip echo Nb runs each month tail -n 1 stats_imapsync_${year}_??.runs echo % Operating systems statistics_VERSION_yearly_os $year echo Biggest users tail -n 5 stats_imapsync_${year}.ip - echo -n "Nb runs each year : " - cat stats_imapsync_${year}.ip | awk '{ sum+=$1 } END {print sum}' + echo Nb users each year + wc -l stats_imapsync_????.ip + echo "Nb runs each year : " + for yyyy in `count_nice 2011 ${year}`; do + echo -n "$yyyy: " + statistics_VERSION_yearly_runs $yyyy + done ) } @@ -289,6 +325,16 @@ statistics_VERSION_yearly_ip() { ) } +statistics_VERSION_yearly_runs() { + year=${1:-`date '+%Y'`} + ( + cd /home/imapsync/imapsync_stats + test -f stats_imapsync_${year}.ip && cat stats_imapsync_${year}.ip | awk '{ sum+=$1 } END {print sum}' + ) +} + + + echo "statistics_VERSION_synthesis 2012 # short" statistics_VERSION_synthesis() { year=${1:-`date '+%Y'`} @@ -296,16 +342,19 @@ statistics_VERSION_synthesis() { cd /home/imapsync/imapsync_stats echo Nb users each month wc -l stats_imapsync_${year}_??.ip - echo Nb users each year - wc -l stats_imapsync_????.ip echo Nb runs each month tail -n 1 stats_imapsync_${year}_??.runs echo % Operating systems statistics_VERSION_yearly_os $year echo Biggest users tail -n 5 stats_imapsync_${year}.ip - echo -n "Nb runs each year : " - cat stats_imapsync_${year}.ip | awk '{ sum+=$1 } END {print sum}' + echo Nb users each year + wc -l stats_imapsync_????.ip + echo "Nb runs each year : " + for yyyy in `count_nice 2011 ${year}`; do + echo -n "$yyyy: " + statistics_VERSION_yearly_runs $yyyy + done ) } diff --git a/W/paypal_reply/paypal_bilan b/W/paypal_reply/paypal_bilan index 1cba7b7..1187e88 100755 --- a/W/paypal_reply/paypal_bilan +++ b/W/paypal_reply/paypal_bilan @@ -1,6 +1,6 @@ #!/usr/bin/perl -# $Id: paypal_bilan,v 1.66 2013/03/26 19:50:20 gilles Exp gilles $ +# $Id: paypal_bilan,v 1.68 2013/06/07 06:59:41 gilles Exp gilles $ use strict; use warnings; @@ -13,7 +13,7 @@ use Test::More 'no_plan' ; die unless (utf8_supported_charset('ISO-8859-1')); -my $rcs = '$Id: paypal_bilan,v 1.66 2013/03/26 19:50:20 gilles Exp gilles $ ' ; +my $rcs = '$Id: paypal_bilan,v 1.68 2013/06/07 06:59:41 gilles Exp gilles $ ' ; $rcs =~ m/,v (\d+\.\d+)/ ; my $VERSION = ($1) ? $1: "UNKNOWN" ; @@ -813,6 +813,9 @@ Hello $name, First of all, I'm sorry for the delay in getting back to you. +Last imapsync release is available from the page +http://imapsync.lamiral.info/paypal_return.shtml + You'll find in the attachment the invoice of imapsync software you bought and paid (dd/mm/yyyy $date). The invoice file is named facture_imapsync-${invoice}.pdf @@ -851,6 +854,9 @@ Hello $name, First of all, I'm sorry for the delay in getting back to you. +Last imapsync release is available from the page +http://imapsync.lamiral.info/paypal_return.shtml + You'll find in the attachment the invoice of imapsync support you bought and paid (dd/mm/yyyy $date). The invoice file is named facture_imapsync-${invoice}.pdf diff --git a/W/paypal_reply/paypal_build_invoices b/W/paypal_reply/paypal_build_invoices index eba61c7..85fa826 100755 --- a/W/paypal_reply/paypal_build_invoices +++ b/W/paypal_reply/paypal_build_invoices @@ -1,6 +1,6 @@ #!/bin/sh -# $Id: paypal_build_invoices,v 1.49 2013/04/17 14:16:05 gilles Exp gilles $ +# $Id: paypal_build_invoices,v 1.53 2013/06/10 14:33:30 gilles Exp gilles $ # usage: sh paypal_build_invoices /g/var/paypal_invoices/???? @@ -36,7 +36,9 @@ 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 2299 /g/paypal/paypal_2013_01_complet.csv #/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 2384 /g/paypal/paypal_2013_02_complet.csv #/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 2451 /g/paypal/paypal_2013_03_complet.csv -/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 2519 /g/paypal/paypal_2013_04_complet.csv +#/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 2519 /g/paypal/paypal_2013_04_complet.csv +#/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 2572 /g/paypal/paypal_2013_05_complet.csv +/g/public_html/imapsync/W/paypal_reply/paypal_bilan --write_invoices --first_in 2627 /g/paypal/paypal_2013_06_complet.csv : /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 147 /g/paypal/paypal_2010_11_complet.csv : /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 214 /g/paypal/paypal_2010_12_complet.csv @@ -67,19 +69,22 @@ 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 2299 /g/paypal/paypal_2013_01_complet.csv : /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 2384 /g/paypal/paypal_2013_02_complet.csv : /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 2451 /g/paypal/paypal_2013_03_complet.csv -set -x : /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 2519 /g/paypal/paypal_2013_04_complet.csv +: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 2572 /g/paypal/paypal_2013_05_complet.csv + +set -x +: /g/public_html/imapsync/W/paypal_reply/paypal_bilan --first_in 2627 /g/paypal/paypal_2013_06_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 2295 2296 2297 2298' \ + --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 2625 2626 ' \ /g/paypal/paypal_201?_??_complet.csv 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' \ + --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 2625 2626 ' \ /g/paypal/paypal_201?_??_complet.csv set +v diff --git a/W/test3.bat b/W/test3.bat new file mode 100644 index 0000000..99e1bef --- /dev/null +++ b/W/test3.bat @@ -0,0 +1,16 @@ + +REM $Id: test3.bat,v 1.2 2013/05/22 10:09:27 gilles Exp gilles $ + +cd /D %~dp0 + +REM ./imapsync.exe --modules_version + +perl .\imapsync --host1 imap.gmail.com --ssl1 --user1 gilles.lamiral@gmail.com --passfile1 secret.gilles_gmail ^ + --host2 imap.gmail.com --ssl2 --user2 gilles.lamiral@gmail.com --passfile2 secret.gilles_gmail ^ + --folder INBOX --dry + +PAUSE + +.\imapsync.exe --host1 imap.gmail.com --ssl1 --user1 gilles.lamiral@gmail.com --passfile1 secret.gilles_gmail ^ + --host2 imap.gmail.com --ssl2 --user2 gilles.lamiral@gmail.com --passfile2 secret.gilles_gmail ^ + --folder INBOX --dry diff --git a/build_exe.bat b/build_exe.bat new file mode 100644 index 0000000..bfc98a7 --- /dev/null +++ b/build_exe.bat @@ -0,0 +1,29 @@ + +REM $Id: build_exe.bat,v 1.17 2013/07/03 04:13:30 gilles Exp gilles $ +@ECHO OFF + +ECHO Building imapsync.exe + +CALL .\examples\install_modules.bat + +cd /D %~dp0 + +perl -mMail::IMAPClient -mIO::Socket -mIO::Socket::SSL ^ + -mDigest::MD5 -mDigest::HMAC_MD5 -mDigest::HMAC_SHA1 ^ + -mTerm::ReadKey -mFile::Spec -mAuthen::NTLM ^ + -mTime::Local -mURI::Escape -mData::Uniqid ^ + -e '' + +cd +@ECHO ON +pp -o imapsync.exe ^ + --link libeay32_.dll --link libssl32_.dll ^ + --link zlib1_.dll --link ssleay32_.dll ^ + -M Mail::IMAPClient -M IO::Socket -M IO::Socket::IP -M IO::Socket::SSL -M IO::Socket::INET ^ + -M Digest::MD5 -M Digest::HMAC_MD5 -M Digest::HMAC_SHA1 ^ + -M Term::ReadKey -M Authen::NTLM ^ + -M Time::Local -M URI::Escape -M Data::Uniqid ^ + imapsync + +echo Done building imapsync.exe +pause diff --git a/examples/install_modules.bat b/examples/install_modules.bat index 64b4518..880ca6d 100644 --- a/examples/install_modules.bat +++ b/examples/install_modules.bat @@ -1,30 +1,31 @@ -REM $Id: install_modules.bat,v 1.2 2013/05/06 08:26:39 gilles Exp gilles $ -REM hi +REM $Id: install_modules.bat,v 1.5 2013/07/03 12:00:23 gilles Exp gilles $ + +@ECHO OFF ECHO Installing Perl modules for imapsync -CD C:\msys\1.0\home\Admin\imapsync +REM CD /D %~dp0 -perl -mMail::IMAPClient -e "" -IF ERRORLEVEL 0 GOTO install_01 -perl -MCPAN -e "install Mail::IMAPClient" +perl -v +IF ERRORLEVEL 1 ECHO Perl needed. Install Strawberry Perl. Get it at http://strawberryperl.com/ ^ + && EXIT /B -:install_01 +REM perl is there -FOR %%M in ( Mail::IMAPClient ^ - IO::Socket IO::Socket::SSL ^ +FOR %%M in ( IO::Socket ^ + Net::SSLeay IO::Socket::SSL ^ Digest::MD5 Digest::HMAC_MD5 ^ Term::ReadKey File::Spec ^ Time::HiRes ^ Data::Uniqid URI::Escape ^ Authen::NTLM ^ Time::Local ^ + Mail::IMAPClient ^ PAR::Packer ) DO ECHO Testing %%M ^ & perl -m%%M -e "" || perl -MCPAN -e "install %%M" ECHO Perl modules for imapsync installed - -PAUSE +REM PAUSE diff --git a/i3 b/i3 index 9b8ef62..ef71c6c 100755 --- a/i3 +++ b/i3 @@ -1,7 +1,7 @@ #!/bin/sh -# $Id: i3,v 1.11 2012/09/11 21:00:06 gilles Exp gilles $ +# $Id: i3,v 1.12 2013/07/03 04:11:35 gilles Exp gilles $ BASE=`dirname $0` -perl -I${BASE}/W/Mail-IMAPClient-3.32/lib ${BASE}/imapsync "$@" +perl -I${BASE}/W/Mail-IMAPClient-3.33/lib ${BASE}/imapsync "$@" diff --git a/imapsync b/imapsync index e80b13f..a4f3e6e 100755 --- a/imapsync +++ b/imapsync @@ -11,6 +11,8 @@ # IMAPClient 2.2.9 overrides # IMAPClient 2.2.9 3.xx ads +# pod documentation + =pod =head1 NAME @@ -20,7 +22,7 @@ Synchronises mailboxes between two imap servers. Good at IMAP migration. More than 52 different IMAP server softwares supported with success, few failures. -$Revision: 1.542 $ +$Revision: 1.547 $ =head1 SYNOPSIS @@ -365,7 +367,7 @@ Failure stories reported with the following 3 imap servers: - Hotmail since hotmail.com does not provide IMAP access - Outlook.com since outlook.com does not provide IMAP access -Success stories reported with the following 52 imap servers +Success stories reported with the following 53 imap servers (software names are in alphabetic order): - 1und1 H mimap1 84498 [host1] H mibap4 95231 [host1] @@ -388,6 +390,7 @@ Success stories reported with the following 52 imap servers - Deerfield VisNetic MailServer 5.8.6 [host1] (http://www.deerfield.net/products/visnetic-mailserver/) - DBMail 1.2.1, 2.0.4, 2.0.9, 2.2rc1 (GPL) (http://www.dbmail.org/). 2.0.7 seems buggy. + - DBOX 2.41 System [host1] (http://www.dbox.handshake.de/). - Deerfield VisNetic MailServer 5.8.6 [host1] - dkimap4 [host1] - Domino (Notes) 4.61[host1], 6.5[host1], 5.0.6, 5.0.7, 7.0.2, 6.0.2CF1, @@ -401,7 +404,7 @@ Success stories reported with the following 52 imap servers - hMailServer 5.3.3 [host2], 4.4.1 [host1] (see FAQ) - iPlanet Messaging server 4.15, 5.1, 5.2 - IMail 7.15 (Ipswitch/Win2003), 8.12, 11.03 [host1] - - Kerio 7.2.0 Patch 1 [host1] [host2] + - Kerio 7.2.0 Patch 1 [host12], Kerio 8 [host1] - Mail2World IMAP4 Server 2.5 [host1] (http://www.mail2world.com/) - MailEnable 4.23 [host1] [host2], 4.26 [host1][host2], 5 [host1] - MDaemon 7.0.1, 8.0.2, 8.1, 9.5.4 (Windows server 2003 R2 platform), @@ -531,7 +534,7 @@ Entries for imapsync: Feedback (good or bad) will often be welcome. -$Id: imapsync,v 1.542 2013/05/06 08:30:35 gilles Exp gilles $ +$Id: imapsync,v 1.547 2013/07/03 01:24:34 gilles Exp gilles $ =cut @@ -543,7 +546,7 @@ use warnings; ++$|; use Carp; use Getopt::Long; -use Mail::IMAPClient; +use Mail::IMAPClient 3.29 ; use Digest::MD5 qw( md5 md5_hex md5_base64 ); use Digest::HMAC_SHA1 qw( hmac_sha1 ) ; #use Term::ReadKey; @@ -662,7 +665,7 @@ my( # global variables initialisation -$rcs = '$Id: imapsync,v 1.542 2013/05/06 08:30:35 gilles Exp gilles $ '; +$rcs = '$Id: imapsync,v 1.547 2013/07/03 01:24:34 gilles Exp gilles $ '; $total_bytes_transferred = 0; $total_bytes_skipped = 0; @@ -784,7 +787,7 @@ check_lib_version() or exit_clean(0) if ($justbanner); -# By default, 1000 at a time, not more. +# By default, 100 at a time, not more. $split1 ||= 100; $split2 ||= 100; @@ -1773,12 +1776,18 @@ sub modules_VERSION { eval { require IO::Socket; $v = $IO::Socket::VERSION } or $v = "?" ; push ( @list_version, module_version_str( 'IO::Socket', $v ) ) ; + eval { require IO::Socket::IP; $v = $IO::Socket::IP::VERSION } or $v = "?" ; + push ( @list_version, module_version_str( 'IO::Socket::IP', $v ) ) ; + eval { require IO::Socket::INET; $v = $IO::Socket::INET::VERSION } or $v = "?" ; push ( @list_version, module_version_str( 'IO::Socket::INET', $v ) ) ; eval { require IO::Socket::SSL ; $v = $IO::Socket::SSL::VERSION } or $v = "?" ; push ( @list_version, module_version_str( 'IO::Socket::SSL ', $v ) ) ; + eval { require Net::SSLeay ; $v = $Net::SSLeay::VERSION } or $v = "?" ; + push ( @list_version, module_version_str( 'Net::SSLeay ', $v ) ) ; + eval { require Digest::MD5; $v = $Digest::MD5::VERSION } or $v = "?" ; push ( @list_version, module_version_str( 'Digest::MD5', $v ) ) ; @@ -1869,95 +1878,6 @@ sub catch_continue { print "\nGot a SIG$signame!\n" ; } -sub myconnect { - my $self = shift; - - $debug and print "Entering myconnect\n"; - %$self = (%$self, @_); - - my $sock = (($self->Ssl) ? IO::Socket::SSL->new : IO::Socket::INET->new); - my $dp = ($self->Ssl ? 'imaps(993)' : 'imap(143)'); - - $debug and print "Calling configure\n"; - my $ret = $sock->configure({ - PeerAddr => $self->Server , - PeerPort => $self->Port||$dp , - Proto => 'tcp' , - Timeout => $self->Timeout||0 , - Debug => $self->Debug , - }); - unless ( defined($ret) ) { - $self->LastError( "$@\n"); - $@ = "$@"; - carp "$@" - unless defined wantarray; - return ; - } - $sock->autoflush(1); - - my $banner = $sock->getline(); - $debug and print "Read: $banner"; - - $self->Banner($banner); - $self->RawSocket2($sock); - $self->State(Connected); - if (defined($banner) and $banner =~ /\* PREAUTH/) - { - $self->State(Authenticated); - } - if ($self->Tls) { - starttls($self); - $self->Starttls( 1 ) ; - } - - $self->Ignoresizeerrors($allowsizemismatch); - - if ($self->User and $self->Password) { - $debug and print "Calling login\n"; - return $self->login ; - } - else { - return $self; - } -} - - - - -sub starttls { - my $self = shift; - my $socket = $self->RawSocket2(); - - $debug and print "Entering starttls\n"; - unless ($self->has_capability("STARTTLS")) { - die_clean( "No STARTTLS capability" ); - } - - print $socket "z00 STARTTLS\015\012"; - CORE::select( undef, undef, undef, 0.025 ); - my $txt = $socket->getline(); - $debug and print "Read tls: $txt"; - unless($txt =~ /^z00 OK/){ - die_clean( "Invalid response for STARTTLS: $txt\n" ); - } - $debug and print "Calling start_SSL\n"; - unless(IO::Socket::SSL->start_SSL($socket, - { - SSL_version => "TLSV1", - SSL_startHandshake => 1, - SSL_verify_depth => 1, - })) - { - die_clean( "Couldn't start TLS: ".IO::Socket::SSL::errstr()."\n"); - } - if (ref($socket) ne "IO::Socket::SSL") { - die_clean( "Socket has NOT been converted to SSL"); - }else{ - $debug and print "Socket successfuly converted to SSL\n"; - } - $debug and print "Ending starttls\n"; -} - sub connect_imap { @@ -1968,9 +1888,14 @@ sub connect_imap { $imap->Server($host); $imap->Port($port); $imap->Debug($debugimap); - #$imap->connect() - myconnect($imap) + $imap->connect() or die_clean("Can not open imap connection on [$host]: $@\n"); + #myconnect($imap) + # or die_clean("Can not open imap connection on [$host]: $@\n"); + my $banner = $imap->Results()->[0] ; + $imap->Banner( $banner ) ; + $imap->starttls( ) if ( $imap->Tls( ) ) ; + return( $imap ) ; } sub justconnect { @@ -2053,8 +1978,7 @@ sub login_imap { $imap->Reconnectretry($reconnectretry) if ($reconnectretry); - #$imap->connect() - myconnect($imap) + $imap->connect() or die_clean("Failure: can not open imap connection on [$host] with user [$user]: $@\n"); print "Banner: ", server_banner($imap); @@ -2067,7 +1991,11 @@ sub login_imap { die_clean( "Failure: error login on [$host] with user [$user] auth [PREAUTH]" ) ; } } - + + $imap->starttls( ) if ( $imap->Tls( ) ) ; + + $imap->Ignoresizeerrors( $allowsizemismatch ) ; + if ($imap->has_capability("AUTH=$authmech") or $imap->has_capability($authmech) ) { @@ -2093,17 +2021,14 @@ sub login_imap { $imap->Authcallback(\&plainauth) if $authmech eq "PLAIN"; - if ($proxyauth) { - $imap->User($authuser); - $imap->Domain($domain) if (defined($domain)); - $imap->Authuser($authuser); - $imap->Password($password); - } else { - $imap->User($user); - $imap->Domain($domain) if (defined($domain)); - $imap->Authuser($authuser); - $imap->Password($password); - } + if ($proxyauth) { + $imap->User($authuser) ; + } else { + $imap->User($user) ; + } + $imap->Domain($domain) if (defined($domain)); + $imap->Authuser($authuser); + $imap->Password($password); unless ( $authmech eq 'PREAUTH' or $imap->login( ) ) { my $info = "Failure: error login on [$host] with user [$user] auth" ; @@ -2120,11 +2045,20 @@ sub login_imap { $imap->login() or die_clean("$info [LOGIN]: ", $imap->LastError, "\n") ; } - $proxyauth && $imap->proxyauth($user); - $split and $imap->Split( $split ) ; + + if ( $proxyauth ) { + if ( ! $imap->proxyauth( $user ) ) { + my $info = "Failure: error doing proxyauth as user [$user] on [$host] using proxy-login as [$authuser]" ; + my $einfo = $imap->LastError || @{$imap->History}[-1] ; + chomp( $einfo ) ; + die_clean( "$info: $einfo\n" ) ; + } + } + + $split and $imap->Maxcommandlength( 10 * $split ) ; - print "Info: success login on [$host] with user [$user] auth [$authmech]\n"; - return($imap); + print "Info: success login on [$host] with user [$user] auth [$authmech]\n" ; + return( $imap ) ; } @@ -2221,8 +2155,8 @@ sub banner_imapsync { my @argv_copy = @_; my $banner_imapsync = join("", '$RCSfile: imapsync,v $ ', - '$Revision: 1.542 $ ', - '$Date: 2013/05/06 08:30:35 $ ', + '$Revision: 1.547 $ ', + '$Date: 2013/07/03 01:24:34 $ ', "\n",localhost_info(), "\n", "Command line used:\n", "$0 ", command_line_nopassword(@argv_copy), "\n", @@ -3105,7 +3039,7 @@ sub copy_message { # copy my ( $h1_msg, $h1_fold, $h2_fold, $h1_fir_ref, $permanentflags2, $cache_dir ) = @_ ; - $debug and print "msg $h1_fold/$h1_msg copying to $h2_fold\n"; + ( $debug or $dry) and print "msg $h1_fold/$h1_msg copying to $h2_fold $dry_message\n"; my $h1_size = $h1_fir_ref->{$h1_msg}->{"RFC822.SIZE"} || '' ; my $h1_flags = $h1_fir_ref->{$h1_msg}->{"FLAGS"} || '' ; @@ -4078,7 +4012,13 @@ sub get_options { sub load_modules { - require IO::Socket::SSL if ($ssl1 or $ssl2 or $tls1 or $tls2); + if ( $ssl1 or $ssl2 or $tls1 or $tls2 ) { + require IO::Socket::SSL ; + #$IO::Socket::SSL::DEBUG = 3 ; + IO::Socket::SSL::set_ctx_defaults( + SSL_verify_mode => 0, + ); + } require Term::ReadKey if ( ((not($password1 or $passfile1)) @@ -4238,7 +4178,7 @@ sub check_last_release { } sub imapsync_version { - my $rcs = '$Id: imapsync,v 1.542 2013/05/06 08:30:35 gilles Exp gilles $ '; + my $rcs = '$Id: imapsync,v 1.547 2013/07/03 01:24:34 gilles Exp gilles $ '; $rcs =~ m/,v (\d+\.\d+)/; my $VERSION = ($1) ? $1: "UNKNOWN"; return($VERSION); @@ -5122,16 +5062,6 @@ sub tests { package Mail::IMAPClient; -sub Split { - my $self = shift; - - if (@_) { - $self->{SPLIT} = shift; - $self->{Maxcommandlength} = 10 * $self->{SPLIT}; - } - return $self->{SPLIT}; -} - sub Tls { my $self = shift; @@ -5154,19 +5084,6 @@ sub Banner { return $self->{BANNER}; } - -sub RawSocket2 { - my ( $self, $sock ) = @_; - defined $sock - or return $self->{Socket}; - - $self->{Socket} = $sock; - $self->{_select} = IO::Select->new($sock); - delete $self->{_fcntl}; - #$self->Fast_io( $self->Fast_io ); - $sock; -} - sub capability_update { my $self = shift; diff --git a/index.shtml b/index.shtml index 2727e8b..923dd9f 100644 --- a/index.shtml +++ b/index.shtml @@ -2,10 +2,10 @@ -Imapsync: an IMAP migration and backup tool ( release <!--#exec cmd="cat ./VERSION"--> ) +Official imapsync migration tool ( release <!--#exec cmd="cat ./VERSION"--> ) - + @@ -44,7 +44,9 @@

What is imapsync?

-The purpose of imapsync is to migrate imap accounts or to backup imap accounts. +The purpose of imapsync is to migrate IMAP accounts or to backup IMAP accounts. +IMAP is one of the three current standard protocols to access mailboxes, +the two other are POP3 and HTTP with webmails (often tied to an IMAP server).

imapsync software is a command line tool that allows incremental and @@ -82,9 +84,9 @@ for bidirectionnal (2 ways) synchronizations.

Facts and figures for 2011 and 2012

    -
  • 3000 to 4000 users per month (34000 users a year)
  • +
  • 4000 to 5000 users per month (34000 users a year)
  • -
  • 5 to 25 millions mailboxes transfers per month, +
  • 6 to 25 millions mailboxes transfers per month, total is 93 millions for 2011, 91 millions for 2012.
  • Operating systems run by imapsync users: @@ -115,7 +117,7 @@ total is 93 millions for 2011, 91 millions for 2012.
  • +
      -
    • 1.542
    • +
    • 1.547 Nothing important except imapsync.exe supports also XOAUTH.
    • +
    • Enhancement: DBOX 2.41 success
    • +
    • Enhancement: Kerio 8 success
    • +
    • Usability: SSL_verify_mode 0 to avoid warning about Man-In-The-Middle.
    • +
    • Usability: Added message "copying message ..." in dry mode.
    • +
    • Bug fix: Applied patch from Jim Klimov to handle proxyauth failures
    • +
    • Bug fix: Fixed binary previous imapsync.exe 1.542 bug with ssl
    • +
    • Refactoring: Removed sub myconnect() RawSocket2() Split() (Hi Phil!)
    • +
    + +
      +
    • 1.542 XOAUTH supported! (Admin Gmail authentication)
    • Enhancement: Added XOAUTH authentication. Thanks to Eduardo Bortoluzzi Junior.
    • Refactoring: Removed old 2.2.9 Mail::IMAPClient patch stuff.
    • Refactoring: Started perlcritic corrections. Left 4 eval at level 5.
    • @@ -588,7 +602,7 @@ I like it.

    Now the long reported success stories list: -52 different imap server softwares supported!
    +53 different imap server softwares supported!
    [host1] means "source server" and [host2] means "destination server":

    @@ -618,6 +632,7 @@ I like it.
  • David Tobit V8. (http://www.tobit.com/)
  • DBMail 1.2.1, 2.0.4, 2.0.9, 2.2rc1 (GPL). 2.0.7 seems buggy. (http://www.dbmail.org/)
  • +
  • DBOX 2.41 System [host1] (http://www.dbox.handshake.de/).
  • Deerfield VisNetic MailServer 5.8.6 [host1] (http://www.deerfield.net/products/visnetic-mailserver/)
  • dkimap4 [host1] ()
  • @@ -743,7 +758,7 @@ alt="Viewable With Any Browser" /> This document last modified on -($Id: index.shtml,v 1.162 2013/05/14 07:46:14 gilles Exp gilles $) +($Id: index.shtml,v 1.169 2013/07/03 02:13:03 gilles Exp gilles $)

    diff --git a/perlcritic.out b/perlcritic.out index daeab63..1f27185 100644 --- a/perlcritic.out +++ b/perlcritic.out @@ -1,20 +1,103 @@ -Expression form of "eval" at line 705, column 2. See page 161 of PBP. (Severity: 5) -Expression form of "eval" at line 1781, column 7. See page 161 of PBP. (Severity: 5) -Expression form of "eval" at line 1783, column 9. See page 161 of PBP. (Severity: 5) -"return" statement with explicit "undef" at line 1875, column 3. See page 199 of PBP. (Severity: 5) -Subroutine prototypes used at line 2112, column 1. See page 194 of PBP. (Severity: 5) -Subroutine prototypes used at line 2122, column 1. See page 194 of PBP. (Severity: 5) -Bareword file handle opened at line 2234, column 2. See pages 202,204 of PBP. (Severity: 5) -Two-argument "open" used at line 2234, column 2. See page 207 of PBP. (Severity: 5) -"return" statement with explicit "undef" at line 2236, column 3. See page 199 of PBP. (Severity: 5) -Expression form of "eval" at line 2619, column 3. See page 161 of PBP. (Severity: 5) -Expression form of "eval" at line 2813, column 3. See page 161 of PBP. (Severity: 5) -"return" statement with explicit "undef" at line 2965, column 17. See page 199 of PBP. (Severity: 5) -Expression form of "eval" at line 3788, column 3. See page 161 of PBP. (Severity: 5) -Bareword file handle opened at line 4144, column 9. See pages 202,204 of PBP. (Severity: 5) -Two-argument "open" used at line 4144, column 9. See page 207 of PBP. (Severity: 5) -Bareword file handle opened at line 4155, column 2. See pages 202,204 of PBP. (Severity: 5) -Two-argument "open" used at line 4155, column 2. See page 207 of PBP. (Severity: 5) -Stricture disabled at line 4265, column 4. See page 429 of PBP. (Severity: 5) -Expression form of "eval" at line 4828, column 43. See page 161 of PBP. (Severity: 5) -Expression form of "eval" at line 4832, column 45. See page 161 of PBP. (Severity: 5) +Pragma "constant" used at line 570, column 1. See page 55 of PBP. (Severity: 4) +Subroutine "EX_USAGE" does not end with "return" at line 709, column 9. See page 197 of PBP. (Severity: 4) +Magic variable "$SIG" should be assigned as "local" at line 719, column 13. See pages 81,82 of PBP. (Severity: 4) +Mixed high and low-precedence booleans at line 838, column 6. See page 70 of PBP. (Severity: 4) +Mixed high and low-precedence booleans at line 843, column 6. See page 70 of PBP. (Severity: 4) +Expression form of "grep" at line 1041, column 26. See page 169 of PBP. (Severity: 4) +Expression form of "grep" at line 1050, column 26. See page 169 of PBP. (Severity: 4) +Expression form of "map" at line 1129, column 28. See page 169 of PBP. (Severity: 4) +Expression form of "map" at line 1130, column 28. See page 169 of PBP. (Severity: 4) +Expression form of "map" at line 1134, column 3. See page 169 of PBP. (Severity: 4) +Expression form of "map" at line 1141, column 3. See page 169 of PBP. (Severity: 4) +Mixed high and low-precedence booleans at line 1192, column 6. See page 70 of PBP. (Severity: 4) +Subroutine "sync_flags" does not end with "return" at line 1625, column 1. See page 197 of PBP. (Severity: 4) +Mixed high and low-precedence booleans at line 1659, column 7. See page 70 of PBP. (Severity: 4) +Mixed high and low-precedence booleans at line 1694, column 14. See page 70 of PBP. (Severity: 4) +Always unpack @_ first at line 1724, column 1. See page 178 of PBP. (Severity: 4) +Subroutine "tests_max" does not end with "return" at line 1730, column 1. See page 197 of PBP. (Severity: 4) +Subroutine "tests_command_line_nopassword" does not end with "return" at line 1840, column 1. See page 197 of PBP. (Severity: 4) +Subroutine "catch_exit" does not end with "return" at line 1869, column 1. See page 197 of PBP. (Severity: 4) +Subroutine "catch_continue" does not end with "return" at line 1876, column 1. See page 197 of PBP. (Severity: 4) +Subroutine "justconnect" does not end with "return" at line 1901, column 1. See page 197 of PBP. (Severity: 4) +Subroutine "relogin1" does not end with "return" at line 1916, column 1. See page 197 of PBP. (Severity: 4) +Subroutine "relogin2" does not end with "return" at line 1927, column 1. See page 197 of PBP. (Severity: 4) +Subroutine "banner_imapsync" does not end with "return" at line 2153, column 1. See page 197 of PBP. (Severity: 4) +Always unpack @_ first at line 2206, column 1. See page 178 of PBP. (Severity: 4) +Subroutine "missing_option" does not end with "return" at line 2211, column 1. See page 197 of PBP. (Severity: 4) +Subroutine "tests_folder_routines" does not end with "return" at line 2276, column 1. See page 197 of PBP. (Severity: 4) +Subroutine "is_requested_folder" does not end with "return" at line 2292, column 1. See page 197 of PBP. (Severity: 4) +Subroutine "tests_compare_lists" does not end with "return" at line 2351, column 1. See page 197 of PBP. (Severity: 4) +Subroutine "get_prefix" does not end with "return" at line 2402, column 1. See page 197 of PBP. (Severity: 4) +Subroutine "get_separator" does not end with "return" at line 2428, column 1. See page 197 of PBP. (Severity: 4) +Always unpack @_ first at line 2491, column 1. See page 178 of PBP. (Severity: 4) +Subroutine "tests_imap2_folder_name" does not end with "return" at line 2506, column 1. See page 197 of PBP. (Severity: 4) +Always unpack @_ first at line 2558, column 1. See page 178 of PBP. (Severity: 4) +Expression form of "eval" at line 2574, column 3. See page 161 of PBP. (Severity: 5) +Subroutine "tests_decompose_regex" does not end with "return" at line 2581, column 1. See page 197 of PBP. (Severity: 4) +Mixed high and low-precedence booleans at line 2613, column 22. See page 70 of PBP. (Severity: 4) +Mixed high and low-precedence booleans at line 2617, column 22. See page 70 of PBP. (Severity: 4) +Subroutine "tests_flags_regex" does not end with "return" at line 2680, column 1. See page 197 of PBP. (Severity: 4) +Expression form of "eval" at line 2787, column 3. See page 161 of PBP. (Severity: 5) +Subroutine "acls_sync" does not end with "return" at line 2794, column 1. See page 197 of PBP. (Severity: 4) +Subroutine "tests_permanentflags" does not end with "return" at line 2817, column 1. See page 197 of PBP. (Severity: 4) +Subroutine "permanentflags" does not end with "return" at line 2833, column 1. See page 197 of PBP. (Severity: 4) +Subroutine "tests_flags_filter" does not end with "return" at line 2848, column 1. See page 197 of PBP. (Severity: 4) +Subroutine "tests_flagsCase" does not end with "return" at line 2885, column 1. See page 197 of PBP. (Severity: 4) +Subroutine "tests_ucsecond" does not end with "return" at line 2908, column 1. See page 197 of PBP. (Severity: 4) +Mixed high and low-precedence booleans at line 2928, column 14. See page 70 of PBP. (Severity: 4) +Mixed high and low-precedence booleans at line 2945, column 22. See page 70 of PBP. (Severity: 4) +Warnings disabled at line 3124, column 4. See page 431 of PBP. (Severity: 4) +Always unpack @_ first at line 3177, column 1. See page 178 of PBP. (Severity: 4) +Subroutine "tests_time_remaining" does not end with "return" at line 3199, column 1. See page 197 of PBP. (Severity: 4) +Subroutine "tests_cache_map" does not end with "return" at line 3250, column 1. See page 197 of PBP. (Severity: 4) +Subroutine "tests_cache_dir_fix" does not end with "return" at line 3294, column 1. See page 197 of PBP. (Severity: 4) +Always unpack @_ first at line 3302, column 1. See page 178 of PBP. (Severity: 4) +Subroutine "tests_get_cache" does not end with "return" at line 3332, column 1. See page 197 of PBP. (Severity: 4) +Mixed high and low-precedence booleans at line 3335, column 8. See page 70 of PBP. (Severity: 4) +Mixed high and low-precedence booleans at line 3384, column 8. See page 70 of PBP. (Severity: 4) +Subroutine "tests_match_a_cache_file" does not end with "return" at line 3433, column 1. See page 197 of PBP. (Severity: 4) +Mixed high and low-precedence booleans at line 3475, column 3. See page 70 of PBP. (Severity: 4) +Subroutine "tests_clean_cache" does not end with "return" at line 3492, column 1. See page 197 of PBP. (Severity: 4) +Mixed high and low-precedence booleans at line 3494, column 8. See page 70 of PBP. (Severity: 4) +Subroutine "tests_clean_cache_2" does not end with "return" at line 3542, column 1. See page 197 of PBP. (Severity: 4) +Mixed high and low-precedence booleans at line 3544, column 8. See page 70 of PBP. (Severity: 4) +Subroutine "tests_mkpath" does not end with "return" at line 3598, column 1. See page 197 of PBP. (Severity: 4) +Subroutine "tests_touch" does not end with "return" at line 3606, column 1. See page 197 of PBP. (Severity: 4) +Subroutine "new" called using indirect syntax at line 3623, column 13. See page 349 of PBP. (Severity: 4) +Subroutine "tests_cache_folder" does not end with "return" at line 3634, column 1. See page 197 of PBP. (Severity: 4) +Subroutine "tests_filter_forbidden_characters" does not end with "return" at line 3664, column 1. See page 197 of PBP. (Severity: 4) +Subroutine "tests_convert_sep_to_slash" does not end with "return" at line 3681, column 1. See page 197 of PBP. (Severity: 4) +Subroutine "tests_regexmess" does not end with "return" at line 3693, column 1. See page 197 of PBP. (Severity: 4) +Expression form of "eval" at line 3762, column 3. See page 161 of PBP. (Severity: 5) +Subroutine "stats" does not end with "return" at line 3785, column 1. See page 197 of PBP. (Severity: 4) +Subroutine "get_options" does not end with "return" at line 3853, column 1. See page 197 of PBP. (Severity: 4) +Mixed high and low-precedence booleans at line 4005, column 30. See page 70 of PBP. (Severity: 4) +Subroutine "load_modules" does not end with "return" at line 4013, column 1. See page 197 of PBP. (Severity: 4) +Subroutine "parse_header_msg" does not end with "return" at line 4033, column 1. See page 197 of PBP. (Severity: 4) +Mixed high and low-precedence booleans at line 4058, column 27. See page 70 of PBP. (Severity: 4) +Subroutine "string_to_file" does not end with "return" at line 4142, column 1. See page 197 of PBP. (Severity: 4) +Subroutine "tests_is_a_release_number" does not end with "return" at line 4149, column 1. See page 197 of PBP. (Severity: 4) +Subroutine "is_a_release_number" does not end with "return" at line 4157, column 1. See page 197 of PBP. (Severity: 4) +Subroutine "tests_imapsync_basename" does not end with "return" at line 4187, column 1. See page 197 of PBP. (Severity: 4) +Subroutine "new" called using indirect syntax at line 4207, column 13. See page 349 of PBP. (Severity: 4) +Subroutine "usage" does not end with "return" at line 4281, column 1. See page 197 of PBP. (Severity: 4) +Subroutine "usage_complete" does not end with "return" at line 4495, column 1. See page 197 of PBP. (Severity: 4) +Always unpack @_ first at line 4524, column 1. See page 178 of PBP. (Severity: 4) +Subroutine "memory_consumption_of_pids" does not end with "return" at line 4524, column 1. See page 197 of PBP. (Severity: 4) +Subroutine "tests_remove_not_num" does not end with "return" at line 4581, column 1. See page 197 of PBP. (Severity: 4) +Subroutine "tests_memory_consumption" does not end with "return" at line 4615, column 1. See page 197 of PBP. (Severity: 4) +Subroutine "tests_good_date" does not end with "return" at line 4731, column 1. See page 197 of PBP. (Severity: 4) +Subroutine "tests_list_keys_in_2_not_in_1" does not end with "return" at line 4764, column 1. See page 197 of PBP. (Severity: 4) +Subroutine "delete_folders_in_2_not_in_1" does not end with "return" at line 4801, column 1. See page 197 of PBP. (Severity: 4) +Expression form of "eval" at line 4806, column 43. See page 161 of PBP. (Severity: 5) +Expression form of "eval" at line 4810, column 45. See page 161 of PBP. (Severity: 5) +Subroutine "tests_extract_header" does not end with "return" at line 4834, column 1. See page 197 of PBP. (Severity: 4) +Subroutine "tests_decompose_header" does not end with "return" at line 4879, column 1. See page 197 of PBP. (Severity: 4) +Subroutine "tests_epoch" does not end with "return" at line 4991, column 1. See page 197 of PBP. (Severity: 4) +Subroutine "tests_add_header" does not end with "return" at line 5005, column 1. See page 197 of PBP. (Severity: 4) +Subroutine "tests_debug" does not end with "return" at line 5012, column 1. See page 197 of PBP. (Severity: 4) +Subroutine "tests" does not end with "return" at line 5020, column 1. See page 197 of PBP. (Severity: 4) +Always unpack @_ first at line 5065, column 1. See page 178 of PBP. (Severity: 4) +Always unpack @_ first at line 5072, column 1. See page 178 of PBP. (Severity: 4) +Always unpack @_ first at line 5080, column 1. See page 178 of PBP. (Severity: 4) +Subroutine "capability_update" does not end with "return" at line 5087, column 1. See page 197 of PBP. (Severity: 4) diff --git a/tests.sh b/tests.sh index 4a19725..82e379d 100644 --- a/tests.sh +++ b/tests.sh @@ -1,9 +1,9 @@ #!/bin/sh -# $Id: tests.sh,v 1.218 2013/05/06 08:36:38 gilles Exp gilles $ +# $Id: tests.sh,v 1.219 2013/07/03 04:12:34 gilles Exp gilles $ # Example 1: -# CMD_PERL='perl -I./Mail-IMAPClient-3.32/lib' sh -x tests.sh +# CMD_PERL='perl -I./Mail-IMAPClient-3.33/lib' sh -x tests.sh # Example 2: # To select which Mail-IMAPClient within arguments: @@ -23,7 +23,7 @@ echo HOST2=$HOST2 # few debugging tests use: CMD_PERL_2xx='perl -I./W/Mail-IMAPClient-2.2.9' -CMD_PERL_3xx='perl -I./W/Mail-IMAPClient-3.32/lib' +CMD_PERL_3xx='perl -I./W/Mail-IMAPClient-3.33/lib' CMD_PERL=${CMD_PERL:-$CMD_PERL_3xx} @@ -1608,7 +1608,7 @@ ll_tls_justconnect() { --host1 $HOST1 \ --host2 $HOST2 \ --tls1 --tls2 \ - --justconnect --debug + --justconnect --debugimap } ll_tls_justlogin() { @@ -1618,14 +1618,13 @@ ll_tls_justlogin() { --host2 $HOST2 --user2 titi \ --passfile2 ../../var/pass/secret.titi \ --tls1 --tls2 \ - --justlogin --debug + --justlogin --debugimap } - ll_tls_devel() { - CMD_PERL=$CMD_PERL_3xx ll_justlogin ll_ssl_justlogin \ -&& CMD_PERL=$CMD_PERL_3xx ll_tls_justconnect ll_tls_justlogin + ll_justlogin ll_ssl_justlogin \ +&& ll_tls_justconnect ll_tls_justlogin } ll_tls() { @@ -1634,11 +1633,10 @@ ll_tls() { --passfile1 ../../var/pass/secret.tata \ --host2 $HOST2 --user2 titi \ --passfile2 ../../var/pass/secret.titi \ - --tls1 --tls2 + --tls1 --tls2 } - ll_ssl_justconnect() { $CMD_PERL ./imapsync \ --host1 $HOST1 \ @@ -1647,6 +1645,21 @@ ll_ssl_justconnect() { --justconnect } +ll_ssl_tls_justconnect() { + $CMD_PERL ./imapsync \ + --host1 $HOST1 \ + --host2 $HOST2 \ + --ssl1 --tls1 --ssl2 --tls2 \ + --justconnect --debugimap +} + + +ll_justconnect_devel() { + ll_justconnect && ll_tls_justconnect && ll_ssl_justconnect && ll_ssl_tls_justconnect +} + + + ll_ssl_justlogin() { $CMD_PERL ./imapsync \ --host1 $HOST1 --user1 tata \ @@ -1663,10 +1676,14 @@ ll_ssl_tls_justlogin() { --passfile1 ../../var/pass/secret.tata \ --host2 $HOST2 --user2 titi \ --passfile2 ../../var/pass/secret.titi \ - --tls1 --ssl2 --tls2 \ + --ssl1 --tls1 --ssl2 --tls2 \ --justlogin --debug } +ll_justlogin_devel() { + ll_justlogin && ll_ssl_justlogin && ll_tls_justlogin && ll_ssl_tls_justlogin +} + ll_ssl() { if can_send; then #echo3 Here is plume