MAILDIRMAKE(1) MAILDIRMAKE(1)
NAME
maildirmake - create maildirs and maildir(1,5) folders
SYNOPSIS
maildirmake [ options ... ] maildir(1,5)
DESCRIPTION
The maildirmake command creates maildirs, and maildir(1,5) folders. This
documentation describes the maildirmake command from the Courier mail(1,8)
server, which creates an extended form of maildirs that implements
additional extensions beyond the basic maildir(1,5) properties that were
first implemented in(1,8) the Qmail mail(1,8) server.
OPTIONS
-S create a "sharable" maildir. A sharable maildir(1,5) has slightly
different permissions which allows creation of publicly-shared
folders.
-q quota(1,8)
install a quota(1,8) on the maildir. See "Maildir Quotas", below.
-f folder
do not create a maildir(1,5), but create a folder in(1,8) an existing
maildir.
-s mode
create a publicly accessible folder in(1,8) an existing sharable
maildir. First, use the -S option to create a sharable maildir.
Then, run maildirmake again with the -s option to create pub-
licly accessible folders. mode is a comma-separated list of the
following keywords: read(2,n,1 builtins) - readonly folder, only you can write(1,2)
messages to this folder; write(1,2) - anyone can read(2,n,1 builtins) and write(1,2) mes-
sages to this folder; group - only allow members of your own
system group to access(2,5) messages in(1,8) this folder (instead of
everyone).
--add name=pathname, --del name
create or delete the directories and links needed to access(2,5)
shared folders. See below for more information.
FOLDERS
This maildirmake command supports enhanced maildirs that contain fold-
ers.
By itself, maildirmake makes a new subdirectory maildir(1,5), and creates
all the necessary structures. The -f option creates a new "folder"
within an existing maildir(1,5). maildir(1,5) must already exist, and the
maildirmake command will create a new folder in(1,8) the maildir.
Folders are simply subdirectories inside the main maildir(1,5) whose names
start with a period, and which are themselves maildirs. For example,
the command "maildirmake -f Drafts mail(1,8)/Maildir" creates
mail(1,8)/Maildir/.Drafts, that has the usual tmp, new and cur. You MUST
use the -f option, instead of specifying mail(1,8)/Maildir/.Drafts directly,
in(1,8) order to correctly initialize certain enhanced maildir(1,5) features.
Folders cannot be created directly within other folders. Running
maildirmake -f Urgent mail(1,8)/Maildir/.Drafts will not work. Instead, the
period character is designated as a hierarchy separator, run
maildirmake -f Drafts.Urgent mail(1,8)/Maildir instead. This creates
mail(1,8)/Maildir/.Drafts.Urgent, and all mail(1,8) software that supports
enhanced maildirs will interpret it as a subfolder Urgent of the Drafts
folder.
SHARED FOLDERS
This is another extension to the Maildir format that allows folders to
be shared between multiple clients.
Note:
The Courier-IMAP folder implements two types of shared folders:
filesystem permission-based shared folders, as well as virtual(5,8)
shared folders based on IMAP access(2,5) control lists. Use the
maildirmake command to implement shared folders based on
filesystem permissions. The maildiracl(1) command manages
access(2,5) control lists, which are used by virtual(5,8) shared folders.
See the Courier-IMAP server documentation for more information.
First, you need to create a collection of sharable folders, as a sepa-
rate maildir:
maildirmake -S /usr/local/share/maildirs/notices
Then, create individuals folders that will be accessed in(1,8) shared mode:
maildirmake -s write(1,2) -f Weekly /usr/local/share/maildirs/notices
In this example, the "Weekly" folder is created, with read(2,n,1 builtins)/write(1,2) access(2,5)
to everyone. Multiple folders can be created in(1,8) the same maildir(1,5), with
different access(2,5) permissions. Everyone can create a sharable maildir.
The access(2,5) privileges for individual folders are set(7,n,1 builtins) by the -s option,
and are implemented using traditional filesystem permissions.
Use the --add and --del options to add a sharable maildir(1,5) to an exist-
ing maildir. Client software that implements this extension will now
know where to find sharable folders:
maildirmake --add notices=/usr/local/share/maildirs/notices $HOME/Maildir
$HOME/Maildir is your main maildir. The argument to -add is nick=path.
nick is a nickname for this collection of sharable folders, and path is
the location of the sharable maildir. All folders in(1,8) the sharable
maildir(1,5) that you have access(2,5) to -- such as "Weekly", in(1,8) this case, will
now be accessible. Multiple sharable maildirs can be added, by giving
each one a unique nick.
The --del option "disconnects" the sharable maildir(1,5) from the main
maildir.
GLOBAL SHARED FOLDERS
Normally -add command must be run for every maildir(1,5) which needs to
access(2,5) the sharable maildir. Alternatively the file(1,n) /etc/courier-
imap/maildirshared can be created, to specify a default set(7,n,1 builtins) of sharable
maildirs. Each line in(1,8) this file(1,n) takes the following format:
nick<tab>path
nick is a short nickname for the sharable maildir(1,5), <tab> is a single
tab character, path is the pathname to the sharable maildir.
ACCESSING SHARED FOLDERS
You may have read(2,n,1 builtins) or write(1,2) access(2,5) to a shared folder. If you have
write(1,2) access(2,5), you can add messages to the shared folder. You can also
delete messages that you've added.
Anyone can create a sharable maildir(1,5), so if(3,n) the sharable maildir(1,5) is
actually created by you, can can delete any message, not just your own.
SEE ALSO
maildir(1,5)(5), maildiracl(1), maildirkw(1), maildrop(1), maildirquota(7),
deliverquota(8), maildropfilter(7),
http://www.qmail.org/man(1,5,7)/man5/maildir.html.
Double Precision, Inc. 07 February 2004 MAILDIRMAKE(1)