1
0
mirror of https://github.com/imapsync/imapsync.git synced 2024-11-17 00:02:29 +01:00
This commit is contained in:
Nick Bebout 2011-03-12 02:44:15 +00:00
parent 5baaef6bd5
commit ec6a0c4d01
7 changed files with 78 additions and 17 deletions

View File

@ -5,6 +5,7 @@ Found the bug about --regexmess applied only on the first
message. message.
Dag-Erling Smørgrav Dag-Erling Smørgrav
Gave a patch to add --buffersize option.
Found a bug about acls sync. Found a bug about acls sync.
Gave a patch that broke my acls... Gave a patch that broke my acls...

View File

@ -1,15 +1,20 @@
RCS file: RCS/imapsync,v RCS file: RCS/imapsync,v
Working file: imapsync Working file: imapsync
head: 1.128 head: 1.129
branch: branch:
locks: strict locks: strict
access list: access list:
symbolic names: symbolic names:
keyword substitution: kv keyword substitution: kv
total revisions: 128; selected revisions: 128 total revisions: 129; selected revisions: 129
description: 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 revision 1.128
date: 2005/05/18 18:52:09; author: gilles; state: Exp; lines: +7 -6 date: 2005/05/18 18:52:09; author: gilles; state: Exp; lines: +7 -6
Groupwise Groupwise

4
README
View File

@ -2,7 +2,7 @@ NAME
imapsync - IMAP synchronization, copy or migration tool. Synchronize imapsync - IMAP synchronization, copy or migration tool. Synchronize
mailboxes between two imap servers. Good at IMAP migration. mailboxes between two imap servers. Good at IMAP migration.
$Revision: 1.128 $ $Revision: 1.129 $
INSTALL INSTALL
imapsync works fine under any Unix OS. 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 teaching free open and gratis softwares. Don't hesitate to pay him for
that services. 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 $

View File

@ -1 +1 @@
1.128 1.129

View File

@ -6,7 +6,7 @@ imapsync - IMAP synchronization, copy or migration
tool. Synchronize mailboxes between two imap servers. Good tool. Synchronize mailboxes between two imap servers. Good
at IMAP migration. at IMAP migration.
$Revision: 1.128 $ $Revision: 1.129 $
=head1 INSTALL =head1 INSTALL
@ -289,7 +289,7 @@ Gilles LAMIRAL earn his living writing, installing,
configuring and teaching free open and gratis configuring and teaching free open and gratis
softwares. Don't hesitate to pay him for that services. 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 =cut
@ -313,7 +313,7 @@ my(
$sep1, $sep2, $sep1, $sep2,
$syncinternaldates, $syncacls, $syncinternaldates, $syncacls,
$maxsize, $maxage, $maxsize, $maxage,
$skipheader, $skipsize, $foldersizes, $skipheader, $skipsize, $foldersizes, $buffersize,
$delete, $expunge, $dry, $delete, $expunge, $dry,
$authmd5, $authmd5,
$subscribed, $subscribe, $subscribed, $subscribe,
@ -333,7 +333,7 @@ my(
use vars qw ($opt_G); # missing code for this will be option. 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+)/; $rcs =~ m/,v (\d+\.\d+)/;
$VERSION = ($1) ? $1 : "UNKNOWN"; $VERSION = ($1) ? $1 : "UNKNOWN";
@ -370,8 +370,8 @@ $error=0;
my $banner = join("", my $banner = join("",
'$RCSfile: imapsync,v $ ', '$RCSfile: imapsync,v $ ',
'$Revision: 1.128 $ ', '$Revision: 1.129 $ ',
'$Date: 2005/05/18 18:52:09 $ ', '$Date: 2005/05/19 01:54:31 $ ',
"\n", "\n",
"Mail::IMAPClient version used here is ", "Mail::IMAPClient version used here is ",
$VERSION_IMAPClient, " auth md5 : $md5_supported", $VERSION_IMAPClient, " auth md5 : $md5_supported",
@ -401,7 +401,7 @@ $user2 || missing_option("--user2");
$authmd5 = (defined($authmd5)) ? $authmd5 : 1; $authmd5 = (defined($authmd5)) ? $authmd5 : 1;
$syncacls = (defined($syncacls)) ? $syncacls : 1; $syncacls = (defined($syncacls)) ? $syncacls : 0;
$foldersizes = (defined($foldersizes)) ? $foldersizes : 1; $foldersizes = (defined($foldersizes)) ? $foldersizes : 1;
print "From imap server [$host1] port [$port1] user [$user1]\n"; print "From imap server [$host1] port [$port1] user [$user1]\n";
@ -451,7 +451,7 @@ sub login_imap {
$imap->Server($host); $imap->Server($host);
$imap->Port($port); $imap->Port($port);
$imap->Fast_io(1); $imap->Fast_io(1);
$imap->Buffer(65536); $imap->Buffer($buffersize || 65536);
$imap->Uid(1); $imap->Uid(1);
$imap->Peek(1); $imap->Peek(1);
$imap->Debug($debugimap); $imap->Debug($debugimap);
@ -980,7 +980,8 @@ sub get_options
"syncacls!" => \$syncacls, "syncacls!" => \$syncacls,
"maxsize=i" => \$maxsize, "maxsize=i" => \$maxsize,
"maxage=i" => \$maxage, "maxage=i" => \$maxage,
"foldersizes!" => \$foldersizes, "buffersize=i" => \$buffersize,
"foldersizes!" => \$foldersizes,
"dry!" => \$dry, "dry!" => \$dry,
"expunge!" => \$expunge, "expunge!" => \$expunge,
"subscribed!" => \$subscribed, "subscribed!" => \$subscribed,
@ -1140,7 +1141,8 @@ Several options are mandatory.
are expunged if option --expunge is given. are expunged if option --expunge is given.
no expunge is done on destination account but no expunge is done on destination account but
it will change in future releases. 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 <int> : sets the size of a block of I/O.
--maxsize <int> : skip messages larger than <int> bytes --maxsize <int> : skip messages larger than <int> bytes
--maxage <int> : skip messages older than <int> days. --maxage <int> : skip messages older than <int> days.
final stats (skipped) don't count older messages 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 --(no)foldersizes : Calculate the size of each "From" folder in bytes
and message counts. Meant to be used with and message counts. Meant to be used with
--justconnect. Turned on by default. --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. --debug : debug mode.
--debugimap : imap debug mode. --debugimap : imap debug mode.
--version : print sotfware version. --version : print sotfware version.

View File

@ -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 <char>]
[--sep2 <char>]
[--syncinternaldates]
+ [--buffersize <int>]
[--maxsize <int>]
[--maxage <int>]
[--skipheader <regex>]
@@ -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,

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/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 #### Shell pragmas
@ -130,6 +130,22 @@ lp_folder() {
fi 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() { lp_justfolders() {
if test X`hostname` = X"plume"; then if test X`hostname` = X"plume"; then
echo3 Here is plume echo3 Here is plume
@ -596,6 +612,7 @@ test $# -eq 0 && run_tests \
loulplume \ loulplume \
plumeloul \ plumeloul \
lp_folder \ lp_folder \
lp_buffersize \
pl_folder \ pl_folder \
pl_folder_qqq \ pl_folder_qqq \
lp_internaldate \ lp_internaldate \