Mutt Maildir Setup

Local terminal texted based email client.

Ubunutu 16.04

Base mutt Setup

This will setup mutt for use with Maildir, as well as subscribe to all folders in Maildir.

sudo apt install mutt
0600 user user ~/.muttrc
 1set mbox_type=Maildir
 2set spoolfile="~/Maildir/"
 3set folder="~/Maildir/"
 4set mask=".*"
 5set record="+.Sent"
 6set postponed="+.Drafts"
 7
 8# Generate mailboxes for each maildir subdir
 9mailboxes ! + `\
10for file in ~/Maildir/.*; do \
11  box=$(basename "$file"); \
12  if [ ! "$box" = '.' -a ! "$box" = '..' -a ! "$box" = '.customflags' \
13      -a ! "$box" = '.subscriptions' ]; then \
14   echo -n "\"+$box\" "; \
15  fi; \
16done`
17
18# Marcos to display folder list when changing maildir folders
19macro index c "<change-folder>?<toggle-mailboxes>" "open a different folder"
20macro pager c "<change-folder>?<toggle-mailboxes>" "open a different folder"
21
22# Macros to display folder list when copying/moving messages
23macro index C "<copy-message>?<toggle-mailboxes>" "copy a message to a mailbox"
24macro index M "<save-message>?<toggle-mailboxes>" "move a message to a mailbox"

References

  1. Mutt maildir FAQ

  2. Mutt maildir configuration