maildiracl -reset maildir
maildiracl -list maildir INBOX[.folder]
maildiracl -set maildir INBOX[.folder] [-]identifier [+/-]rights
maildiracl -delete maildir INBOX[.folder] [-]identifier
maildiracl -compute maildir INBOX[.folder] identifier ...
maildiracl manages ``access control lists'' (or ACLs) of Courier-IMAP maildir folders. Access control lists are used primarily to provide fine-grained control for accessing virtual shared folders via IMAP.
The Courier-IMAP server implements two types of shared folders: filesystem permission-based shared folders, as well as virtual shared folders based on IMAP access control lists. Use the maildiracl command to set up access control lists for virtual shared folders. Use the maildirmake(1), command to implement shared folders based on filesystem permissions.
See the Courier-IMAP server documentation for additional information on setting up virtual shared folders.
ACLs provide a fine-grained mechanism for controlling access to shared folders. ACLs may be used to specify, for example, that user1 may only open and read the messages in the folder; and user2 can not only do that, but also delete messages, and create subfolders.
Each folder maintains its own individual access control list, that specifies who can do what to the folder. An ACL is a list of ``identifier'' and ``rights'' pairs. Each ``identifier'' and ``rights'' pair means that an entity called ``identifier'' (using the UTF-8 character set) is allowed to do ``rights'' on this folder. ``rights'' consists of one or more letters, each letter signifies a particular action:
An ACL entry of ``-identifier'' and ``rights'' is called a ``negative right'', which explicitly removes ``rights'' from ``identifier''. More than one ``identifier'' is usually used to determine the actual rights someone has for the given folder. The actual access rights are determined by taking all rights from all applicable identifier, than subtracting any negative rights, as specified in the following section.
Access rights on a given folder are computed by obtained the rights on the following identifiers, then subtracting the negative rights on the same identifiers:
Consider the following access control list:
owner aceilrstwx anyone lr user=john w -user=mary r
This access control list specifies that the folder's owner has complete control over the mailbox; everyone else can see it and open it, except for ``mary'' who can see that the mailbox exists, but can't open it; additionally, ``john'' can change the status and keywords of individual messages (but not mark them as deleted/undeleted or seen/unseen, which requires additional rights).
maildiracl -reset maildir
This command resets access control lists in maildir which as a path to a maildir. Under certain conditions, the files where a folder's ACLs are saved may continue to exist after the folder is removed. The -reset options goes through maildir and removes all stale ACL files for removed folders.
maildiracl -list maildirfolder
This command lists the access control lists set for folder. folder must be either ``INBOX'' or ``INBOX.folder.subfolder'', which is the same naming convention for Courier-IMAP.
maildiracl -set maildirfolderidentifierrights
Puts identifier (which may begin with a minus sign to specify a negative right) and rights in folder's access control list. Existing rights for identifier (or identifier) are replaced by rights unless ``rights'' begins with ``+'' or ``-'', which modifies the existing rights by adding or removing from them accordingly. Some examples:
maildiracl -set /home/user1/Maildir INBOX.Sent user=john lr maildiracl -set /home/user2/Maildir INBOX.Notes anyone -r maildiracl -set /home/user3/Maildir INBOX.Private -user=tom +r
maildiracl -delete maildirfolderidentifier
This command removes identifier from folder's access control list, if it exists. Use ``-identifier'' to remove negative rights.
maildiracl -compute maildirfolder[identifier]+
This command takes a list of one or more identifiers. All access rights for the identifiers are combined together, then any appropriate negative rights are removed, and the result is printed on standard output. Use the following procedure to compute access rights the same way as they are computed by Courier-IMAP:
maildiracl -compute /home/tom46/Maildir INBOX.Sent owner user=tom46
This command computes access rights ``tom46'' has on his own folder.
maildiracl -compute /home/john34/Maildir INBOX.Public user=tom46
This command computes access rights ``tom46'' has on ``john34'''s folder.
All identifiers are specified using the UTF-8 character set.
All non-Latin letters in folder names are specified using the modified-UTF7 coding as used in IMAP.
This implementation of access control lists is based on version 2 (or ``ACL2'') of IMAP access control lists, which is a work-in-progress. The existing IMAP ACL, RFC 2086 is transparently implemented inside the ACL2 model.
If history's of any guidance, ACL2 is subject to change at any time. Be sure to check the release notes when upgrading to a newer version of this software. The ``ACL overview'' portion of this manual page is a very brief summary of ACL2, which leaves out optional parts of ACL2 that are not implemented.
maildirmake(1), maildirkw(1),