I want to create a new folder from within Mutt. I use Maildir format to store the folders on the machine I am running Mutt on.

(I also view the mail remotely using courier IMAP but this doesnt involve Mutt)

Edited to clarify role of IMAP

link|improve this question

65% accept rate
I'm using Dovecot, and it supports activating the imapd directly from shell; for example, dovecot --exec-mail imap, which can be used for Mutt's set tunnel=. Maybe Courier has a similar thing too? It would allow mailbox creation within Mutt. (/usr/lib/courier/imap might be enough.) – grawity Jun 21 '10 at 16:20
feedback

3 Answers

c (change-folder), ? (list), Shift+C (create-mailbox)

link|improve this answer
This only works across IMAP (i have reworded my question). I wonder if I ought to be using maildirmake -f – justintime Jun 21 '10 at 8:26
@justin: Posted other answer. – grawity Jun 21 '10 at 9:57
feedback

If Mutt cannot create maildirs directly, it is easy to do it yourself. A "Maildir" format mail directory has nothing special except for three subdirectories cur/, new/ and tmp/ inside.

Assuming you want a directory named something, and your mail is kept under ~/mail/:

mkdir -p ~/mail/something/{cur,new,tmp}

Equivalent to:

mkdir ~/mail/something ~/mail/something/cur ~/mail/something/new ~/mail/something/tmp

Edit: Courier uses an ... unusual convention of maildir naming: if you want a hierarchy of, for example, Archive/2010/06, the folder name will be ~/mail/.Archive.2010.06/ while most other IMAP daemons would use ~/mail/Archive/2010/06/.

link|improve this answer
feedback

I usually just save some email to new not-yet-existing folder, and mutt creates the folder for me.

For me it's pretty intuitive, as there is no point in having folder without mails in it, so I just create it by saving there first mails that should go there.

link|improve this answer
How do you do that - if you type M it then gives me a list of existing mailboxes. Thanks – justintime Jun 24 '10 at 10:09
"M"? I don't know what "M" does. I just press "s" on index of maildir, and then I can type my requested folder name. – depesz Jun 24 '10 at 11:48
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.