Neomutt: "Create is only supported for IMAP mailboxes"

Created on 20 Jan 2021  路  5Comments  路  Source: neomutt/neomutt

I use Luke Smith's build of Neomutt (https://github.com/LukeSmithxyz/mutt-wizard/) and it uses isync to download mail. And I like to create folders for every type of mail (hello OCD 馃榾). But when I try to create new folder inside NeoMutt (printing c?C for example) it fails and writes "Create is only supported for IMAP mailboxes". But this configuration didn't use POP3. I dunno what's wrong. So now I create new folder with mkdir -p ~/.local/share/mail/[email protected]/Folder/{cur,new,tmp} and adding this folder to .muttrc file of my account which is BORING

How can I create folders inside NeoMutt?

question

Most helpful comment

that's https://github.com/neomutt/neomutt/issues/2701 and I should start moving my behind...

All 5 comments

Luke's setup uses local Maildir for neomutt, and a separate tool (mbsync) is used to download IMAP contents to your local disk.
Neomutt does not have direct connection to IMAP in this scenario. So your approach is in the right direction.

I recommend doing 3 things.
1) A macro to auto-discover nested Maildirs in your mail directory. Something along the lines:

mailboxes `for file in ~/.local/var/mail/main/*; do \
  box=$(basename "$file"); \
  if [ ! "$box" = '.' \
      -a ! "$box" = '..' \
      -a ! "$box" = ".notmuch" \
      -a ! "$box" = '.customflags' \
      -a ! "$box" = '.subscriptions' ]; then \
    echo -n "\"=$box\" "; \
  fi; \
done`

I use this snippet myself.

2) Have another macro to create local folders. Sorry, don't have one ready (share it if you end up writing it!)

3) make sure mbsync/isync is setup to support two-way sync, so that next time you sync mail your new folders are uploaded to IMAP server (you'd have to read mbsync manual in order to get the details straight)

that's https://github.com/neomutt/neomutt/issues/2701 and I should start moving my behind...

for file in ~/.local/var/mail/main/*; do \

@ngortheone, you can do it easier:

find ~/.local/share/mail/[email protected]/* -maxdepth 0 -type d | sed 's!.*/!!;s/^/"=/;s/$/"/' | tr '\n' ' '

@asakura42 yeah, I didn't spend much time thinking about that macro when I wrote it. It gets the job done for me. But thanks for improvement, I'll take it in.

I'll close this as the feature is being tracked in #2701 already. Thanks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rafaelleru picture rafaelleru  路  4Comments

misaflo picture misaflo  路  3Comments

protist picture protist  路  4Comments

anarcat picture anarcat  路  5Comments

anarcat picture anarcat  路  5Comments