Can mutt be persuaded to use a sensible maildir hierarchy?

Chris Green cl at isbd.net
Fri Sep 25 12:33:24 UTC 2020


On Thu, Sep 24, 2020 at 09:02:29AM +0100, Chris Green wrote:
> On Wed, Sep 23, 2020 at 10:11:24PM -0500, Derek Martin wrote:
> > On Tue, Sep 22, 2020 at 05:46:53PM +0100, Chris Green wrote:
> > > Does mutt still use the (IMHO silly) maildir hierarchy where mail
> > > 'folders' are simply represented by another '.' and name in the
> > > maildir directory name?
> > 
> > I'm not sure why you think Mutt is doing this...  I have my maildir
> > folders set up in exactly the way you say you want and they work fine.
> > But Mutt, by and large, isn't what created that mailbox structure--it
> > was procmail.  Presumably it's also true for you that whatever is
> > delivering your mail is creating the directory structure, and mutt is
> > just consuming it.
> > 
> Yes, true enough, and your reply encourages me to try again.
> "Whatever is delivering your mail" in my case is my own Python filter
> script that receives mail via ~/.forward so that's easy enough to make
> do the right thing (I think!).
> 
> I think I may previously have tried with other delivery agents which
> use the maildir++ format.
> 
> Thanks!
> 
Just to report success.  It all appears to be working as I want with
'real' directories for my mail hierarchy.

It was basically quite simple to do, mostly using 'find', first to
create a copy of my old mbox directory hierarchy and then to run mb2md
against each mbox to the required destination in the new hierarchy.

Obviously there were a few changes to my muttrc to tell mutt to create
maildir rather than mbox and the delivery/filter program run by
.forward has to create maildir mails rather than mbox ones (which
makes it a lot simpler of course).

I use mairix for searches so that was pretty trivial to change over to
the new format too.

I think my previous encounters with maildir had forced me to use
maildir++ because I was using 'ready made' MDAs.  Now I have my own
MDA written in Python that is no longer an issue.

-- 
Chris Green


More information about the Mutt-users mailing list