Cyrus::IMAP::Admin - Cyrus administrative interface Perl module
use Cyrus::IMAP::Admin; my $client = Cyrus::IMAP::Admin->new('mailhost'[, $flags]); $rc = $client->create('user.auser'[, $partition]); $rc = $client->delete('user.auser'); $rc = $client->deleteacl('user.buser', 'user1', 'user2'); %acls = $client->listacl('user.buser'); @mailboxes = $client->list('*'); @mailboxes = $client->list('%', 'user.'); @mailboxes = $client->subscribed('*'); %quota = $client->quota($root); ($root, %quota) = $client->quotaroot($mailbox); $rc = $client->rename($old, $new[, $partition]); $rc = $client->setacl($mailbox, $user =E<gt> $acl[, ...]); $rc = $client->setquota($mailbox, $resource =E<gt> $quota[, ...]); $rc = $client->xfer($mailbox, $server[, $partition]);
This module is a Perl interface to Cyrus administrative functions. It is used to implement Cyrus::IMAP::Admin::Shell (otherwise known as cyradm and also available for use in Perl administrative programs.
Many of the methods have a cyradm-compatible name and a shorter name. The shorter name is shown in the synopsis when it exists; the cyradm-compatible name should be reasonably obvious.
In general, methods return undef or empty lists on error. In some cases
a method may return an empty list without an error (i.e. list
of a
nonexistent hierarchy), so it may be necessary to check the error state
explicitly via the error
method.
authenticate
method.)
Return the last error that occurred, or undef if the last operation was
successful. This is in some cases (such as list
) the only way to
distinguish between a successful return of an empty list and an error return.
Calling error
does not reset the error state, so it is legal to write:
@folders = $cyradm->list($spec); print STDERR "Error: ", $cyradm->error if $cyradm->error;
setaclmailbox
first.
listmailbox
but only shows subscribed mailboxes.
listquotaroot
to find the quota root for a mailbox.
Set ACLs on a mailbox. The ACL may be one of the special strings none
,
read
(lrs
), post
(lrsp
), append
(lrsip
), write
(lrswipcd
), delete
(lrd
), or all
(lrswipcda
), or any combinations
of the ACL codes:
STORAGE
. As defined in RFC 2087, the units are groups of 1024 octets
(i.e. Kilobytes)
Brandon S. Allbery, allbery@ece.cmu.edu
Cyrus::IMAP Cyrus::IMAP::Shell perl(1), cyradm(1), imapd(8).