Converting from Mbox to Maildir mailboxes

Robin Whittle rw@firstpr.com.au
Fri, 10 Aug 2001 18:37:57 +1000


This is not an IMP-specific matter, but administrators of growing IMP
systems need heavy duty IMAP servers - so perhaps someone on this list
would be interested in converting to IMAP servers which use Maildir
mailboxes.


   http://www.firstpr.com.au/web-mail/mb2md/

This page has a perl script which takes one or more single file Mbox
format mailboxes (as used, for instance, by UW IMAP) and converts them
into a set of Maildir format mailboxes as used (for instance) by Courier
IMAP.  Maildir mailboxes are a set of three directories with each
message in a separate file.  It is much faster for addition, reading and
deletion of messages and it requires no locking at all when multiple
programs access the mailbox.  Amongst other things, this means the
Maildir mailboxes can be accessed via NFS on another machine.

This is not a master script to convert lots of users, or even to do the
job for any one user, but since by calling it appropriately, it can
handle the mailspool file and a directory full of Mbox mailboxes, it
should be possible to write another script to convert all the mailboxes
of one user, and then another script to convert multiple users.   If
anyone develops such higher level scripts, please let me know.

I used this script to convert mailboxes from my old University of
Washington IMAP sytstem to Courier IMAP, but the script should be
flexible enough to cope with whatever arrangements are used by other
IMAP servers.


  - Robin


Please refer to  http://www.firstpr.com.au/web-mail/ for:

  Postman    How I installed the C++ based Postman web-mail program 
             (from University of Valencia, Spain) on Red Hat 7.1 with 
             Courier IMAP, in August 2001.  Includes bugfixes and 
             improvements.  This is the system I am using now.  Also 
             something of a comparison between:  
           
                 Postman 
                 IMP      (but from mid 2000, not the latest 2001 
                           development with searching etc.) 
                 SqWebMail


  SqWebMail My notes on installing the C based Courier SqWebMail program 
            on Red Hat 7.1 with Courier IMAP. 


  RH71-Postfix-Courier-Maildrop-IMAP  Big documentation of how I 
            installed on Red Hat 7.1: 
  
                Postfix 
                Courier Maildrop - for mail filtering 
                Courier IMAP 
                An incomplete attempt at installing IMP. 


  Maildrop-mods-filtering  Three things here: 

                DELTAG. Modification to Maildrop to allow for 
                        delivering a message with the "Tagged for 
                        Deletion" IMAP flag set. 

                subjadd An external program to add labels to the 
                        Subject: lines of messages, such as [XYZ].  
                        (Also adds a subject line if there was none.)

                Notes and examples of Maildrop's excellent mail 
                filtering capabilities. 


  mb2md     A perl script to convert a bunch of Mbox mailboxes to 
            Maildir format. 


  IMP-How-I-did-it/0imp-etc_install.html  How I installed the IMP
            web-mail program with Red Hat 6.1 and Postfix in July 2000.