This commit is contained in:
Nick Bebout 2011-03-12 02:44:11 +00:00
parent 8d3368026e
commit 5abc66e3e4
5 changed files with 40 additions and 27 deletions

View file

@ -1,15 +1,19 @@
RCS file: RCS/imapsync,v RCS file: RCS/imapsync,v
Working file: imapsync Working file: imapsync
head: 1.111 head: 1.112
branch: branch:
locks: strict locks: strict
access list: access list:
symbolic names: symbolic names:
keyword substitution: kv keyword substitution: kv
total revisions: 111; selected revisions: 111 total revisions: 112; selected revisions: 112
description: 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 revision 1.111
date: 2005/01/04 04:05:07; author: gilles; state: Exp; lines: +9 -13 date: 2005/01/04 04:05:07; author: gilles; state: Exp; lines: +9 -13
Suppressed perl warnings Suppressed perl warnings

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.111 $ $Revision: 1.112 $
INSTALL INSTALL
imapsync works fine under any Unix OS. 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 teaching free open and gratis softwares. Don't hesitate to pay him for
that services. 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 $

View file

@ -1 +1 @@
1.111 1.112

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.111 $ $Revision: 1.112 $
=head1 INSTALL =head1 INSTALL
@ -281,7 +281,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.111 2005/01/04 04:05:07 gilles Exp $ $Id: imapsync,v 1.112 2005/01/04 04:49:43 gilles Exp $
=cut =cut
@ -323,7 +323,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.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+)/; $rcs =~ m/,v (\d+\.\d+)/;
$VERSION = ($1) ? $1 : "UNKNOWN"; $VERSION = ($1) ? $1 : "UNKNOWN";
@ -360,8 +360,8 @@ $error=0;
my $banner = join("", my $banner = join("",
'$RCSfile: imapsync,v $ ', '$RCSfile: imapsync,v $ ',
'$Revision: 1.111 $ ', '$Revision: 1.112 $ ',
'$Date: 2005/01/04 04:05:07 $ ', '$Date: 2005/01/04 04:49:43 $ ',
"\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",
@ -691,17 +691,18 @@ FOLDER: foreach my $f_fold (@f_folders) {
unless($dry) { $to->subscribe($t_fold) }; unless($dry) { $to->subscribe($t_fold) };
} }
if ($syncacls) {
my $hash = $from->getacl($f_fold) my $hash = $from->getacl($f_fold)
or warn "Could not getacl for $f_fold: $@\n"; or warn "Could not getacl for $f_fold: $@\n";
foreach my $user (keys(%$hash)) { foreach my $user (keys(%$hash)) {
my $acl = $hash->{$user}; my $acl = $hash->{$user};
print "acl $user : " . $acl . "\n"; print "acl $user : " . $acl . "\n";
if ($syncacls and ! $dry) { unless ($dry) {
print "setting acl $t_fold $user $acl\n"; print "setting acl $t_fold $user $acl\n";
$to->setacl($t_fold, $user, $acl) $to->setacl($t_fold, $user, $acl)
or warn "Could not set acl: $@\n"; or warn "Could not set acl: $@\n";
} }
}
} }
next FOLDER if ($justfolders); next FOLDER if ($justfolders);

View file

@ -1,8 +1,11 @@
#!/bin/sh #!/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 $ # $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 # Revision 1.30 2004/12/28 23:22:02 gilles
# Added lp_justfolders() # Added lp_justfolders()
# #
@ -600,7 +603,8 @@ essnet_mail2_mail()
--user2 gilles@softwareuno.com \ --user2 gilles@softwareuno.com \
--passfile2 /var/tmp/secret.prw \ --passfile2 /var/tmp/secret.prw \
--noauthmd5 --sep1 / --foldersizes \ --noauthmd5 --sep1 / --foldersizes \
--prefix2 "INBOX/" --regextrans2 's儿NBOX中' --nosyncacls \
--prefix2 "INBOX/" --regextrans2 's¤INBOX/INBOX¤INBOX¤'
} }
essnet_mail2_mail_t123() essnet_mail2_mail_t123()
@ -615,7 +619,8 @@ for user1 in test1 test2 test3; do
--user2 gilles@softwareuno.com \ --user2 gilles@softwareuno.com \
--passfile2 /var/tmp/secret.prw \ --passfile2 /var/tmp/secret.prw \
--noauthmd5 --sep1 / --foldersizes \ --noauthmd5 --sep1 / --foldersizes \
--prefix2 "INBOX/" --regextrans2 's儿NBOX中' \ --prefix2 "INBOX/" --regextrans2 's¤INBOX/INBOX¤INBOX¤' \
--nosyncacls --debug \
|| true || true
done done
} }
@ -629,7 +634,10 @@ essnet_plume2()
--passfile1 /var/tmp/secret.prw \ --passfile1 /var/tmp/secret.prw \
--host2 plume --user2 tata@est.belle \ --host2 plume --user2 tata@est.belle \
--passfile2 /var/tmp/secret.tata \ --passfile2 /var/tmp/secret.tata \
--noauthmd5 --sep1 / --foldersizes --prefix2 INBOX. --nosyncacls \
--noauthmd5 --sep1 / --foldersizes \
--prefix2 INBOX. --regextrans2 's¤INBOX.INBOX¤INBOX¤' \
--nosyncacls
} }