bernhard: utils/admin listannotations.pl,1.1,1.2
cvs at intevation.de
cvs at intevation.de
Tue Feb 21 13:22:33 CET 2006
Author: bernhard
Update of /kolabrepository/utils/admin
In directory doto:/tmp/cvs-serv7362
Modified Files:
listannotations.pl
Log Message:
Improved the usage instructions.
Index: listannotations.pl
===================================================================
RCS file: /kolabrepository/utils/admin/listannotations.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- listannotations.pl 20 Feb 2006 19:29:42 -0000 1.1
+++ listannotations.pl 21 Feb 2006 12:22:30 -0000 1.2
@@ -3,14 +3,24 @@
# in order to create a script that can re-add them for a different domain
# and different user name.
#
+# USAGE:
+# 1) make a copy of the script and replace manager password and user
+# with your settings of the old server.
+# 2) Create the command lines necessary to set the annotations
+# on the new server.
+#
# Example usage to get the file "lines" that contains the commands
-# to set the annotations for user.b at new.example.org again:
+# to set the annotations for user.b at new.example.org:
#
# /kolab/bin/perl listannotations.pl | \
# grep /vendor/kolab/ | \
# sed "s+/mailbox/{\(.*\)}/vendor/kolab/\(folder-type\|incidences-for\):::\(.*\)+\$client->mboxconfig('\1', '/vendor/kolab/\2', '\3');+" | \
-# sed "s+user.b\(.*\)@old.example.org+user.b\1 at new.example.org+" >lines
+# sed "s+user.a\(.*\)@old.example.org+user.b\1 at new.example.org+" >lines
#
+# 3) Make another copy, e.g. name it setannotation.new.pl.
+# Add the manager password and user for the new server and
+# add the commands to set the annotations from step 2).
+# Run it.
#
# 20060220 initial bernhard at intevation.de
# Tested with Kolab Server 2.1.0beta1.
@@ -23,11 +33,12 @@
my $client = Cyrus::IMAP::Admin->new('localhost',);
$client->authenticate(-user => 'manager', -password => 'XXXXXXX');
+# insert "lines" here in renamed script for setting annotations
+# example line
+#$client->mboxconfig('user/user.b at new.example.org','/vendor/kolab/folder-type','mail');
+
+# listing all annotations
%info= $client->getinfo('user/user.a*@old.example.org');
foreach my $attrib (sort keys %info) {
print $attrib.":::". $info{$attrib}."\n";
}
-
-#$client->mboxconfig('user/user.b at new.example.org','/vendor/kolab/folder-type','mail');
-
-# insert "lines" here and rename script to "setannotations.local.pl" or so. :)
More information about the commits
mailing list