batch removal script
Ondrej Sury
ondrej at sury.org
Wed Feb 23 14:15:31 EST 2005
Something like this?
#!/usr/bin/perl
use Cyrus::IMAP::Admin;
my $partition = 'default';
$client = Cyrus::IMAP::Admin->new('localhost');
defined($client) || die "failed to get Admin obj.";
$ret = $client->authenticate(User => 'cyrus', Password => 'xxx', );
while (<>) {
chomp;
$mbox = "user.$_";
if ($client->listmailbox($mbox)) {
$client->setacl($mbox, cyrus => 'all');
$client->delete($mbox);
}
}
On Wed, 2005-02-23 at 17:09 +0000, Boyle, Bernadette wrote:
> Hello,
>
> I would like to remove a couple of thousand users mailboxes. Does
> anyone have a script that would do this in batch please for a Solaris
> system running perl and all the usual shells.
--
Ondrej Sury <ondrej at sury.org>
---
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