Getting KMail up to speed March 10, 2010

This weekend I figured I’d take a sneak peek at the upcoming Kubuntu 10.4 “Lucid Lynx”. And one thing I wanted was to get a full-immersion KDE SC 4.4 experience. And that meant KMail.

Previously KMail and I have not got along. We use IMAP at the Digital Tool Company. A whole lot of IMAP, to be more specific. This evening I did a quick check, and it turns out that I can see over 1700 mail folders. And when KMail starts up it wants to look inside those. It opens a file handle for each folder, and soon you get “Too many open files” errors. In my case, if I’d let it keep going, it would have popped up just over 700 error messages.

Until recently, that’s as far as I ever bothered with KMail. I just went back to old faithful Thunderbird. But this weekend I was determined to get a bit further.

So here’s how to get it working: Just persist.

Close KMail. If it’s just spewed “Too many open files” errors at you, a firm “killall kmail” will do the trick.

Open it again, and wait. Eventually it will have work its way through all your IMAP folders, and the errors will stop occurring.

Now I had a new problem. Every time it checks my mail, it wants to check all my folders for new messages. That’s going to take a while!
KMail Folder Properties
So I right-clicked on the first folder, chose Properties, and noticed that I could uncheck “Include this folder in mail checks”. I also saw that “Act on new/unread mail in this folder” didn’t look so useful for most of these folders either, so I unchecked that too. OK, cool! Now I’ll just do that 1700 times.

Or not. There must be a better way! Surely.

There is. KMail keeps its configuration in ~/.kde/share/config/kmailrc.

So, close KMail.

Open ~/.kde/share/config/kmailrc in your favourite text editor, and search and replace “checkmail=true” with “checkmail=false”, and “IgnoreNewMail=false” with “IgnoreNewMail=true”.

Now go find the entry for your inbox, and put checkmail back to true, and IngoreNewMail back to false.

Save, and open KMail again.

How much faster is that, huh? Much faster.

Now you can go and explore KMail’s cool features. I’m liking the options in View > Message List > Aggregation, and the fact that on a folder-by-folder basis, I can choose to keep replies in the same folder (right-click on the folder and choose Properties). And I’ve only just started looking around.

You can find more info at KDE’s KMail page.

And check out this useful tip regarding Sent and Draft folders at OpenSUSE.

One Comments
MrTom April 2nd, 2010

Thanks a lot… I now understand why KMail was so slow… I can now try to use it for real :) Thanks a lot !!

Leave a Reply