#!/usr/local/bin/perl
use
IMAP::Admin;
if
(
scalar
(
@ARGV
) < 1) {
"usage: $0 mailbox [mailbox ...]
}
$imap
= IMAP::Admin->new(
'Server'
=>
'my.server.com'
,
'Login'
=>
'admin'
,
'Password'
=>
'adminpass'
);
foreach
$mailbox
(
@ARGV
) {
$err
=
$imap
->
delete
(
$mailbox
);
if
(
$err
!= 0) {
"Error occurred destroying $mailbox\n\t$imap->{'Error'}\n"
;
}
}