Mutt loving

18 Jan, 2005

One of my main gripes with Mutt was how cumbersome it was to manage mailing lists. Every time I subscribed to a new mailing list I had to A. add a new line to .procmailrc for filtering, B. create a new maildir and C. add the mailing list and mailbox to lists and mailboxes in .muttrc.

Now, thanks to some very good advice from LinuxBrit, this is all automatic.

.procmailrc figures out what is a mailing list and creates a new maildir in the lists directory:

:0:
* ^X-Mailing-List:[   ]< /[^ >`']+
lists/`echo $MATCH | sed -e 's/[/]/_/g' | tr A-Z a-z`/
</>

Mutt itself figures out what lists I read, and what mailboxes to watch:

unsubscribe *
subscribe `cd ~/mail/lists && echo *`

mailboxes /home/sa/mail/root
mailboxes `for file in ~/mail/lists/*; do echo -n "~/mail/lists/$(basename $file) "; done`

And, as always I found some more Mutt goodness (cannibalising someone elses .muttrc is great!)

bind  pager      exit
bind  pager     view-attachments
bind  attach     exit
bind  attach    view-attach
bind  index     display-message
macro index      "c?"
bind  browser   select-entry
bind  browser    exit

Those are very good keybindings for navigation Mutt with one hand!

I uploaded my some of my dot-files dot files.