FAQ about patches | More patches | Main Page | MD5 sum for this patch

Maildir patch for Pine
Patch is available for version: pine 4.58 pine 4.60 pine 4.61 pine 4.62 pine 4.63 pine 4.64
 
Upgrade to version 4.63 If you are using the #mc/ collection please use the latest version of the patch.
 
I took the maildir patch that SuSe distributes and rewrote most of the functions in that patch so as to have a fully functional patch.
 
If you have already built Pine before you apply this patch, you need to execute the command "./build clean" in the source code of Pine. 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 Pine you can just apply this patch and build as you normally would.
 
I have added support for the Courier/Cyrus file system, read the configuration instructions.
 
If you are interested, you can read the list of the latest updates to this patch. 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". A new option was added which allows you to specify the location of the Maildir directory, if your system does not use Maildir, this was added so that administrator have a way to specify this directory for everyone without editing the patch. The configuration option is called "maildir-location", and it is the name of the directory where your INBOX in maildir format is located. For example, if you define this variable to be ".maildir", it means that Pine will look for your INBOX in the directory "~/.maildir".
  • If you want to use the above configuration as your inbox, you must define your inbox-path as "#md/inbox" (no quotes). You can configure this from the setup screen as follows. Put the cursor over inbox-path, press Return and remove any value that appears there (leave it empty), now press return again and enter "#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
    Server:
    Path: #md/relative/path/to/home
    View:

     
    Observe that in a maildir collection you can only have maildir format folders, folders in another format are ignored. Folders in this collection are created in the maildir format. Folders in any other collection are created in the format defined when building Pine (normally unix or mbox format, this is a default which is not changed by this patch).
     
    It was noted by Jonathan Johnson that if you add the line
     
    folder-collections=Mail #md/Maildir/[]
     
    to the global pinerc 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
     
    #driver.md/mail/foo
     
    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 Pine) to maildir format.
    1. Not Using Pine After building Pine 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
       
    2. Using Pine Use aggregate operations as you normally would to tranfer messages between folders.
  • The internal name (for Pine) of this driver is md, not maildir. In particular, this also means that if you need to disable this driver for any reason, you have to use the command
     
    disable-these-drivers=md
     
    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.
     
    Thanks

Last Updated 14:09:29 PST Fri Nov 23 2007.