PERL Script and setacl with a wildcard??
Berger, Stefan (IT-Management)
stefan.berger at uniteddata.de
Tue Feb 22 05:37:54 EST 2005
Hello,
i've a little perl script to set ACL's on user mailboxes. Now i want to
modify the script, that i can set the ACL's to subfolders too. Is there a
possibility to do this? I've tried several wildcards, without any success.
Here is the script.
#!/usr/bin/perl
#"authenticate" ["--minssf" N] ["--maxssf" N] ["--mechanisms" list] [user]
#use strict;
use Cyrus::IMAP::Admin;
my $server='localhost';
my $admin='cyrus';
my $pass='verysecret';
$olduser=$ARGV[0];
$quota='131072'; # default quota
my $cyradm = Cyrus::IMAP::Admin->new($server) or
die "$0: Unable to connect to IMAP server '$server': $!" ;
$cyradm->authenticate(-user => $admin, -password => $pass, -mechanism
=> "LOGIN") or die "$0: Failed to authenticate to IMAP server as
'$server': $!";
$cyradm->setacl("user/$olduser" WILDCARD here????, $admin => "c") or
warn "$0: Unable to setacl for $user on mailbox user/$olduser : $!";
#end
So, the accounts are created as "user/mailbox" and i want to set the ACL
to user/mailbox* too. In cyradm it works fine but not in the script.
Can anyone help me, btw OS is suse 9.1
Thanks in advance
--
Stefan Berger
-IT-Management-
United Data GmbH
Wir bringen Sie ins Gespräch.
address:
Nonnenstrasse 19
04229 Leipzig
phone: +49 (0)3461 28 25 43
fax: +49 (0)341 9401 333
mobile: +49 (0)172 372 123 1
email: stefan.berger at uniteddata.de
www: www.uniteddata.de
___________________________________________________________
This e-mail may contain information that is privileged and confidential.
The information is intended only for the use of the addressee. If you are
not the intended recipient, you are hereby notified that any dissemination
of this
communication is strictly prohibited and may be unlawful. If you have
received this e-mail in error, please notify Uniteddata immediately and
erase all copies of the message.
---
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
More information about the Info-cyrus
mailing list