From ec6a0c4d014f9dfc480d60f762ae7f1953f9e5ed Mon Sep 17 00:00:00 2001 From: Nick Bebout Date: Sat, 12 Mar 2011 02:44:15 +0000 Subject: [PATCH] 1.129 --- CREDITS | 1 + ChangeLog | 9 ++++++-- README | 4 ++-- VERSION | 2 +- imapsync | 25 +++++++++++++---------- patches/imapsync-buffersize.diff | 35 ++++++++++++++++++++++++++++++++ tests.sh | 19 ++++++++++++++++- 7 files changed, 78 insertions(+), 17 deletions(-) create mode 100644 patches/imapsync-buffersize.diff diff --git a/CREDITS b/CREDITS index f3dc28d..e593eb7 100644 --- a/CREDITS +++ b/CREDITS @@ -5,6 +5,7 @@ Found the bug about --regexmess applied only on the first message. Dag-Erling Smørgrav +Gave a patch to add --buffersize option. Found a bug about acls sync. Gave a patch that broke my acls... diff --git a/ChangeLog b/ChangeLog index e632da7..b0f2c58 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,15 +1,20 @@ RCS file: RCS/imapsync,v Working file: imapsync -head: 1.128 +head: 1.129 branch: locks: strict access list: symbolic names: keyword substitution: kv -total revisions: 128; selected revisions: 128 +total revisions: 129; selected revisions: 129 description: ---------------------------- +revision 1.129 +date: 2005/05/19 01:54:31; author: gilles; state: Exp; lines: +14 -11 +Added --buffersize option. +No sync acls by default now. +---------------------------- revision 1.128 date: 2005/05/18 18:52:09; author: gilles; state: Exp; lines: +7 -6 Groupwise diff --git a/README b/README index 5799a4d..8b83573 100644 --- a/README +++ b/README @@ -2,7 +2,7 @@ NAME imapsync - IMAP synchronization, copy or migration tool. Synchronize mailboxes between two imap servers. Good at IMAP migration. - $Revision: 1.128 $ + $Revision: 1.129 $ INSTALL imapsync works fine under any Unix OS. @@ -247,5 +247,5 @@ AUTHOR teaching free open and gratis softwares. Don't hesitate to pay him for that services. - $Id: imapsync,v 1.128 2005/05/18 18:52:09 gilles Exp $ + $Id: imapsync,v 1.129 2005/05/19 01:54:31 gilles Exp $ diff --git a/VERSION b/VERSION index 377e153..a04475c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.128 +1.129 diff --git a/imapsync b/imapsync index bc184be..ab200ad 100755 --- a/imapsync +++ b/imapsync @@ -6,7 +6,7 @@ imapsync - IMAP synchronization, copy or migration tool. Synchronize mailboxes between two imap servers. Good at IMAP migration. -$Revision: 1.128 $ +$Revision: 1.129 $ =head1 INSTALL @@ -289,7 +289,7 @@ Gilles LAMIRAL earn his living writing, installing, configuring and teaching free open and gratis softwares. Don't hesitate to pay him for that services. -$Id: imapsync,v 1.128 2005/05/18 18:52:09 gilles Exp $ +$Id: imapsync,v 1.129 2005/05/19 01:54:31 gilles Exp $ =cut @@ -313,7 +313,7 @@ my( $sep1, $sep2, $syncinternaldates, $syncacls, $maxsize, $maxage, - $skipheader, $skipsize, $foldersizes, + $skipheader, $skipsize, $foldersizes, $buffersize, $delete, $expunge, $dry, $authmd5, $subscribed, $subscribe, @@ -333,7 +333,7 @@ my( use vars qw ($opt_G); # missing code for this will be option. -$rcs = ' $Id: imapsync,v 1.128 2005/05/18 18:52:09 gilles Exp $ '; +$rcs = ' $Id: imapsync,v 1.129 2005/05/19 01:54:31 gilles Exp $ '; $rcs =~ m/,v (\d+\.\d+)/; $VERSION = ($1) ? $1 : "UNKNOWN"; @@ -370,8 +370,8 @@ $error=0; my $banner = join("", '$RCSfile: imapsync,v $ ', - '$Revision: 1.128 $ ', - '$Date: 2005/05/18 18:52:09 $ ', + '$Revision: 1.129 $ ', + '$Date: 2005/05/19 01:54:31 $ ', "\n", "Mail::IMAPClient version used here is ", $VERSION_IMAPClient, " auth md5 : $md5_supported", @@ -401,7 +401,7 @@ $user2 || missing_option("--user2"); $authmd5 = (defined($authmd5)) ? $authmd5 : 1; -$syncacls = (defined($syncacls)) ? $syncacls : 1; +$syncacls = (defined($syncacls)) ? $syncacls : 0; $foldersizes = (defined($foldersizes)) ? $foldersizes : 1; print "From imap server [$host1] port [$port1] user [$user1]\n"; @@ -451,7 +451,7 @@ sub login_imap { $imap->Server($host); $imap->Port($port); $imap->Fast_io(1); - $imap->Buffer(65536); + $imap->Buffer($buffersize || 65536); $imap->Uid(1); $imap->Peek(1); $imap->Debug($debugimap); @@ -980,7 +980,8 @@ sub get_options "syncacls!" => \$syncacls, "maxsize=i" => \$maxsize, "maxage=i" => \$maxage, - "foldersizes!" => \$foldersizes, + "buffersize=i" => \$buffersize, + "foldersizes!" => \$foldersizes, "dry!" => \$dry, "expunge!" => \$expunge, "subscribed!" => \$subscribed, @@ -1140,7 +1141,8 @@ Several options are mandatory. are expunged if option --expunge is given. no expunge is done on destination account but it will change in future releases. ---syncinternaldates : set the internal dates on host2 same as host1 +--syncinternaldates : sets the internal dates on host2 same as host1 +--buffersize : sets the size of a block of I/O. --maxsize : skip messages larger than bytes --maxage : skip messages older than days. final stats (skipped) don't count older messages @@ -1155,7 +1157,8 @@ Several options are mandatory. --(no)foldersizes : Calculate the size of each "From" folder in bytes and message counts. Meant to be used with --justconnect. Turned on by default. ---nosyncacls : Don't synchronizes acls. +--syncacls : Synchronizes acls. +--nosyncacls : Does not synchronize acls. This is the default. --debug : debug mode. --debugimap : imap debug mode. --version : print sotfware version. diff --git a/patches/imapsync-buffersize.diff b/patches/imapsync-buffersize.diff new file mode 100644 index 0000000..3bc0b34 --- /dev/null +++ b/patches/imapsync-buffersize.diff @@ -0,0 +1,35 @@ +--- imapsync.orig Mon May 9 12:03:59 2005 ++++ imapsync Mon May 9 12:07:05 2005 +@@ -44,6 +44,7 @@ + [--sep1 ] + [--sep2 ] + [--syncinternaldates] ++ [--buffersize ] + [--maxsize ] + [--maxage ] + [--skipheader ] +@@ -312,6 +313,7 @@ + $sep1, $sep2, + $syncinternaldates, $syncacls, + $maxsize, $maxage, ++ $buffersize, + $skipheader, $skipsize, $foldersizes, + $delete, $expunge, $dry, + $authmd5, +@@ -450,7 +452,7 @@ + $imap->Server($host); + $imap->Port($port); + $imap->Fast_io(1); +- $imap->Buffer(65536); ++ $imap->Buffer($buffersize || 65536); + $imap->Uid(1); + $imap->Peek(1); + $imap->Debug($debugimap); +@@ -979,6 +981,7 @@ + "syncacls!" => \$syncacls, + "maxsize=i" => \$maxsize, + "maxage=i" => \$maxage, ++ "buffersize=i" => \$buffersize, + "foldersizes!" => \$foldersizes, + "dry!" => \$dry, + "expunge!" => \$expunge, diff --git a/tests.sh b/tests.sh index fb21ae8..33c2c47 100644 --- a/tests.sh +++ b/tests.sh @@ -1,6 +1,6 @@ #!/bin/sh -# $Id: tests.sh,v 1.36 2005/05/09 04:22:44 gilles Exp $ +# $Id: tests.sh,v 1.37 2005/05/19 01:50:02 gilles Exp $ #### Shell pragmas @@ -130,6 +130,22 @@ lp_folder() { fi } +lp_buffersize() { + if test X`hostname` = X"plume"; then + echo3 Here is plume + ./imapsync \ + --host2 plume --user2 tata@est.belle \ + --passfile2 /var/tmp/secret.tata \ + --host1 loul --user1 tata \ + --passfile1 /var/tmp/secret.tata \ + --buffersize 8 + else + : + fi +} + + + lp_justfolders() { if test X`hostname` = X"plume"; then echo3 Here is plume @@ -596,6 +612,7 @@ test $# -eq 0 && run_tests \ loulplume \ plumeloul \ lp_folder \ + lp_buffersize \ pl_folder \ pl_folder_qqq \ lp_internaldate \