Mutt is a great mailer, and I've been using it now for some years. I have made use of a wide range of scripts and programs available from other mutt sites, but I will not go into details here as they are widely available.
Here is the latest manual for stable version 1.4 and here is the latest manual for unstable version 1.5.4.
Here I will talk about some changes that I have made to these scripts and programs and the mutt code itself.
First, a project to make mutt more user-friendly for chemists by using the "chemical" mime type needs its own page. I am currently updating these pages and new ones will be installed soon. Please e-mail me if interested.
Index for this page.
metamutt is a usefull little script that, among other things, allows you to split a single digest e-mail message from a mailing list into a temporary folder containing the separate items as separate messages and open a new version of mutt to read them. You simply link a key to "|metamutt -D" and hit the key when on the digest message. I found that some digests, particularly from yahoo groups, were broken in that the split messages did not identify the name of the sender. The problem was that the "From:" line was preceded by three spaces. I wrote a small perl script called premutt that you pipe the message through (link the key to "|premutt |metamutt -D". I put:-
macro index S "| premutt | metamutt -D\n"
in my muttrc file. The script also makes it easier to reply to the original sender.
Version 0.2 of the Mail Configuration Generator is out. MCG attempts to speed up (part of) the configuration of procmail and mutt from one single file. It relies on the concept of mutt profiles, rather than rewriting a bunch of folder-hooks every time, also because profiles can be sourced to set things even *without* entering a folder
The author is Marco Fioretti and as he says in the release announcement:- "Thanks to Brian Salter-Duke for testing, patches and feedback". I saw his announcement of version 0.1 and thought this was a wonderfull idea. It stops you repeating yourself in editing muttrc and procmailrc. One of the several suggestions I made was to create the new mail folder you want when you add a new mailing list. You need to add a procmail rule, add a new folder, add to "Mailboxes", add folder-hooks and send-hooks, etc. This tool makes all this so easy.
urlview is an extremely useful tool that by a simple key stroke (set in your .muttrc) displays all the URLs included in a mail message. You can then select one and pull up lynx, netscape, ftp or whatever. A very useful script - url_hander.sh - comes with urlview. This allows you to select a range of actions depending on the nature of the URL. You can download urlview-0.9.tar.gz - the latest version - from the mutt mirror sites.
I have modified url_handler.sh extensively to use ncftp, if the URL is a directory, or ncftpget, if the URL is a file to get the file directly. Here is the version after I modified it with some ideas from Pete Toscano:-
Note this script depends on the URL ending in "/" for a directory or not ending in "/" for a file. When you select a URL in urlview, it is displayed at the bottom of the screen. You can edit it to ensure that the "/" is there or not. Originally I added a reminder to the output, but some mutt developers and users thought this was too specific for the codes used - urlhandler and ncftp. I have now added a feature where the output displayed is determined by the user and is specifically the content of the three lines that follow a line containing only "MESSAGE" in the urlview configuration file - ~/.urlview or /etc/urlview.conf. If there is no MESSAGE entry in the urlview configuration file, urlview behaves as before except that there are a few blank lines above the menu of URLs. There is a diff that can be used to patch urlview.c. The original patch that I had here also added the ability to search the list of URLs using "/" for forward search and "?" for backward search. This feature was not written by me (it was just a patch floating around that I also wanted to add to version 7 of urlview) and it is now incorporated in version 0.9.
# # Sample urlview(1) configuration file # # regular expression to use to match URLs REGEXP ((((ht|f)tp)|mailto):(//)?[^ >"\t]*|(www|ftp)\.[-a-z0-9.]+ |[-a-z0-9_\.]+@[-a-z0-9.]+)[^ .,;\t>">)] # Use url_handler. COMMAND url_handler.sh %s # New facility to add message at top of list of URLs displayed. MESSAGE Using my urlhandler - mutt for mailto, lynx for http and ncftp or ncftpget for ftp. Selected URL can be edited. Add / to ftp directory URL to use ncftp rather than ncftpget. Ensure no / for file ftp URL to use ncftpget.
Note that the REGEXP is split for ease of reading. It should be all one line. The bit on the now second line finds e-mail addresses of the type "xxx@foo.bar.com. This is undoubtedly not the best way to do this and it may miss some user names. The (www|ftp) adds ftp.foo.bar.com to the URLs found over and above the .urlview that comes with the source code.
The "Little Brothers Database" (lbdb) is a usefull tool for searching small data bases to find e-mail addresses. I have lots of mutt aliases in several alias files and tend to forget them. I also use lbdb tools to save all e-mail addresses from received mail. This data base can be searched using the lbdb module m_inmail. I also use "abook" as an address book. I wanted to search the inmail and abook databases and all my mutt alias files, so I wrote m_muttalias as a a new module for lbdb.
lbdb is by Roland Rosenfeld. It uses a config file ~/.lbdb/lbdbrc to which I and Roland added:-
# - m_muttalias search $MUTTALIAS_FILES for aliases.
# - m_muttalias query set of mutt alias files.
#
# Set MUTTALIAS_FILES below to list of files in MUTT_DIRECTORY that
# contain mutt aliases. File names without leading slash will have
# $MUTT_DIRECTORY (defaults to $HOME/.mutt or $HOME, if ~/.mutt does
# not exist) prepended before the file name. Absolute file names
# (beginning with /) will be taken direct.
MUTT_DIRECTORY="$HOME/.mutt"
MUTTALIAS_FILES="muttrc local.muttrc school_alias mail_aliases new_alias"
METHODS="m_inmail m_muttalias m_abook"
I am grateful to Roland Rosennfeld for making some useful improvements to my basic code.
m_muttalias appears in the official release of lbdb. The latest version is 0.26. It is best obtained from there and installed with all the other modules.
Just update your mutt. These patches are no longer available as they are not needed in the current version of mutt.
abook is an external ncurses address book program for use with Mutt written by Jaakko Heinonen. Work done here has been to test abook on AIX and DEC Alpha OSF2 and report warnings or errors to Jaakko. Earlier versions worked fine on these platforms compiling with gcc, but I am no longer in a position to continue these tests.
Note that these patchs are somewhat old and that I am no longer interested in mixmaster support for mutt. I leave them here for anyone interested, but take care.
Mixmaster allows you to send messages through type 2 remailer chains so they are anonymous. You can compile mixmaster support into mutt, but this works only for mixmaster version 2.0.4. The latest version is 2.9b23 which is a beta for version 3 which will have a new protocol. Here is a patch that adds the "-T" flag to mixmaster 2.9b23. This flag is used by mutt to get the type2.list file to set up the chain-choice menu. Note that this version of mixmaster will work without a type2.list file, using just the mlist.txt file and pubring.mix. However to get it working with mutt, you do need a type2.list file that is compatable with the mlist.txt file.
Note that this patch also removes a warning in main.c that there is an ambiguous else clause.
Here is a patch for mutt itself that allows mutt to support mix's use of nym accounts for sending mail. Note that the patch was made for version 1.3.10 of mutt (the unstable branch) but all the changes are in the #ifdef MIXMASTER blocks that have not been changed for some time so it should work reasonably OK on version 1.2.5 and other recent versions. You must create a nym account through mixmaster first. Note that in all use of mixmaster 2.9 with mutt, the mail is not actually sent. It is placed in the pool. You need to clear the pool to send the messages. I use a macro:-
macro index \cs "!/u/b_duke/Mix/mix -S\n"
# Clear mixmaster pool.
to clear the pool and send the messages from in mutt.
Messages arriving from the nym account can be piped to mix from mutt to decrypt them properly using the nym secret key that is kept in nymsec.pgp in the mix directory, but this is not entirely satisfactory.