Maildir patch for Alpine
Patch is available for version:
This is the update of a similar
patch for Pine, and is configured similarly.
If you have already built Alpine before you apply this patch, you need to
execute the command "make clean" in the source code of Alpine. This is
done to make sure that the scripts that are executed at the beginning of
the compilation create the necessary links needed for compilation. If you
just unpacked Alpine you can just apply this patch and build as you normally
would. There are no extra configurations for this patch that can be
set from the configure script.
I have added support for the Courier/Cyrus/Dovecot file system,
read the configuration instructions.
If you are interested, you can read the list of the latest updates to this
Here is the way of using this patch.
- This patch assumes that your INBOX is located at "$HOME/Maildir". This
is a directory which should have three subdirectories "cur", "tmp" and "new".
If you read maildir from another directory in your $HOME directory
(e.g. .maildir), then set the variable maildir-location to reflect this
fact (e.g. maildir-location=.maildir). This is the best way to change
the path of the inbox. Set Inbox Path = #md/INBOX.
- You can create a collection of folders which are in maildir format. In
order to do that press M S L and add the following data:
Nickname: Anything, your choice
Observe that in a maildir collection you can only have maildir format folders,
folders in another format are ignored. This helps Alpine ignore other files
that are part of configuration of other servers (e.g. Cyrus, Courier). Folders
in a maildir collection are created in the maildir format. Folders in any
other collection are created in the format defined when building Alpine
(normally unix or mbox format, which is a default that is not changed by this patch).
It was noted by Jonathan Johnson that if you add the line
to the global Alpinerc file (normally in /usr/lib/pine.conf or in /etc/pine.conf),
then your users will be able to use Maildir as their default format.
- You can use your mail/ collection to store Maildir style folder. If
you want to add a maildir folder called foo to your mail/ collection make
sure that you are in the folder list screen and press A, then enter
You can have all types of folders in your mail/ collection, including Maildir
format. In other words, this patch allows you to have both worlds under the
same collection, or you can have a collection of only maildir folders.
- Here are directions on how to convert a mailbox from any format (supported
by Alpine) to maildir format.
- After building Alpine with this patch, use
the mailutil program. For example assume that you added a collection of Maildir
folders in the above step that is located in the "Mdir" directory, then
in order to transform your saved-messages folder into Maildir format you would
execute a command like:
mailutil copy ~/mail/saved-messages #driver.md/Mdir/saved-messages
This command will create a folder called saved-messages in the Mdir collection.
In particular it is assumed that that folder does not exist. If you
want to append messages to a maildir folder, foo in the Mdir collection
use the command
mailutil append ~/mail/saved-messages #driver.md/Mdir/foo
Finally if you want to create a Maildir folder called bar in the Mdir
collection use the command:
mailutil create #driver.md/Mdir/bar
- Use aggregate operations as you normally
would to tranfer messages between folders.
- The internal name (for Alpine) of this driver is , not
maildir. In particular, this also means that if you need to disable this driver
for any reason, you have to use the command
Hopefully you will never have to do this.
If you intend to use this patch in Cygwin notice that the separator
character used in Maildir was changed from ':' (a colon) to ';' (a
semicolon). Configure your Mail Delivery Agent (e.g Exim) to use such
character when delivering to a Maildir folder.
Please send me all
feedback you have about the patch so that it can be
improved in later versions.
Last Updated 18:14:52 MDT Thu Jun 02 2022.