HEX
Server: Apache
System: Linux s198.coreserver.jp 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC 2025 x86_64
User: nagasaki (10062)
PHP: 7.1.33
Disabled: NONE
Upload Files
File: //usr/lib/courier-imap/man/man1/maildirmake.1
.\"  <!-- $Id: maildirmake.sgml,v 1.5 2004/01/11 02:47:33 mrsam Exp $ -->
.\"  <!-- Copyright 1998 - 2003 Double Precision, Inc.  See COPYING for -->
.\"  <!-- distribution information. -->
.\" This manpage has been automatically generated by docbook2man 
.\" from a DocBook document.  This tool can be found at:
.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/> 
.\" Please send any bug reports, improvements, comments, patches, 
.\" etc. to Steve Cheng <steve@ggi-project.org>.
.TH "MAILDIRMAKE" "1" "02 September 2004" "Double Precision, Inc." ""

.SH NAME
maildirmake \- create maildirs and maildir folders
.SH SYNOPSIS

\fBmaildirmake\fR [ \fBoptions\fR\fI ...\fR ] \fB\fImaildir\fB\fR

.SH "DESCRIPTION"
.PP
The \fBmaildirmake\fR command creates maildirs, and
maildir folders.
This documentation
describes the \fBmaildirmake\fR command from the Courier
mail server, which creates an extended form of maildirs that implements
additional extensions beyond the basic maildir properties that were first
implemented in the Qmail mail server.
.SH "OPTIONS"
.TP
\fB-S\fR
create a "sharable" maildir.  A sharable maildir has
slightly different permissions which allows creation of publicly-shared
folders.
.TP
\fB-q \fIquota\fB\fR
install a quota on the maildir.
See "Maildir Quotas", below.
.TP
\fB-f \fIfolder\fB\fR
do not create a maildir, but create a folder in an
existing maildir.
.TP
\fB-s \fImode\fB\fR
create a publicly accessible folder in an
existing sharable maildir.  First, use the \fB-S\fR option to
create a sharable maildir.
Then, run \fBmaildirmake\fR again with the
\fB-s\fR option to create
publicly accessible folders.
\fImode\fR is a comma-separated list of
the following keywords: read - readonly folder, only you can
write messages to this folder;
write - anyone can read and
write messages to this folder;
group - only allow members of
your own system group to access messages in this folder (instead of
everyone).
.TP
\fB--add \fIname\fB=\fIpathname\fB, --del \fIname\fB\fR
create or delete the directories and links needed to
access shared folders.  See below for more information.
.SS "FOLDERS"
.PP
This \fBmaildirmake\fR command supports enhanced maildirs that
contain folders.
.PP
By itself, \fBmaildirmake\fR makes a new subdirectory
\fImaildir\fR,
and creates all the necessary structures.
The \fB-f\fR option
creates a new "folder" within an existing
\fImaildir\fR\&. \fImaildir\fR must
already exist, and the \fBmaildirmake\fR command will create a new
folder in the maildir.
.PP
Folders are simply subdirectories inside the main maildir whose names start
with a period, and which are themselves maildirs.
For example, the command
"\fBmaildirmake -f Drafts mail/Maildir\fR" creates
\fImail/Maildir/.Drafts\fR,
that has the usual \fItmp\fR,
\fInew\fR and \fIcur\fR\&.
You MUST use the \fB-f\fR option, instead of
specifying \fImail/Maildir/.Drafts\fR directly,
in order to correctly
initialize certain enhanced maildir features.
.PP
Folders cannot be created directly within other folders.
Running
\fBmaildirmake -f Urgent mail/Maildir/.Drafts\fR will not work.
Instead, the period character is designated as a hierarchy separator, run
\fBmaildirmake -f Drafts.Urgent mail/Maildir\fR instead.
This creates
\fImail/Maildir/.Drafts.Urgent\fR, and all mail software
that supports
enhanced maildirs will interpret it as a subfolder Urgent of the Drafts
folder.
.SS "SHARED FOLDERS"
.PP
This is another extension to the Maildir format that allows folders to be
shared between multiple clients.
.sp
.RS
.B "Note:"
.PP
The Courier-IMAP folder 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 \fBmaildirmake\fR command
to implement shared folders based on
filesystem permissions.
The
\fBmaildiracl\fR(1)
command manages access control lists, which
are used by virtual shared folders.
.PP
See the Courier-IMAP server documentation for more information.
.RE
.PP
First, you need to create a collection of
sharable folders, as a separate maildir:
.sp
.RS
.PP

.nf
\fBmaildirmake -S /usr/local/share/maildirs/notices\fR
.fi
.RE
.PP
Then, create individuals folders that will be accessed in shared mode:
.sp
.RS
.PP

.nf
\fBmaildirmake -s write -f Weekly /usr/local/share/maildirs/notices\fR
.fi
.RE
.PP
In this example, the "Weekly" folder is created,
with read/write access to everyone.
Multiple folders can be created in the same maildir, with different access
permissions. Everyone can create a sharable maildir.  The access privileges
for individual folders are set by the \fB-s\fR option, and are
implemented using traditional filesystem permissions.
.PP
Use the \fB--add\fR and
\fB--del\fR options to add a sharable maildir to
an existing maildir.  Client software that implements this extension will now
know where to find sharable folders:
.sp
.RS
.PP

.nf
\fBmaildirmake --add notices=/usr/local/share/maildirs/notices $HOME/Maildir\fR
.fi
.RE
.PP
\fI$HOME/Maildir\fR is your main maildir.
The argument to \fB-add\fR
is \fInick\fR=\fIpath\fR\&.
\fInick\fR is a nickname for this collection of
sharable folders, and \fIpath\fR is the location of the
sharable maildir.
All folders in the sharable maildir that you have access to -- such
as "Weekly", in this case, will now be accessible.
Multiple sharable maildirs can be added, by giving each one a unique
\fInick\fR\&.
.PP
The \fB--del\fR option "disconnects" the sharable maildir from
the main maildir.
.SS "GLOBAL SHARED FOLDERS"
.PP
Normally \fB-add\fR command must be run for every maildir
which needs
to access the sharable maildir. Alternatively the file
\fI/usr/lib/courier-imap/etc/maildirshared\fR can be created,
to specify a default set of sharable maildirs.
Each line in this file takes the following format:
.sp
.RS
.PP

.nf
\fInick\fR<tab>\fIpath\fR
.fi
.RE
.PP
\fInick\fR is a short nickname for
the sharable maildir, <tab>
is a single tab character, \fIpath\fR
is the pathname to the sharable maildir.
.SS "ACCESSING SHARED FOLDERS"
.PP
You may have read or write access to a shared folder.
If you have write
access, you can add messages to the shared folder. You can also delete
messages that you've added.
.PP
Anyone can create a sharable maildir, so if the sharable maildir
is actually created by you, can can delete any message, not just your
own.
.SH "SEE ALSO"
.PP
\fBmaildir\fR(5),
\fBmaildiracl\fR(1),
\fBmaildirkw\fR(1),
\fBmaildrop\fR(1),
\fBmaildirquota\fR(7),
\fBdeliverquota\fR(8),
\fBmaildropfilter\fR(7),
http://www.qmail.org/man/man5/maildir.html\&.