(converting from mbox) on a Debian system
Using maildir format
By default Mutt uses mbox format. This can easily be changed with
the following option in
From now on any new mailboxes created by Mutt will be in maildir format.
But before doing that you would want to convert your existing mailboxes
is the program to do this. You can
Before doing anything else I suggest making a backup of your Mail
directory with something like:
tar -czvf mail-backup-`date --iso-8601`.tgz ~/Mail/
which will create a .tgz backup named mail-backup-2003-05-14.tgz
The command to run to convert over to maildir is
mb2md -s /home/fred/Mail -R >>but
this command converts everything under /home/fred/Mail to
/home/fred/Maildir It does a perfect job except for one thing: the
new directories it creates all begin with a . (a dot) so:
/home/fred/Mail/mbox will become
I researched this a bit and found out that the reason they are converted
with a leading . (dot) is because the courier-imap daemon likes them
this way. Yet nowhere in any of the documents specifying the
maildir format did I see any mention of the necessity for a leading dot (for example see
I think it is a bad idea personally. Files beginning with a dot are hidden files in
Unix and it just doesn't make sense to me to hide my mailboxes.
Also, when Mutt is set to use maildir format with
when you create a new mailbox with it it does not prepend the mailbox
name with a dot either. I prefer to bypass this behavior of courier-imap which I do not plan on using anyhow. Another
application which now uses maildir format is KMail and it also omits the
There is a workaround for the leading "." issue with mb2md. Edit
and change the line that reads:
to the following:
#$destinationdir = "$temppath$destinationdir";
Now it will omit the leading dots on the new mailboxes.
Going back to the
folder variables in
we should change the following to these values:
If you want KMail compatibility then the folder should be named "Mail"
instead of "Maildir" and the mbox should be named "Inbox" instead of
"mbox". It is sort of nice to be able to choose between using Mutt
The changes that need to be made to
straightforward. Obviously since we aren't using ~/Mail anymore we
need to change:
(or leave it as
for KMail compatibility)
for KMail compatibility)
The other important changes to make are to now append a trailing slash
onto the name of every mailbox, since each mailbox is now a directory:
Trailing slashes are what tells procmail that the mailbox is a maildir
A Note about Exim and /var/mail
At this point everything on the user side of things is converted to
is still in mbox format.
This should not be an issue and I recommend NOT tampering with
Since most people are going to be using procmail anyways then reading mail from
will almost never be necessary. On very rare occasions some
messages may not get processed by procmail and may end up there.
With this configuration Mutt can still read mbox files however any new
mailboxes it creates will be in Maildir format.