August 2003 Archives

I love you, mutt

| No Comments | No TrackBacks

It's been a busy week, that's for sure. Being a daddy X 3 plus everything else going on... it's not too overwhelming, but it's another gear to shift into. I'm just glad I'm not one of the few poor chums that has to deal with being a daddy X 3 all at once. :-)

Mutt rocks

Years ago, I exclusively used the elm program to read my e-mail. A lot of people I worked with (that also used console e-mail clients), used pine. The pine mail program always seemed more user-friendly than elm, but the trade-off was that you had to wade through menus to get to everything, whereas with elm it was just a matter of a keystroke or two to get to anything.

Well, development on the elm mailreader has slowly died. About six years ago or so, I started using mutt full-time. Transitioning to mutt from elm was pretty easy since mutt shares a lot of the same keybinding as elm. I like how it uses well-known VI keys for movement like elm did.

A traditional GUI user watching me over my shoulder as I read e-mail might be confused as to why I use such an “antiquated” method of communication. I've used GUI mail programs like Eudora and (ewww) Outlook and various web-based mail clients, but nothing compares to the simplicity of mutt.

Some people complain that I can't read HTML e-mail. Well, it's not that I can't read it. I can pipe the HTML into a web browser if I want... but that's not really the point. I shouldn't have to read HTML-formatted e-mail. E-mail boils down to text. If you want to send along an HTML attachment of your message, fine, but always send text. It's just a good idea.

Why am I going on and on about this? It's because I discovered yet-another-cool-thing about mutt (YACTAM) tonight. It seems like an endless journey the more I use it. Cool thing after cool thing.

The cool thing I learned tonight is the ; key. It allows you to do operations on multiple messages. For example, let's say Wendy — a girl that I liked in junior high — starts e-mailing me a lot. I could tag all the messages from Wendy by hitting T, which asks me for a regular expression pattern to use to tag messages. I would type wendy. All the messages from Wendy would then be tagged. Then, I could hit ; followed by s to save all the tagged messages to a mailbox. I'm prompted for a mailbox name and then, Voila! all the messages I tagged are moved into a different mailbox.

That whole operation would take 3 keystrokes, plus the pattern to match all the messages I wanted to tag and the name of the destination mailbox. That's a small amount of work for a complex task!

And I wouldn't have to touch my mouse once. :-)

Let's say you get a lot of spam espousing the life-changing benefits of and inexpensive methods of procurring Viagra. Assuming you have no need for Viagra, you would probably just delete these messages (after feeding them to your local Bayesian filter like SpamAssassin, of course), but they're probably spread out all over your mailbox.

Well, with mutt, it's easy: T, viagra, ;, then d and they're all gone.

But wait, there's more!

There's an even-easier way to do this. The D keystroke let's you delete multiple messages that match a pattern. This reduces the work you have to do down to this: D then viagra and you're done.

I love mutt.

Just a note about SpamAssassin.

SpamAssassin error: Inappropriate ioctl for device

I ran into this problem on a Red Hat box after I installed Red Hat 9 on new hard drives after the old hard drives (which had Red Hat 8 installed) died. I had a backup of the SpamAssassin Bayes database and restored it in the same location on the Red Hat 9 system, but everytime I started the SpamAssassin daemon, I got this error:

Aug 11 20:57:06 mail spamd[20318]: Cannot open bayes_path /var/lib/spamassassin/bayes.tokens R/O: Inappropriate ioctl for device

This was confusing to me.

I searched all over the Net for a solution, but found none. Finally, I figured it out on my own. :-)

I executed the file command on the backed-up database files and got this:

Berkeley DB (Hash, version 7, native byte-order)

When I ran the file command on new database files created by SpamAssassin, I got this:

GNU dbm 1.x or ndbm database, little endian

I looked through the SpamAssassin code and discovered that it could use the GDBM_File module and the DB_File module for tie-ing hashes to databases. THe GDBM_File module was installed and the DB_File module was not.

Once I installed the DB_File module, SpamAssassin was able to use the restored databases files just fine.

About this Archive

This page is an archive of entries from August 2003 listed from newest to oldest.

July 2003 is the previous archive.

October 2003 is the next archive.

Find recent content on the main index or look in the archives to find all content.