Just another little mutt page
Mutt (http://www.mutt.org/) is a highly configurable and therefore very flexible mail user agent (MUA) for UNIXes and other OSes supporting MIME, IMAP, POP, color, threading and multiple inboxes - and all that without the need of having a GUI. It's simply the best of both worlds: Elm and Pine. :-)
Here you'll find some of my own tips & tricks regarding mutt. Maybe this page will become bigger some day. (Just set it up because Sven Guckes gave me a broad hint to write a little bit of my own about mutt. ;-)
.muttrc: Splitting the
.muttrc in several files - preferable located in
~/.mutt/ - which are sourced by the
~/.muttrc/. Some advantages of such splitting:
~/.muttrc is forseeable, some feature (like colors or
using mutliple signatures) can bei disabled bei just adding one
# in the
.muttrc, etc. E.g. I have the
following files in
aliases: The file for aliases.
bindings: All key bindings are located here.
folders: Mailboxes, mail directory, folder-hooks, compressed folder hooks: All those things can be found here.
hooks: Here are all fcc- and save-hooks listed.
signatures: Here are the send-hooks for different signature file defined.
colors: Color definitions.
format: Format strings for index and status layout, etc.
macros: Macro definitions
pgp: All configuration variables concerning PGP.
autoview: Handling MIME attachments, etc.
headers: Weedout list and my own extra headers.
lists: Everything (aliases, fcc- and save-hooks) concerning mailing-lists.
muttrc: Configuration variables for mutt's general behaviour.
~/.muttrc itself then looks like that:
Device-dependent configuration: I use mutt as well in big
sized xterms as on VT100 text terminals. Therefore I need different
configurations, e.g. no suspending in xterms, short status bars on
80x25 screens, etc. I manage this with a little file source in my
.tcshrc: I called
config.tcsh and it's
~/.mutt/. It's content looks like the
The environment variable
$NO_X is set in the file
.login in dependence of
$REMOTEHOST, so that it's set,
if I login from some machine with text terminal or simple telnet.
As you see above, especially those format strings, some indication characters and some other features are disabled or enabled according to the used terminal.
The approriate part of my .muttrc (and its sourced files) look like that:
$EDITOR are set to
Because GNU Emacs is the best ;-) editor, I use mutt with GNU Emacs
emacsclient. I use the
is derivate of the
for automagical line breaks and
font-lock for having a
colorful day. The appropriate part of my
.emacs look like that:
Some of this code I got from Vincent Lefevre, who has also a mutt page.
When logging in from a non-X-machine I automatically start
screen with a shell (
emacs. Therefore my
~/.screenrc looks like this:
where mutt-screen-start is a script, which sources my
config.tcsh first and then
This is necessary, because screen doesn't source the shell's init file
~/.tcshrc) automatically when executing a program
in a screen window.
I had the following problem: Some of our local mailing lists are reachable on various machines of which some have up to four DNS entries. And be sure: All four are used in mails. But if I want to have the list name instead of the list address displayed in my index, I have to create an alias for each address a list has, because mutt doesn't (yet) support some kind of regexp-using display aliases.
So I wrote a little PERL script called
(you can also download a gzipped
version) which gets lists of equivalent hostnames and expands
automatically all aliases which are defined with
alias. Distributed under
For example, the file
(size: 684 bytes) becomes
(size: 1,375 bytes). You can also
compare them on one page. (I
know that the files are much too wide to be displayed on one screen,
but I don't see any possibility to change that...)-:
expandalias.pl lists.readable > lists.mutt-usable
expandhost from to
xalias alias address