Using mutt's header_cache feature

In the past I needed to move old mails out to a backup folder occasionally, since it took too long for mutt to load all the headers when opening the maildir (often some 10 seconds for about 6000 mails).

Today I remembered that mutt should actually do header caching, so I looked it up in the docs, and saw that the config option was missing in my .muttrc. I put it in, restarted mutt, and after the cache was initialized the performance was noticeably better:

set header_cache="~/.mutt/headercache"

Mutt can actually use 3 kinds of database backends for the cache, bdb, gdbm and qdbm. The default in Debian is bdb, to use one of the others you have to flip a switch in debian/rules and recompile the package.

On my machine qdbm was fastest (gdbm slightly slower, dbm far behind), so I stuck with that. Since I use a self-compiled mutt package anyway (because I want my index_color patch included), it's not much of a problem.

published August 08, 2006
tags mutt

Tools for mutt

Tools

mutt-bug

This is a tool that displays Debian bug reports in mutt. You can then directly read all messages sent to the bug and reply. The messages are fetched directly from the web interface, so there is no delay between requesting bug and getting it per email.

This tool was originally written by Christoph Berg, I've made some modifications to make it work in arbitrary directories.

Useage:

$ mutt-bug bugnumber

Download: mutt-bug

gpgverify

gpg --verify is quite slow when you have large keyrings included (like the debian keyring). This is nasty, since mutt has to wait until gpg is finished when displaying a gpg signed message (with signature verification on). So I've written a tool that splits a huge keyring into a lot of smaller keyrings (one key per keyring) and a shell script to verify signatures, to be used from within mutt. The former tool is called splitkeyring.sh. The latter one is gpgverify.sh.

gpgverify.sh first invokes gpg --verify as normal and captures its output. If gpg failed because the key was not found in any keyring, the script looks if the key is in one of the splitted keyrings, and if so, reruns gpg with that keyring included. Otherwise the gpg error is returned.

These scripts are still hacky, if you want to use them you'll probably have to modify them a bit. They aren't too big, so this shouldn't be too much of a problem.

Download: gpgverify

A mutt patch for a more colorful index

This patch enables different colorings for different parts of the index display. For example you can choose one color for the subject, another one for the author, and a third one for the flags.

Screenshots:

  • Screenshot #1: Just a random screenshot...
  • Screenshot #2: Notice how messages written by me are differently colored then those from other authors. This is done using indexcolor's author pattern matching.

Downloads: