IMAP::Admin(3)
π IMAP::Admin(3) β Cyrus::IMAP::Admin π
okay bestie, welcome to the IMAP::Admin(3) page in the User Contributed Perl Documentation section! This one is all about Cyrus::IMAP::Admin, and it's giving classic Cyrus admin interface energy. β¨
πΈ NAME πΈ
Cyrus::IMAP::Admin β Cyrus administrative interface Perl module.
π¦ SYNOPSIS π¦
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]);
π DESCRIPTION π
This module is a Perl interface to Cyrus administrative functions. It's used to implement Cyrus::IMAP::Admin::Shell (otherwise known as cyradm), and it's also available for use in Perl administrative programs. π
π METHODS π
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. π«Ά
β¨ new($server[, $flags])
Instantiates a cyradm object. This is in fact a Cyrus::IMAP object with a few additional methods, so all Cyrus::IMAP methods are available if needed. (In particular, you will always want to use the authenticate method.) π
π error
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;
π§ createmailbox($mailbox[[, $partition], \%opts]) / create($mailbox[, $partition])
Create a new mailbox on the specified or default partition. β¨
π deletemailbox($mailbox) / delete($mailbox)
Delete a mailbox. As with cyradm, you will probably need to add the c ACL for yourself to the mailbox with setaclmailbox first. π«£
ποΈ deleteaclmailbox($mailbox, $user[, ...]) / deleteacl($mailbox, $user[, ...])
Delete one or more ACL from a mailbox. π
π listaclmailbox($mailbox) / listacl($mailbox)
Returns a hash of mailbox ACLs, with each key being a Cyrus user and the corresponding value being the ACL. π
ποΈ listmailbox($pattern[[, $reference], \%opts]) / list($pattern[[, $reference], \%opts])
List mailboxes matching the specified pattern, starting from the specified reference. The result is a list; each element is an array containing the mailbox name, attributes, and the separator. (This interface may change.) π
π listsubscribed($pattern[, $reference]) / subscribed($pattern[, $reference])
Like listmailbox but only shows subscribed mailboxes. π
π listquota($root) / quota($root)
Returns a hash specifying the quota for the specified quota root. Use listquotaroot to find the quota root for a mailbox. π¦
π§ listquotaroot($mailbox) / quotaroot($mailbox)
Returns a list, the first element is the quota root for the mailbox and remaining elements are a hash specifying its quota. ποΈ
π¦ renamemailbox($from, $to[, $partition]) / rename($from, $to[, $partition])
Renames the specified mailbox, optionally moving it to a different partition. π
π setaclmailbox($mailbox, $user => $acl[, ...]) / setacl($mailbox, $user => $acl[, ...])
Set ACLs on a mailbox. The ACL may be one of the special strings none, read (lrs), post (lrsp), append (lrsip), write (lrswipkxte), delete (lrxte), or all (lrswipkxte), or any combinations of the ACL codes: π
lβ Lookup (mailbox is visible toLIST/LSUB,SUBSCRIBEmailbox)rβ Read (SELECT/EXAMINEthe mailbox, performSTATUS)sβ Seen (set/clear\SEENflag viaSTORE, also set\SEENflag duringAPPEND/COPY/FETCH BODY[...])wβ Write flags other than\SEENand\DELETEDiβ Insert (APPEND,COPYdestination)pβ Post (send mail to mailbox)kβ Create mailbox (CREATEnew sub-mailboxes, parent for new mailbox inRENAME)xβ Delete mailbox (DELETEmailbox, old mailbox name inRENAME)tβ Delete messages (set/clear\DELETEDflag viaSTORE, also set\DELETEDflag duringAPPEND/COPY)eβ PerformEXPUNGEand expunge as part ofCLOSEaβ Administer (SETACL/DELETEACL/GETACL/LISTRIGHTS)
π setquota($mailbox, $resource, $quota[, ...])
Set quotas on a mailbox. Note that Cyrus currently only defines one resource, STORAGE. As defined in RFC 2087, the units are groups of 1024 octets (i.e. Kilobytes). π’
π xfermailbox($mailbox, $server[, $partition]) / xfer($mailbox, $server[, $partition])
Transfers (relocates) the specified mailbox to a different server. π°οΈ
π AUTHOR π
Brandon S. Allbery, allbery@ece.cmu.edu π«Ά
π SEE ALSO π
cute little sign-off: this page is from perl v5.42.3, dated 1980-01-01. byeee bestie, go admin those mailboxes! πβ¨π
π¦ where this page comes from
- nixos 26.05: cyrus-imapd 3.12.4
- nixpkgs unstable: cyrus-imapd 3.12.4
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms