<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> <HTML ><HEAD ><link rel='stylesheet' type='text/css' href='manpage.css'> <!-- $Id: maildirmake.sgml,v 1.3 2003/01/23 13:26:51 mrsam Exp $ --> <!-- Copyright 1998 - 2001 Double Precision, Inc. See COPYING for --> <!-- distribution information. --> <meta name="MSSmartTagsPreventParsing" content="TRUE"> <link rel="icon" href="icon.gif" type="image/gif" /> <TITLE >maildirmake</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+ "></HEAD ><BODY CLASS="REFENTRY" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><H1 ><A name="maildirmake" ></A >maildirmake</H1 ><DIV CLASS="REFNAMEDIV" ><A name="aen10" ></A ><H2 >Name</H2 >maildirmake -- create maildirs and maildir folders</DIV ><DIV CLASS="REFSYNOPSISDIV" ><A name="aen13" ></A ><H2 >Synopsis</H2 ><P ><B CLASS="COMMAND" >maildirmake</B > [options...] {<TT CLASS="REPLACEABLE" ><I >maildir</I ></TT >}</P ></DIV ><DIV CLASS="REFSECT1" ><A name="aen19" ></A ><H2 >DESCRIPTION</H2 ><P >The <B CLASS="COMMAND" >maildirmake</B > command creates maildirs, and maildir folders. This documentation describes the <B CLASS="COMMAND" >maildirmake</B > 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.</P ></DIV ><DIV CLASS="REFSECT1" ><A name="aen24" ></A ><H2 >OPTIONS</H2 ><P ></P ><DIV CLASS="VARIABLELIST" ><DL ><DT ><TT CLASS="LITERAL" >-S</TT ></DT ><DD ><P >create a "sharable" maildir. A sharable maildir has slightly different permissions which allows creation of publicly-shared folders.</P ></DD ></DL ></DIV ><P ></P ><DIV CLASS="VARIABLELIST" ><DL ><DT ><TT CLASS="LITERAL" >-q</TT > <TT CLASS="REPLACEABLE" ><I >quota</I ></TT ></DT ><DD ><P >install a quota on the maildir. See "Maildir Quotas", below.</P ></DD ></DL ></DIV ><P ></P ><DIV CLASS="VARIABLELIST" ><DL ><DT ><TT CLASS="LITERAL" >-f</TT > <TT CLASS="REPLACEABLE" ><I >folder</I ></TT ></DT ><DD ><P >do not create a maildir, but create a folder in an existing maildir.</P ></DD ></DL ></DIV ><P ></P ><DIV CLASS="VARIABLELIST" ><DL ><DT ><TT CLASS="LITERAL" >-s</TT > <TT CLASS="REPLACEABLE" ><I >mode</I ></TT ></DT ><DD ><P >create a publicly accessible folder in an existing sharable maildir. First, use the <TT CLASS="OPTION" >-S</TT > option to create a sharable maildir. Then, run <B CLASS="COMMAND" >maildirmake</B > again with the <TT CLASS="OPTION" >-s</TT > option to create publicly accessible folders. <TT CLASS="REPLACEABLE" ><I >mode</I ></TT > is a comma-separated list of the following keywords: <TT CLASS="LITERAL" >read</TT > - readonly folder, only you can write messages to this folder; <TT CLASS="LITERAL" >write</TT > - anyone can read and write messages to this folder; <TT CLASS="LITERAL" >group</TT > - only allow members of your own system group to access messages in this folder (instead of everyone).</P ></DD ></DL ></DIV ><P ></P ><DIV CLASS="VARIABLELIST" ><DL ><DT ><TT CLASS="LITERAL" >--add</TT > <TT CLASS="REPLACEABLE" ><I >name</I ></TT >=<TT CLASS="REPLACEABLE" ><I >pathname</I ></TT >, <TT CLASS="LITERAL" >--del</TT > <TT CLASS="REPLACEABLE" ><I >name</I ></TT ></DT ><DD ><P >create or delete the directories and links needed to access shared folders. See below for more information.</P ></DD ></DL ></DIV ><DIV CLASS="REFSECT2" ><A name="aen70" ></A ><H3 >FOLDERS</H3 ><P >This <B CLASS="COMMAND" >maildirmake</B > command supports enhanced maildirs that contain folders.</P ><P >By itself, <B CLASS="COMMAND" >maildirmake</B > makes a new subdirectory <TT CLASS="REPLACEABLE" ><I >maildir</I ></TT >, and creates all the necessary structures. The <TT CLASS="OPTION" >-f</TT > option creates a new "folder" within an existing <TT CLASS="REPLACEABLE" ><I >maildir</I ></TT >. <TT CLASS="REPLACEABLE" ><I >maildir</I ></TT > must already exist, and the <B CLASS="COMMAND" >maildirmake</B > command will create a new folder in the maildir.</P ><P >Folders are simply subdirectories inside the main maildir whose names start with a period, and which are themselves maildirs. For example, the command "<B CLASS="COMMAND" >maildirmake -f Drafts mail/Maildir</B >" creates <TT CLASS="FILENAME" >mail/Maildir/.Drafts</TT >, that has the usual <TT CLASS="FILENAME" >tmp</TT >, <TT CLASS="FILENAME" >new</TT > and <TT CLASS="FILENAME" >cur</TT >. You MUST use the <TT CLASS="OPTION" >-f</TT > option, instead of specifying <TT CLASS="FILENAME" >mail/Maildir/.Drafts</TT > directly, in order to correctly initialize certain enhanced maildir features.</P ><P >Folders cannot be created directly within other folders. Running <B CLASS="COMMAND" >maildirmake -f Urgent mail/Maildir/.Drafts</B > will not work. Instead, the period character is designated as a hierarchy separator, run <B CLASS="COMMAND" >maildirmake -f Drafts.Urgent mail/Maildir</B > instead. This creates <TT CLASS="FILENAME" >mail/Maildir/.Drafts.Urgent</TT >, and all mail software that supports enhanced maildirs will interpret it as a subfolder Urgent of the Drafts folder.</P ></DIV ><DIV CLASS="REFSECT2" ><A name="aen93" ></A ><H3 >SHARED FOLDERS</H3 ><P >This is another extension to the Maildir format that allows folders to be shared between multiple clients. First, you need to create a collection of sharable folders, as a separate maildir: <A NAME="AEN96" ></A ><BLOCKQUOTE CLASS="BLOCKQUOTE" ><DIV CLASS="INFORMALEXAMPLE" ><A name="aen97" ></A ><P ></P ><P CLASS="LITERALLAYOUT" ><B CLASS="COMMAND" >maildirmake -S /usr/local/share/maildirs/notices</B ></P ><P ></P ></DIV ></BLOCKQUOTE ></P ><P >Then, create individuals folders that will be accessed in shared mode: <A NAME="AEN101" ></A ><BLOCKQUOTE CLASS="BLOCKQUOTE" ><DIV CLASS="INFORMALEXAMPLE" ><A name="aen102" ></A ><P ></P ><P CLASS="LITERALLAYOUT" ><B CLASS="COMMAND" >maildirmake -s write -f Weekly /usr/local/share/maildirs/notices</B ></P ><P ></P ></DIV ></BLOCKQUOTE ></P ><P >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 <TT CLASS="OPTION" >-s</TT > option, and are implemented using traditional filesystem permissions.</P ><P >Use the <TT CLASS="OPTION" >--add</TT > and <TT CLASS="OPTION" >--del</TT > options to add a sharable maildir to an existing maildir. Client software that implements this extension will now know where to find sharable folders: <A NAME="AEN110" ></A ><BLOCKQUOTE CLASS="BLOCKQUOTE" ><DIV CLASS="INFORMALEXAMPLE" ><A name="aen111" ></A ><P ></P ><P CLASS="LITERALLAYOUT" ><B CLASS="COMMAND" >maildirmake --add notices=/usr/local/share/maildirs/notices $HOME/Maildir</B ></P ><P ></P ></DIV ></BLOCKQUOTE ></P ><P ><TT CLASS="FILENAME" >$HOME/Maildir</TT > is your main maildir. The argument to <TT CLASS="OPTION" >-add</TT > is <TT CLASS="REPLACEABLE" ><I >nick</I ></TT >=<TT CLASS="REPLACEABLE" ><I >path</I ></TT >. <TT CLASS="REPLACEABLE" ><I >nick</I ></TT > is a nickname for this collection of sharable folders, and <TT CLASS="REPLACEABLE" ><I >path</I ></TT > 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 <TT CLASS="REPLACEABLE" ><I >nick</I ></TT >.</P ><P >The <TT CLASS="OPTION" >--del</TT > option "disconnects" the sharable maildir from the main maildir.</P ></DIV ><DIV CLASS="REFSECT2" ><A name="aen124" ></A ><H3 >GLOBAL SHARED FOLDERS</H3 ><P >Normally <TT CLASS="OPTION" >-add</TT > command must be run for every maildir which needs to access the sharable maildir. Alternatively the file <TT CLASS="FILENAME" >/etc/courier/maildirshared</TT > can be created, to specify a default set of sharable maildirs. Each line in this file takes the following format: <A NAME="AEN129" ></A ><BLOCKQUOTE CLASS="BLOCKQUOTE" ><DIV CLASS="INFORMALEXAMPLE" ><A name="aen130" ></A ><P ></P ><P CLASS="LITERALLAYOUT" ><TT CLASS="REPLACEABLE" ><I >nick</I ></TT ><SPAN CLASS="TOKEN" ><tab></SPAN ><TT CLASS="REPLACEABLE" ><I >path</I ></TT ></P ><P ></P ></DIV ></BLOCKQUOTE ></P ><P ><TT CLASS="REPLACEABLE" ><I >nick</I ></TT > is a short nickname for the sharable maildir, <SPAN CLASS="TOKEN" ><tab></SPAN > is a single tab character, <TT CLASS="REPLACEABLE" ><I >path</I ></TT > is the pathname to the sharable maildir.</P ></DIV ><DIV CLASS="REFSECT2" ><A name="aen139" ></A ><H3 >ACCESSING SHARED FOLDERS</H3 ><P >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.</P ><P >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.</P ></DIV ></DIV ><DIV CLASS="REFSECT1" ><A name="aen143" ></A ><H2 >SEE ALSO</H2 ><P ><A HREF="maildir.html" TARGET="_top" ><SPAN CLASS="CITEREFENTRY" ><SPAN CLASS="REFENTRYTITLE" >maildir</SPAN >(5)</SPAN ></A >, <A HREF="maildrop.html" TARGET="_top" ><SPAN CLASS="CITEREFENTRY" ><SPAN CLASS="REFENTRYTITLE" >maildrop</SPAN >(1)</SPAN ></A >, <A HREF="maildirquota.html" TARGET="_top" ><SPAN CLASS="CITEREFENTRY" ><SPAN CLASS="REFENTRYTITLE" >maildirquota</SPAN >(7)</SPAN ></A >, <A HREF="deliverquota.html" TARGET="_top" ><SPAN CLASS="CITEREFENTRY" ><SPAN CLASS="REFENTRYTITLE" >deliverquota</SPAN >(8)</SPAN ></A >, <A HREF="maildropfilter.html" TARGET="_top" ><SPAN CLASS="CITEREFENTRY" ><SPAN CLASS="REFENTRYTITLE" >maildropfilter</SPAN >(7)</SPAN ></A >, <A HREF="http://www.qmail.org/man/man5/maildir.html" TARGET="_top" >http://www.qmail.org/man/man5/maildir.html</A >.</P ></DIV ></BODY ></HTML >