Mutt
From s5h.net
Mutt is a highly capable email client. It's strongest feature for me is that it's console based. This means it can run in screen on the vps which I rent from bitfolk without the requirement of an IMAP server running as it's capable of reading local mailboxes just fine.
The most confusing part of mutt is that you have to create your configuration for your mail box from scratch, but once this is done it's smooth sailing with email that's all readable as plain text and editable with your favourite editor.
Contents |
header caching
One of the most important features that I have found in mutt is the ability to cache headers. This means fewer mailbox scans and can dramatically improve the performance and load on backend NFS or local disks.
To enable header caching in mutt add the following:
set header_cache=/localdirectory/
Where localdirectory is (preferably) a local directory on your system where you can put header cache data. It's possible to make this a remote directory but you might cost yourself in network resource overhead.
maildir
Another really important thing with mutt is that you can use it with Maildir format mailboxes which makes header caching possible. The following will enable Maildir mailboxes:
set mbox_type=Maildir
from
Another great thing about mutt is that you can define the "envelope from" address field:
set from="user-xyz@s5h.net" set use_envelope_from=yes
This enables you to configure the address that your mail leaves with (I strongly suspect the -f parameter is defined when calling sendmail). One of the things I do as a qmail user is configure a user-default .qmail file and dish-out user-sitename@s5h.net addresses when using my email address on the web. When replying to this mail I have a script set the from header when replying, based on the Delivered-to header. It is then a very simple matter to filter this mail to defined Maildir boxes, which limits inbox spam.
256 colours
Not all terminals in the world can support 256 colours, but it's nice when they do. See the xterm-256color page for a listing of these. If you have your 256 colour terminal setup then why not make use of one of these themes, you can try them out using the :source command.
To enable the 256 colour set TERM=xterm-256color then make use of the extended colours.
conditional configuration
Sometimes you want to keep the same configuration files but have then operate differently depending on where it's being invoked (consider running with a NFS home directory mounted on different architectures).
In these instances you might want to make use of the pipe configuration source, consider this .muttrc snippet:
source "~/.mutt/script/editor|"
With this script contents:
#!/bin/sh
HOSTNAME=`hostname`;
if [ "$HOSTNAMEx" -eq "fileserverx" ] ; then
echo "set editor=\"/usr/local/vim-7.0/bin/vim\"";
fi;
In this case we're letting mutt process the output of this script as if it's a config file. If the hostname matches fileserver then we configure a different editor.
Other parameters are worth consideration on a NFS system, such as setting header cache to a local file system which is most likely going to be faster than where ~/.mutt (most likely a NFS), so directing header_cache to the local disks is probably going to improve user experience considerably.
