Friday, March 28, 2008

Switching to Kmail

I've used Gnome Evolution for many years. I've looked at various email clients over the years (sylpheed, kmail, thunderbird, and very long ago, pine, mutt, elm and mail) and Evolution had the right mix of features that I needed.

Mainly, I stuck with Evolution because it has realtime-updated search folders. That is, it's possible to create a virtual "Folder" that is actually a search into other real folders, with logical criteria. It's like a view in SQL.

I used that for having an "Everything" folder, which was a view into all emails in all real folders (because I cut my email apart into many folders, for easier management, and so that I don't have a single large Inbox with 50,000+ emails in it). I also used it for showing unread email for some very voluminous mailing lists. In evolution, it's not convenient to find the next unread message (well, I never spent the time to find the keyboard shortcut for that, although there probably is one). So I just created search folders that showed only unread messages.

An upgrade to ubuntu gutsy's Evolution has left evolution slightly unstable though. Evolution would crash for no reason, or it would crash because, just after starting it, while it was fetching mail, I would click on the fetch mail icon and it would get confused. Evolution also feels like it's not being maintained. That's no big deal since it's already pretty complete, but I've been seeing it get unstable as crash bugs aren't fixed while some new features get in. So I decided I needed to switch to some other mailer.

I looked at Kmail and Thunderbird. Sylpheed-claws doesn't install cleanly as a package in Gutsy (or in my config, anyway), so I just ignored that.

Kmail has pretty much all the features I needed (and some I wanted):

1. Choice of maildir or mbox (I tested maildir last night on reiserfs and xfs,
I expected reiserfs to be much faster than xfs. Was very surprised to see
xfs (1.5 minutes) beat reiserfs (2.5 minutes) in a simple little "read many
little files and search for a string" benchmark). Fortunately, my /home is
already a luks encrypted xfs.

2. Strong mail filtering functionality. A nice surprise is the automatic
anti-spam support. It supports both bogofilter and spamassassin, and
it creates filters which will register an email as either spam or ham
using the bayesian classifier in either of those. The filters just
classify the email as spam or ham and then either move the email to the
spam directory or keep it in the current directory. I had scripts to
do that in Evolution. Didn't think to do it with Evolution's built-in
filters though.

3. Search/Virtual folders.

It's slow though. Slower than evolution at most things, and I can make it pause with some large tasks (evolution seems to be much more multi-threaded or multi-process or whatever, in any case, it's harder to make the UI pause). And the Search/Virtual folders have a stupid bug (or maybe it's a feature, I don't understand how that could be though). When the preview pane is displayed, clicking on a virtual folder makes all unread email in that folder automatically change their status to read. This is bogus. It might make sense if the email that is selected in that folder is marked read, but not ALL of them. There's a bug report on it. I don't know why it's a wishlist. I think I saw this bug already the last time I looked at Kmail and I backed off from switching then.

This time I switched anyway because Kmail has keyboard shortcuts to go to the first, next, prev,last unread emails. That's enough of a workaround that I can deal with switching. I'll be able to work with my large mailing list email folders. I won't be using Saved/Virtual folders for much else and I can wait for this bogosity to be resolved.

I looked at Thunderbird, but there are too many things missing. For one thing, I can't run a filter on a set of selected emails. As far as I can tell, one has to run a filter on a whole folder. Sometimes though, I need to do subset filtering (particularly when developing a new filter incrementally, on a very large folder, so that whole folder filtering is very slow). I can't run external commands in a filter (can't do that in the filter definition either in Kmail, but you *can* do it in the filter action. Thunderbird can't do it in the filter action either). And there's no maildir support. maildir support is important because if the mailer gets unstable, you lose just one or a very few (depending on number of working threads) messages. An unstable mailer that uses mbox can lose the entire mbox if it really loses its mind. In fact, the reason I decided to switch away from Evolution is because after a security upgrade (pilot error, I had it run the upgrade while evolution was still running, I should have stopped the client) it deleted all email in my inbox with dates after Dec 7, 2008 (approximately, I forget the exact last date).

I may look at Thunderbird again in a few months, particularly if Kmail doesn't fix that bogosity.

2 comments:

Marc said...

You can use Beagle to index your kmail stuff, it's pretty fast to search through, I have a 5 year old archive and Beagle made it a few seconds instead of a couple of minutes searching through...
And even before kmail supported bogo I did it(bogofiltering) with a couple of scripts I found on the net, it was working fine, but recently I got tired of the spam combat so I filter my mail through gmail :) And there is no single spam passing through... pretty amazing.

Bopolissimus X Platypus said...

Thanks Marc. I've got things working well enough. I'll take a look at Beagle.

About bogofilter, yeah, I used scripts too, long ago. I've figured out how to get kmail to use bogofilter and spamassassin now. So that's good. I also have gmail filter my mail. And you're right, it's amazingly good. At one point there were lots of false positives. There still are some false positives on my mailing list gmail account, some postgres mailing list posts get tagged as spam, although since I've been marking them as not-spam, that problem is growing smaller. In any case, I download my gmail spam to kmail and let bogofilter and spamassassin have at it. This way, I still get to see some spam, but I have a good chance at finding emails that are mistakenly marked spam by gmail. That happens very rarely, maybe I see a false positive once every month or so, and it's never important. But I like the extra security of not having to worry about losing mistakenly classified email.