From 5abc66e3e40e4c7eb35dcd99e3b77a32826f4446 Mon Sep 17 00:00:00 2001 From: Nick Bebout Date: Sat, 12 Mar 2011 02:44:11 +0000 Subject: [PATCH] 1.112 --- ChangeLog | 8 ++++++-- README | 4 ++-- VERSION | 2 +- imapsync | 37 +++++++++++++++++++------------------ tests.sh | 16 ++++++++++++---- 5 files changed, 40 insertions(+), 27 deletions(-) diff --git a/ChangeLog b/ChangeLog index 57dbf1d..e8ab72d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,15 +1,19 @@ RCS file: RCS/imapsync,v Working file: imapsync -head: 1.111 +head: 1.112 branch: locks: strict access list: symbolic names: keyword substitution: kv -total revisions: 111; selected revisions: 111 +total revisions: 112; selected revisions: 112 description: ---------------------------- +revision 1.112 +date: 2005/01/04 04:49:43; author: gilles; state: Exp; lines: +19 -18 +acl only if option +---------------------------- revision 1.111 date: 2005/01/04 04:05:07; author: gilles; state: Exp; lines: +9 -13 Suppressed perl warnings diff --git a/README b/README index bb0661a..cc16acd 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.111 $ + $Revision: 1.112 $ INSTALL imapsync works fine under any Unix OS. @@ -239,5 +239,5 @@ AUTHOR teaching free open and gratis softwares. Don't hesitate to pay him for that services. - $Id: imapsync,v 1.111 2005/01/04 04:05:07 gilles Exp $ + $Id: imapsync,v 1.112 2005/01/04 04:49:43 gilles Exp $ diff --git a/VERSION b/VERSION index 2696ac1..33bf496 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.111 +1.112 diff --git a/imapsync b/imapsync index e1c3c05..d42c12a 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.111 $ +$Revision: 1.112 $ =head1 INSTALL @@ -281,7 +281,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.111 2005/01/04 04:05:07 gilles Exp $ +$Id: imapsync,v 1.112 2005/01/04 04:49:43 gilles Exp $ =cut @@ -323,7 +323,7 @@ my( use vars qw ($opt_G); # missing code for this will be option. -$rcs = ' $Id: imapsync,v 1.111 2005/01/04 04:05:07 gilles Exp $ '; +$rcs = ' $Id: imapsync,v 1.112 2005/01/04 04:49:43 gilles Exp $ '; $rcs =~ m/,v (\d+\.\d+)/; $VERSION = ($1) ? $1 : "UNKNOWN"; @@ -360,8 +360,8 @@ $error=0; my $banner = join("", '$RCSfile: imapsync,v $ ', - '$Revision: 1.111 $ ', - '$Date: 2005/01/04 04:05:07 $ ', + '$Revision: 1.112 $ ', + '$Date: 2005/01/04 04:49:43 $ ', "\n", "Mail::IMAPClient version used here is ", $VERSION_IMAPClient, " auth md5 : $md5_supported", @@ -679,29 +679,30 @@ FOLDER: foreach my $f_fold (@f_folders) { $error++; next FOLDER; } - + if ($expunge){ print "Expunging $f_fold and $t_fold\n"; unless($dry) { $from->expunge() }; #unless($dry) { $to->expunge() }; } - + if ($subscribe and exists $fs_folders{$f_fold}) { print "Subscribing to folder $t_fold on destination server\n"; unless($dry) { $to->subscribe($t_fold) }; } - my $hash = $from->getacl($f_fold) - or warn "Could not getacl for $f_fold: $@\n"; - foreach my $user (keys(%$hash)) { - my $acl = $hash->{$user}; - print "acl $user : " . $acl . "\n"; - if ($syncacls and ! $dry) { - print "setting acl $t_fold $user $acl\n"; - $to->setacl($t_fold, $user, $acl) - or warn "Could not set acl: $@\n"; - } - + if ($syncacls) { + my $hash = $from->getacl($f_fold) + or warn "Could not getacl for $f_fold: $@\n"; + foreach my $user (keys(%$hash)) { + my $acl = $hash->{$user}; + print "acl $user : " . $acl . "\n"; + unless ($dry) { + print "setting acl $t_fold $user $acl\n"; + $to->setacl($t_fold, $user, $acl) + or warn "Could not set acl: $@\n"; + } + } } next FOLDER if ($justfolders); diff --git a/tests.sh b/tests.sh index 1eef4cf..118d422 100644 --- a/tests.sh +++ b/tests.sh @@ -1,8 +1,11 @@ #!/bin/sh -# $Id: tests.sh,v 1.30 2004/12/28 23:22:02 gilles Exp $ +# $Id: tests.sh,v 1.31 2005/01/04 04:50:12 gilles Exp $ # $Log: tests.sh,v $ +# Revision 1.31 2005/01/04 04:50:12 gilles +# essnet update +# # Revision 1.30 2004/12/28 23:22:02 gilles # Added lp_justfolders() # @@ -600,7 +603,8 @@ essnet_mail2_mail() --user2 gilles@softwareuno.com \ --passfile2 /var/tmp/secret.prw \ --noauthmd5 --sep1 / --foldersizes \ - --prefix2 "INBOX/" --regextrans2 's¤INBOX¤¤' + --nosyncacls \ + --prefix2 "INBOX/" --regextrans2 's¤INBOX/INBOX¤INBOX¤' } essnet_mail2_mail_t123() @@ -615,7 +619,8 @@ for user1 in test1 test2 test3; do --user2 gilles@softwareuno.com \ --passfile2 /var/tmp/secret.prw \ --noauthmd5 --sep1 / --foldersizes \ - --prefix2 "INBOX/" --regextrans2 's¤INBOX¤¤' \ + --prefix2 "INBOX/" --regextrans2 's¤INBOX/INBOX¤INBOX¤' \ + --nosyncacls --debug \ || true done } @@ -629,7 +634,10 @@ essnet_plume2() --passfile1 /var/tmp/secret.prw \ --host2 plume --user2 tata@est.belle \ --passfile2 /var/tmp/secret.tata \ - --noauthmd5 --sep1 / --foldersizes --prefix2 INBOX. + --nosyncacls \ + --noauthmd5 --sep1 / --foldersizes \ + --prefix2 INBOX. --regextrans2 's¤INBOX.INBOX¤INBOX¤' \ + --nosyncacls }