— door Evert Mouw
This is a short technical howto post. I couldn’t easily find this information on the webs, especially the neomutt error messages related to this subject, so I store this on my blog for my future self and for others.
Folder Separator
Dovecot uses the dot (.
) as separator by default for Maildir and IMAP folders; Courier also uses the dot. Instead of a dot, one can also use a forward slash (/
) or something else. The forward slash is very common and you might prefer it.
Open for editing: /etc/dovecot/conf.d/10-mail.conf
Under namespace inbox {
, set:
1 2 3 4 |
separator = / prefix = inbox = yes subscriptions = yes |
Don’t forget a systemctl restart dovecot
and you’re good to go.
(Neo)Mutt
I sometimes use Mutt to read my mail from the CLI. For folder subscriptions, I use:
1 2 3 |
mailboxes =Sent mailboxes =Drafts mailboxes =Archives/`date +%Y` |
Also I use a save-hook
, which is an extra feature of neomutt compared to mutt:
1 |
save-hook . +Archives/`date +%Y` |
Note the forward slashes to indicate a yearly subfolder. If Dovecot is using its default setting, then you have to change replace those slashes to dots; or you can change your Dovecot configuration. If you don’t do this, then you will get error messages such as:
imap_copy_messages [a0021 NO [CANNOT] Invalid mailbox name: Name must not have ‘/’ characters
[CANNOT] Invalid mailbox name: Name must not have ‘/’ characters
