# maildirmake(1) - man - phpMan

[MAILDIRMAKE(1)](https://www.chedong.com/phpMan.php/man/MAILDIRMAKE/1/markdown)                         Double Precision, Inc.                         [MAILDIRMAKE(1)](https://www.chedong.com/phpMan.php/man/MAILDIRMAKE/1/markdown)



## NAME
       maildirmake - create maildirs and maildir folders

## SYNOPSIS
       **maildirmake** [options...] {_maildir_}

## DESCRIPTION
       The **maildirmake** command creates maildirs, and maildir folders. This documentation describes
       the **maildirmake** 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.

## OPTIONS
### -S
           create a "sharable" maildir. A sharable maildir has slightly different permissions which
           allows creation of publicly-shared folders.

       -q _quota_
           install a quota on the maildir. See [**maildirquota**(7)](https://www.chedong.com/phpMan.php/man/maildirquota/7/markdown)[1], below.

       -f _folder_
           do not create a maildir, but create a folder in an existing maildir.

       -F _folder_
           Like the -f option, except that the folder's name is given using the system locale's
           character set. Non-Latin characters in the folder's name must be given to the -f option
           using IMAP's modified-UTF7 encoding. The -F option takes the folder name specified using
           the console's character set..

       -s _mode_
           create a publicly accessible folder in an existing sharable maildir. First, use the **-S**
           option to create a sharable maildir. Then, run **maildirmake** again with the **-s** option to
           create publicly accessible folders.  _mode_ 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).

       --add _name_=_pathname_, --del _name_
           create or delete the directories and links needed to access shared folders. See below for
           more information.

   **FOLDERS**
       This **maildirmake** command supports enhanced maildirs that contain folders.

       By itself, **maildirmake** makes a new subdirectory _maildir_, and creates all the necessary
       structures. The **-f** option creates a new "folder" within an existing _maildir_.  _maildir_ must
       already exist, and the **maildirmake** command will create a new folder in the maildir.

       Folders are simply subdirectories inside the main maildir whose names start with a period,
       and which are themselves maildirs. For example, the command "**maildirmake** **-f** **Drafts**
       **mail/Maildir**" creates mail/Maildir/.Drafts, that has the usual tmp, new and cur. You MUST use
       the **-f** option, instead of specifying mail/Maildir/.Drafts directly, in order to correctly
       initialize certain enhanced maildir features.

       Folders cannot be created directly within other folders. Running **maildirmake** **-f** **Urgent**
       **mail/Maildir/.Drafts** will not work. Instead, the period character is designated as a
       hierarchy separator, run **maildirmake** **-f** **Drafts.Urgent** **mail/Maildir** instead. This creates
       mail/Maildir/.Drafts.Urgent, and all mail 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 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 **maildirmake** command to implement shared folders based on
           filesystem permissions. The [**maildiracl**(1)](https://www.chedong.com/phpMan.php/man/maildiracl/1/markdown)[2] command manages access control lists, which
           are used by virtual shared folders.

           See the Courier IMAP server documentation for more information.

       First, you need to create a collection of sharable folders, as a separate maildir:

           **maildirmake** **-S** **/usr/local/share/maildirs/notices**

       Then, create individuals folders that will be accessed in shared mode:

           **maildirmake** **-s** **write** **-f** **Weekly** **/usr/local/share/maildirs/notices**

       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 **-s**
       option, and are implemented using traditional filesystem permissions.

       Use the **--add** and **--del** options to add a sharable maildir to an existing 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 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 _nick_.

       The **--del** option "disconnects" the sharable maildir from the main maildir.

   **GLOBAL** **SHARED** **FOLDERS**
       Normally **-add** command must be run for every maildir which needs to access the sharable
       maildir. Alternatively the file /etc/maildirshared can be created, to specify a default set
       of sharable maildirs. Each line in this file takes the following format:

           _nick_<tab>_path_

       _nick_ is a short nickname for the sharable maildir, <tab> is a single tab character, _path_ is
       the pathname to the sharable maildir.

   **ACCESSING** **SHARED** **FOLDERS**
       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.

       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.

## SEE ALSO
       [**maildir**(5)](https://www.chedong.com/phpMan.php/man/maildir/5/markdown)[3], [**maildiracl**(1)](https://www.chedong.com/phpMan.php/man/maildiracl/1/markdown)[2], [**maildirkw**(1)](https://www.chedong.com/phpMan.php/man/maildirkw/1/markdown)[4], [**maildrop**(1)](https://www.chedong.com/phpMan.php/man/maildrop/1/markdown)[5], [**maildirquota**(7)](https://www.chedong.com/phpMan.php/man/maildirquota/7/markdown)[1],
       [**deliverquota**(8)](https://www.chedong.com/phpMan.php/man/deliverquota/8/markdown)[6], [**maildropfilter**(7)](https://www.chedong.com/phpMan.php/man/maildropfilter/7/markdown)[7], **<http://www.qmail.org/man/man5/maildir.html>**.

## AUTHOR
### Sam Varshavchik
           Author

## NOTES
        1. [**maildirquota**(7)](https://www.chedong.com/phpMan.php/man/maildirquota/7/markdown)
           [set $man.base.url.for.relative.links]/maildirquota.html

        2. [**maildiracl**(1)](https://www.chedong.com/phpMan.php/man/maildiracl/1/markdown)
           [set $man.base.url.for.relative.links]/maildiracl.html

        3. [**maildir**(5)](https://www.chedong.com/phpMan.php/man/maildir/5/markdown)
           [set $man.base.url.for.relative.links]/maildir.html

        4. [**maildirkw**(1)](https://www.chedong.com/phpMan.php/man/maildirkw/1/markdown)
           [set $man.base.url.for.relative.links]/maildirkw.html

        5. [**maildrop**(1)](https://www.chedong.com/phpMan.php/man/maildrop/1/markdown)
           [set $man.base.url.for.relative.links]/maildrop.html

        6. [**deliverquota**(8)](https://www.chedong.com/phpMan.php/man/deliverquota/8/markdown)
           [set $man.base.url.for.relative.links]/deliverquota.html

        7. [**maildropfilter**(7)](https://www.chedong.com/phpMan.php/man/maildropfilter/7/markdown)
           [set $man.base.url.for.relative.links]/maildropfilter.html



Courier Mail Server                          06/20/2015                               [MAILDIRMAKE(1)](https://www.chedong.com/phpMan.php/man/MAILDIRMAKE/1/markdown)
