.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "IMAP::Admin 3pm" .TH IMAP::Admin 3pm "2021-01-16" "perl v5.28.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Cyrus::IMAP::Admin \- Cyrus administrative interface Perl module .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Cyrus::IMAP::Admin; \& \& my $client = Cyrus::IMAP::Admin\->new(\*(Aqmailhost\*(Aq[, $flags]); \& $rc = $client\->create(\*(Aquser.auser\*(Aq[, $partition]); \& $rc = $client\->delete(\*(Aquser.auser\*(Aq); \& $rc = $client\->deleteacl(\*(Aquser.buser\*(Aq, \*(Aquser1\*(Aq, \*(Aquser2\*(Aq); \& %acls = $client\->listacl(\*(Aquser.buser\*(Aq); \& @mailboxes = $client\->list(\*(Aq*\*(Aq); \& @mailboxes = $client\->list(\*(Aq%\*(Aq, \*(Aquser.\*(Aq); \& @mailboxes = $client\->subscribed(\*(Aq*\*(Aq); \& %quota = $client\->quota($root); \& ($root, %quota) = $client\->quotaroot($mailbox); \& $rc = $client\->rename($old, $new[, $partition]); \& $rc = $client\->setacl($mailbox, $user =E $acl[, ...]); \& $rc = $client\->setquota($mailbox, $resource =E $quota[, ...]); \& $rc = $client\->xfer($mailbox, $server[, $partition]); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module is a Perl interface to Cyrus administrative functions. It is used to implement Cyrus::IMAP::Admin::Shell (otherwise known as \fBcyradm\fR and also available for use in Perl administrative programs. .SH "METHODS" .IX Header "METHODS" Many of the methods have a \fBcyradm\fR\-compatible name and a shorter name. The shorter name is shown in the synopsis when it exists; the \&\fBcyradm\fR\-compatible name should be reasonably obvious. .PP 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. \f(CW\*(C`list\*(C'\fR of a nonexistent hierarchy), so it may be necessary to check the error state explicitly via the \f(CW\*(C`error\*(C'\fR method. .ie n .IP "new($server[, $flags])" 4 .el .IP "new($server[, \f(CW$flags\fR])" 4 .IX Item "new($server[, $flags])" Instantiates a \fBcyradm\fR object. This is in fact an 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 \f(CW\*(C`authenticate\*(C'\fR method.) .IP "error" 4 .IX Item "error" Return the last error that occurred, or undef if the last operation was successful. This is in some cases (such as \f(CW\*(C`list\*(C'\fR) the only way to distinguish between a successful return of an empty list and an error return. .Sp Calling \f(CW\*(C`error\*(C'\fR does not reset the error state, so it is legal to write: .Sp .Vb 2 \& @folders = $cyradm\->list($spec); \& print STDERR "Error: ", $cyradm\->error if $cyradm\->error; .Ve .ie n .IP "createmailbox($mailbox[[, $partition], \e%opts])" 4 .el .IP "createmailbox($mailbox[[, \f(CW$partition\fR], \e%opts])" 4 .IX Item "createmailbox($mailbox[[, $partition], %opts])" .PD 0 .ie n .IP "create($mailbox[, $partition])" 4 .el .IP "create($mailbox[, \f(CW$partition\fR])" 4 .IX Item "create($mailbox[, $partition])" .PD Create a new mailbox on the specified or default partition. .IP "deletemailbox($mailbox)" 4 .IX Item "deletemailbox($mailbox)" .PD 0 .IP "delete($mailbox)" 4 .IX Item "delete($mailbox)" .PD Delete a mailbox. As with \fBcyradm\fR, you will probably need to add the \fBc\fR \&\s-1ACL\s0 for yourself to the mailbox with \f(CW\*(C`setaclmailbox\*(C'\fR first. .ie n .IP "deleteaclmailbox($mailbox, $user[, ...])" 4 .el .IP "deleteaclmailbox($mailbox, \f(CW$user\fR[, ...])" 4 .IX Item "deleteaclmailbox($mailbox, $user[, ...])" .PD 0 .ie n .IP "deleteacl($mailbox, $user[, ...])" 4 .el .IP "deleteacl($mailbox, \f(CW$user\fR[, ...])" 4 .IX Item "deleteacl($mailbox, $user[, ...])" .PD Delete one or more \s-1ACL\s0 from a mailbox. .IP "listaclmailbox($mailbox)" 4 .IX Item "listaclmailbox($mailbox)" .PD 0 .IP "listacl($mailbox)" 4 .IX Item "listacl($mailbox)" .PD Returns a hash of mailbox ACLs, with each key being a Cyrus user and the corresponding value being the \s-1ACL.\s0 .ie n .IP "listmailbox($pattern[[, $reference], \e%opts])" 4 .el .IP "listmailbox($pattern[[, \f(CW$reference\fR], \e%opts])" 4 .IX Item "listmailbox($pattern[[, $reference], %opts])" .PD 0 .ie n .IP "list($pattern[[, $reference], \e%opts])" 4 .el .IP "list($pattern[[, \f(CW$reference\fR], \e%opts])" 4 .IX Item "list($pattern[[, $reference], %opts])" .PD 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.) .ie n .IP "listsubscribed($pattern[, $reference])" 4 .el .IP "listsubscribed($pattern[, \f(CW$reference\fR])" 4 .IX Item "listsubscribed($pattern[, $reference])" .PD 0 .ie n .IP "subscribed($pattern[, $reference])" 4 .el .IP "subscribed($pattern[, \f(CW$reference\fR])" 4 .IX Item "subscribed($pattern[, $reference])" .PD Like \f(CW\*(C`listmailbox\*(C'\fR but only shows subscribed mailboxes. .IP "listquota($root)" 4 .IX Item "listquota($root)" .PD 0 .IP "quota($root)" 4 .IX Item "quota($root)" .PD Returns a hash specifying the quota for the specified quota root. Use \&\f(CW\*(C`listquotaroot\*(C'\fR to find the quota root for a mailbox. .IP "listquotaroot($mailbox)" 4 .IX Item "listquotaroot($mailbox)" .PD 0 .IP "quotaroot($mailbox)" 4 .IX Item "quotaroot($mailbox)" .PD Returns a list, the first element is the quota root for the mailbox and remaining elements are a hash specifying its quota. .ie n .IP "renamemailbox($from, $to[, $partition])" 4 .el .IP "renamemailbox($from, \f(CW$to\fR[, \f(CW$partition\fR])" 4 .IX Item "renamemailbox($from, $to[, $partition])" .PD 0 .ie n .IP "rename($from, $to[, $partition])" 4 .el .IP "rename($from, \f(CW$to\fR[, \f(CW$partition\fR])" 4 .IX Item "rename($from, $to[, $partition])" .PD Renames the specified mailbox, optionally moving it to a different partition. .ie n .IP "setaclmailbox($mailbox, $user => $acl[, ...])" 4 .el .IP "setaclmailbox($mailbox, \f(CW$user\fR => \f(CW$acl\fR[, ...])" 4 .IX Item "setaclmailbox($mailbox, $user => $acl[, ...])" .PD 0 .ie n .IP "setacl($mailbox, $user => $acl[, ...])" 4 .el .IP "setacl($mailbox, \f(CW$user\fR => \f(CW$acl\fR[, ...])" 4 .IX Item "setacl($mailbox, $user => $acl[, ...])" .PD Set ACLs on a mailbox. The \s-1ACL\s0 may be one of the special strings \f(CW\*(C`none\*(C'\fR, \&\f(CW\*(C`read\*(C'\fR (\f(CW\*(C`lrs\*(C'\fR), \f(CW\*(C`post\*(C'\fR (\f(CW\*(C`lrsp\*(C'\fR), \f(CW\*(C`append\*(C'\fR (\f(CW\*(C`lrsip\*(C'\fR), \f(CW\*(C`write\*(C'\fR (\f(CW\*(C`lrswipkxte\*(C'\fR), \f(CW\*(C`delete\*(C'\fR (\f(CW\*(C`lrxte\*(C'\fR), or \f(CW\*(C`all\*(C'\fR (\f(CW\*(C`lrswipkxte\*(C'\fR), or any combinations of the \s-1ACL\s0 codes: .RS 4 .IP "l" 4 .IX Item "l" Lookup (mailbox is visible to \s-1LIST/LSUB, SUBSCRIBE\s0 mailbox) .IP "r" 4 .IX Item "r" Read (\s-1SELECT/EXAMINE\s0 the mailbox, perform \s-1STATUS\s0) .IP "s" 4 .IX Item "s" Seen (set/clear \eSEEN flag via \s-1STORE,\s0 also set \eSEEN flag during \s-1APPEND/COPY/FETCH\s0 BODY[...]) .IP "w" 4 .IX Item "w" Write flags other than \eSEEN and \eDELETED .IP "i" 4 .IX Item "i" Insert (\s-1APPEND, COPY\s0 destination) .IP "p" 4 .IX Item "p" Post (send mail to mailbox) .IP "k" 4 .IX Item "k" Create mailbox (\s-1CREATE\s0 new sub-mailboxes, parent for new mailbox in \s-1RENAME\s0) .IP "x" 4 .IX Item "x" Delete mailbox (\s-1DELETE\s0 mailbox, old mailbox name in \s-1RENAME\s0) .IP "t" 4 .IX Item "t" Delete messages (set/clear \eDELETED flag via \s-1STORE,\s0 also set \eDELETED flag during \s-1APPEND/COPY\s0) .IP "e" 4 .IX Item "e" Perform \s-1EXPUNGE\s0 and expunge as part of \s-1CLOSE\s0 .IP "a" 4 .IX Item "a" Administer (\s-1SETACL/DELETEACL/GETACL/LISTRIGHTS\s0) .RE .RS 4 .RE .ie n .IP "setquota($mailbox, $resource, $quota[, ...])" 4 .el .IP "setquota($mailbox, \f(CW$resource\fR, \f(CW$quota\fR[, ...])" 4 .IX Item "setquota($mailbox, $resource, $quota[, ...])" Set quotas on a mailbox. Note that Cyrus currently only defines one resource, \&\f(CW\*(C`STORAGE\*(C'\fR. As defined in \s-1RFC 2087,\s0 the units are groups of 1024 octets (i.e. Kilobytes) .ie n .IP "xfermailbox($mailbox, $server[, $partition])" 4 .el .IP "xfermailbox($mailbox, \f(CW$server\fR[, \f(CW$partition\fR])" 4 .IX Item "xfermailbox($mailbox, $server[, $partition])" .PD 0 .ie n .IP "xfer($mailbox, $server[, $partition])" 4 .el .IP "xfer($mailbox, \f(CW$server\fR[, \f(CW$partition\fR])" 4 .IX Item "xfer($mailbox, $server[, $partition])" .PD Transfers (relocates) the specified mailbox to a different server. .SH "AUTHOR" .IX Header "AUTHOR" Brandon S. Allbery, allbery@ece.cmu.edu .SH "SEE ALSO" .IX Header "SEE ALSO" Cyrus::IMAP Cyrus::IMAP::Shell \&\fBperl\fR\|(1), \fBcyradm\fR\|(1), \fBimapd\fR\|(8).