Using email takes up a substantial part of the time I spent working with computers. I use an elaborate tool chain for managing email. In this text I document that tool chain, and some configurational tweaks that I have applied to it.
Short version:
MUA: mutt (using either local Maildir++ or a ssh-tunnel to my IMAP server) message managing: emacsclient for editing, signify for adding human readable signatures, gpg for adding machine readable signatures and encryption/decryption of messages) MTA: exim MDA: fetchmail, procmail Syncronisation: offlineimap Automatic archival/deletion: archivemail Spam-filters: greylistd, razor
On the server side I run a local IMAP-server with dovecot.
.procmailrc
mutt
. Save a message manually, type the non-existing directory name, and mutt
will create the dir (and its subdirs) for you.mutt
should look for new mail.rsync
that updated list from the IMAP server to $HOME
.Example:
To: pytrainer-devel@lists.sourceforge.net
.procmailrc
, here with the target dir .datorer.pytrainer/
(pytrainer
becomes a mapp in datorer
, using the maildir++
standard).:0: * ^TO_pytrainer-devel@lists.sourceforge.net .datorer.pytrainer/
bin/make-mailboxes-list
.#!/bin/bash # Run this file whenever .procmailrc is changed. TODO have file-alteration-monitor process automatically do this? BYTES=`grep -E /$ .procmailrc | grep -v -E '\$' | cut -d "." -f 2- | cut -d "/" -f 1 | sort | uniq | for i in $(cat /dev/stdin); do echo '='$i' \'; done | wc -c`; let BYTES=$BYTES-2; grep -E /$ .procmailrc | grep -v -E '\$' | grep -v -E '^#' | cut -d "." -f 2- | cut -d "/" -f 1 | sort | uniq | for i in $(cat /dev/stdin); do echo "=$i "; done | head -c $BYTES /dev/stdin | echo $(cat /dev/stdin) | cat > ~/.mailboxes
$HOME/.muttrc
rsync -v your.imap.server:.mailboxes $HOME/.mutt/mailboxes-your.imap.server
For this to work, you need a reference to this file in .mutt/muttrc
:
mailboxes = `cat ~/.mutt/mailboxes-your.imap.server`