1IMAP::Admin(3)        User Contributed Perl Documentation       IMAP::Admin(3)
2
3
4

NAME

6       Cyrus::IMAP::Admin - Cyrus administrative interface Perl module
7

SYNOPSIS

9         use Cyrus::IMAP::Admin;
10
11         my $client = Cyrus::IMAP::Admin->new('mailhost'[, $flags]);
12         $rc = $client->create('user.auser'[, $partition]);
13         $rc = $client->delete('user.auser');
14         $rc = $client->deleteacl('user.buser', 'user1', 'user2');
15         %acls = $client->listacl('user.buser');
16         @mailboxes = $client->list('*');
17         @mailboxes = $client->list('%', 'user.');
18         @mailboxes = $client->subscribed('*');
19         %quota = $client->quota($root);
20         ($root, %quota) = $client->quotaroot($mailbox);
21         $rc = $client->rename($old, $new[, $partition]);
22         $rc = $client->setacl($mailbox, $user =E<gt> $acl[, ...]);
23         $rc = $client->setquota($mailbox, $resource =E<gt> $quota[, ...]);
24         $rc = $client->xfer($mailbox, $server[, $partition]);
25

DESCRIPTION

27       This module is a Perl interface to Cyrus administrative functions.  It
28       is used to implement Cyrus::IMAP::Admin::Shell (otherwise known as
29       cyradm and also available for use in Perl administrative programs.
30

METHODS

32       Many of the methods have a cyradm-compatible name and a shorter name.
33       The shorter name is shown in the synopsis when it exists; the
34       cyradm-compatible name should be reasonably obvious.
35
36       In general, methods return undef or empty lists on error.  In some
37       cases a method may return an empty list without an error (i.e. "list"
38       of a nonexistent hierarchy), so it may be necessary to check the error
39       state explicitly via the "error" method.
40
41       new($server[, $flags])
42           Instantiates a cyradm object.  This is in fact an Cyrus::IMAP
43           object with a few additional methods, so all Cyrus::IMAP methods
44           are available if needed.  (In particular, you will always want to
45           use the "authenticate" method.)
46
47       error
48           Return the last error that occurred, or undef if the last operation
49           was successful.  This is in some cases (such as "list") the only
50           way to distinguish between a successful return of an empty list and
51           an error return.
52
53           Calling "error" does not reset the error state, so it is legal to
54           write:
55
56               @folders = $cyradm->list($spec);
57               print STDERR "Error: ", $cyradm->error if $cyradm->error;
58
59       createmailbox($mailbox[[, $partition], \%opts])
60       create($mailbox[, $partition])
61           Create a new mailbox on the specified or default partition.
62
63       deletemailbox($mailbox)
64       delete($mailbox)
65           Delete a mailbox.  As with cyradm, you will probably need to add
66           the c ACL for yourself to the mailbox with "setaclmailbox" first.
67
68       deleteaclmailbox($mailbox, $user[, ...])
69       deleteacl($mailbox, $user[, ...])
70           Delete one or more ACL from a mailbox.
71
72       listaclmailbox($mailbox)
73       listacl($mailbox)
74           Returns a hash of mailbox ACLs, with each key being a Cyrus user
75           and the corresponding value being the ACL.
76
77       listmailbox($pattern[[, $reference], \%opts])
78       list($pattern[[, $reference], \%opts])
79           List mailboxes matching the specified pattern, starting from the
80           specified reference.  The result is a list; each element is an
81           array containing the mailbox name, attributes, and the separator.
82           (This interface may change.)
83
84       listsubscribed($pattern[, $reference])
85       subscribed($pattern[, $reference])
86           Like "listmailbox" but only shows subscribed mailboxes.
87
88       listquota($root)
89       quota($root)
90           Returns a hash specifying the quota for the specified quota root.
91           Use "listquotaroot" to find the quota root for a mailbox.
92
93       listquotaroot($mailbox)
94       quotaroot($mailbox)
95           Returns a list, the first element is the quota root for the mailbox
96           and remaining elements are a hash specifying its quota.
97
98       renamemailbox($from, $to[, $partition])
99       rename($from, $to[, $partition])
100           Renames the specified mailbox, optionally moving it to a different
101           partition.
102
103       setaclmailbox($mailbox, $user => $acl[, ...])
104       setacl($mailbox, $user => $acl[, ...])
105           Set ACLs on a mailbox.  The ACL may be one of the special strings
106           "none", "read" ("lrs"), "post" ("lrsp"), "append" ("lrsip"),
107           "write" ("lrswipkxte"), "delete" ("lrxte"), or "all"
108           ("lrswipkxte"), or any combinations of the ACL codes:
109
110           l   Lookup (mailbox is visible to LIST/LSUB, SUBSCRIBE mailbox)
111
112           r   Read (SELECT/EXAMINE the mailbox, perform STATUS)
113
114           s   Seen (set/clear \SEEN flag via STORE, also set \SEEN flag
115               during
116                   APPEND/COPY/FETCH BODY[...])
117
118           w   Write flags other than \SEEN and \DELETED
119
120           i   Insert (APPEND, COPY destination)
121
122           p   Post (send mail to mailbox)
123
124           k   Create mailbox (CREATE new sub-mailboxes, parent for new
125               mailbox in RENAME)
126
127           x   Delete mailbox (DELETE mailbox, old mailbox name in RENAME)
128
129           t   Delete messages (set/clear \DELETED flag via STORE, also set
130               \DELETED
131                   flag during APPEND/COPY)
132
133           e   Perform EXPUNGE and expunge as part of CLOSE
134
135           a   Administer (SETACL/DELETEACL/GETACL/LISTRIGHTS)
136
137       setquota($mailbox, $resource, $quota[, ...])
138           Set quotas on a mailbox.  Note that Cyrus currently only defines
139           one resource, "STORAGE".  As defined in RFC 2087, the units are
140           groups of 1024 octets (i.e. Kilobytes)
141
142       xfermailbox($mailbox, $server[, $partition])
143       xfer($mailbox, $server[, $partition])
144           Transfers (relocates) the specified mailbox to a different server.
145

AUTHOR

147       Brandon S. Allbery, allbery@ece.cmu.edu
148

SEE ALSO

150       Cyrus::IMAP Cyrus::IMAP::Shell perl(1), cyradm(1), imapd(8).
151
152
153
154perl v5.28.2                      2019-05-27                    IMAP::Admin(3)
Impressum