Saturday, March 11, 2006

Spring Break - First Project

I have a rather involved system for dealing with my email. I've got a mail server running my own hybrid filtering system. I access the mailstore on that server using Binc IMAP and mutt. For what I want, it's nearly perfect.

The one gaping hole had been message searching. Mutt does have the idea of setting up a 'limit', and only displaying matching messages. Limiting only works in the current folder. More than that, if you want to limit based on body contents, all messages (and their attachments!) are downloaded to search the bodies. Sometimes this is slow.

I thought it might work to set up MHonArc and ht://Dig and then just access the archive for searching this way. This is what The Mail Archive does.

MHonArc is amazing for mailing list archives, where there's not any folder structure. Trying to impose a folder structure is very much a square peg with round hole of insufficient diameter proposition.

Beyond that, I couldn't find an easy way to get the kind of search excerpts out of ht://Dig that I wanted. Excellent general-purpose search tool. For email, archives, it seemed to be tripping over the headers a lot. I know there's a way around that, but I couldn't figure it out.

After a very late-night learning experience setting up the MHonArc and ht://Dig to get results that still weren't what I wanted, I got some sleep and put in a bit more thought about the mechanics of how this would work.

I'd need to use a browser to read archives. Somewhat annoying not to be able to search from within mutt. I'd also need to set up ssh tunneling to read archives from outside my house. No big deal, but somewhat annoying.

I should also set up an .htpassword to prevent house guests from reading my personal mail. I've got all of my mail stuff authenticating via checkpassword-pam, which gives me a nice single-sign-on system. If there's a way to get apache to use checkpassword-pam, I don't know it. So I'd need to remember to change that password as well to keep it in sync with my other passwords. Also not a big deal, but also annoying.

Becoming less convinced of the cleverness of that setup, I started googling around for other solutions. I stumbled across Mairix after encountering an amusing rant written by someone who appears at least as picky as I am.

Mairix is very cool. After adding: macro index S "!ssh -p PORT localhost mairix " and the appropriate modification to my preconnect to set up this tunnel, it integrates very nicely with mutt. I'm quite happy.

Thus concludes my first work-avoidance project of the week, and also my blog-resurrection.