It's not difficult to guess, watching at the title, that this page is about Mutt. Mutt is a very well done, cross platform and feature rich MUA, that works under Linux, *BSD, OS X and even Windows. I'm using it on all my computers, because it's easy to use and very fast when it have to deal with a lot of emails. I use it primarly under OS X along with procmail as MDA, to filter emails in different folders.
Here you cand find some tips for a better use of mutt under OS X, in conjunction with general and cross-platform configuration.
Macports, formerly called
Darwinports, is a program to simplify installation of Open Source
Software unders OS X. It needs Xcode tools
from apple since it compiles all the software from source.
A quick
guide to install macports is here.
Mutt installtion is quite straightforward, as is the installation of
every other program supported by macports. To have my configuration
work correctly, mutt must be compiled with these variants (refer to
the official wiki
for further documentation):
Mutt's configuration starts from a file, called muttrc, that must be
placed under user's home directory or in /etc for system wide settings.
My configuration works for mutt 1.5.20, it won't work for mutt 1.4.X
and *maybe* for previous development releases as well. Every
configuration specific to a local installation (alternates, programs
location, crypto settings and so on) is sourced from external files, so
i can mantain only one main configuration file across several different
machines.
My muttrc is available here, every option
is well explained in the manual and
also has a brief comment above.
The main problem i faced switching from other mail clients to mutt was that, at least apparently, there isn't an easy way to use different mail profiles in mutt. Googling a bit i found this page, which suggests to use my_hdr to change the relevant headers. Under linux it was easy, because all the keys were correctly recognised, so i set a bunch of function keys to load my profiles and i got used to them. Every profile file was in the form
Obviously this method implies to study how hooks work, but it's really
worth the hassle :-)
I'm using lbdb to aggregate
OS X's addressbook and mutt internal contacts, and urlview to start the
browser when a mail contains an url. Here are my macros
and keybindings.
A useful bind is the one that inhibits ctrl-d. When in hurry I used to
delete messages when pressing "q" and then ctrl-d (to logout the shell)
without actually quitting mutt:
It costs just a little disk space, but header caching makes mutt significantly faster when a lot of emails in maildir format are in the same folder. This feature was available as a patch, but since mutt 1.5.7 is part of the main source tree. To enable it just point header_cache to a folder or a file (this feature must be enabled at compile time). There's a catch using this feature, when playing with the reply_regexp variable, caches must be deleted to see changes because the way threads are sorted gets cached too.
This is mine colors configuration, it's a modified version of ataualpa's one and it's good on a black background. A screenshot [~90K] is worth a million words ;^). It's also available an untested colors configuration for white background.
Under OS X my mailcap looks like this:
Which is nothing special, by the way ;^).
The script called (view_attachment.sh) is very effective and is written
by Eric Gebhart. I call it passing "-" as a parameter, so it doesn't
try to recognise file extension (and fail every time a filename
contains strange characters).
You can download my local copy.
Mutt can seamlessy integrate with external programs, to expand its functions. One is urlview, which can open url listed on email body.
Under OS X urlview is installable via fink or from macports, and its configuration is straightforward:
Mailtomutt must be set as the default mail application, obviously (!?!?!!!) Mail.app is used to configure this behaviour (see this page for a step by step guide). Mailtomutt will open mutt every time your programs want you to send mails to someone.