$ rm -rf ~/.maildir/ $ mutt /home/mmokrejs/.maildir does not exist. Create it? ([yes]/no): yes ... ---Mutt: (no mailbox) [Msgs:0]---(date/date)-----------------------------------------------------------------------------------------------------(all)--- /home/mmokrejs/.maildir/ is not a mailbox. I see why: $ ls -la .maildir total 8 drwx------ 2 mmokrejs mmokrejs 4096 Mar 1 14:42 . drwx--x--x 74 mmokrejs mmokrejs 4096 Mar 1 14:42 .. $ The cur/, tmp/ and new/ subdirs are missing.
What are your USE flags for mutt? Sorry it took so long. Please reopen with your flags, I'm fixing it with NEEDINFO so I can focus on the bugs I have info for. (Not because I don't consider this a bug). - ferdy
$ rm -rf ~/.maildir/ $ mutt $ ls -la .maildir/ total 8 drwx------ 2 mmokrejs mmokrejs 4096 Jun 8 21:52 . drwx--x--x 96 mmokrejs users 4096 Jun 8 21:52 .. $ emerge -pv mutt [ebuild R ] mail-client/mutt-1.5.16 USE="berkdb crypt gdbm gnutls gpgme nls nntp sasl smime ssl -debug -idn -imap -mbox -pop -qdbm -sidebar -smtp -vanilla" 0 kB $ So, I can reproduce it still on ~x86 host.
Ok.. so mutt-1.5.18 is doing the same. I wonder whether that's the desired functionality by upstream. I'll dig in the sources. - ferdy
can you please try 1.5.20?
Yes, same problem with 1.5.20.
mutt-1.5.20 main.c: [...] if (stat (fpath, &sb) == -1 && errno == ENOENT) { snprintf (msg, sizeof (msg), _("%s does not exist. Create it?"), Maildir); if (mutt_yesorno (msg, M_YES) == M_YES) { if (mkdir (fpath, 0700) == -1 && errno != EEXIST) mutt_error ( _("Can't create %s: %s."), Maildir, strerror (errno)); } } [...] Mutt just creates the $folder directory as seen above. It does not create {cur,new,temp} because we do not know whether the mailbox is maildir, mbox or something else at this point. Arguably, it is not mutt's job to create {cur,new,temp} directory structure when there are no messages. They should be created by LDA when a message arrives. Moreover, some of the errors OP gets are due to missing spool directory. "rm -rf .maildir" removes spool directory as well (assuming default /etc/mutt/Muttrc settings). Point spoolfile to a existing directory in Muttrc to get rid of them. While we are at it, it is perhaps time to make use of Sent and Drafts folders the default in Mutt. They are supported by Courier, Dovecot, Kmail, Thunderbird and probably other MUA and IMAP servers as well: --- /etc/mutt/Muttrc.orig 2009-07-19 16:22:43.000000000 +0300 +++ /etc/mutt/Muttrc 2009-07-19 19:52:28.000000000 +0300 @@ -8,9 +8,10 @@ # other than the index. set mbox_type=Maildir -set folder=~/.maildir -set spoolfile=~/.maildir/ -set record=~/.maildir-sent/ +set folder="~/.maildir" +set spoolfile="~/.maildir/" +set record="+.Sent" +set postponed="+.Drafts" set move=no # Maybe we shouldn't set index_format here, but this is a recommended
(In reply to comment #6) > While we are at it, it is perhaps time to make use of Sent and Drafts folders > the default in Mutt. They are supported by Courier, Dovecot, Kmail, > Thunderbird and probably other MUA and IMAP servers as well: > > --- /etc/mutt/Muttrc.orig 2009-07-19 16:22:43.000000000 +0300 > +++ /etc/mutt/Muttrc 2009-07-19 19:52:28.000000000 +0300 > @@ -8,9 +8,10 @@ > # other than the index. > > set mbox_type=Maildir > -set folder=~/.maildir > -set spoolfile=~/.maildir/ > -set record=~/.maildir-sent/ > +set folder="~/.maildir" > +set spoolfile="~/.maildir/" > +set record="+.Sent" > +set postponed="+.Drafts" > set move=no > > # Maybe we shouldn't set index_format here, but this is a recommended Shouldn't that be =Sent and =Drafts instead then? That's at least what they are called for me. Feels like a hairy issue with no real good default.
If you believe this to be a true Mutt error, please report it upstream: http://dev.mutt.org/trac/ With the analysis from comment #6, there is not much that we can do here.