Troubleshooters.Com and T.C Linux Library and Litt's Claws Page Present

Claws-Mail Tricks, Tips and Workarounds

Copyright (C) 2012 by Steve Litt, All rights reserved. Material provided as-is, use at your own risk. 


Contents


Introduction

All email clients suck. Claws-Mail sucks less than the rest. It doesn't depend on computer-crushing libraries like Kmail does. It's not a slow, bloated albatross like Thunderbird. It's a mail client, not a way of life like Evolution. It doesn't gratuitously separate attachments from emails the way Eudora does. Claws-Mail has full IMAP compatibility unlike Balsa and Sylpheed. And unlike GNUMail, Claws-Mail works. Mutt is probably a more solid product,  but who has time to learn all those hotkeys, and Mutt's folder and message lists are less than optimum.

For these reasons, I recommend Claws-Mail, and use it every day. Hence this document, showcasing all the tips, tricks and workarounds that make Claws-Mail productive.

Scope of This Document

This document is not intended as documentation for Claws-Mail. For that, go here:
The sole purpose of this document is to enable you to navigate around unexpected behavior, and enable you to pleasantly work around annoying behavior. This document gives you specific workarounds for specific behaviors.

Claws-Mail Pros and Cons

Claws-Mail's new mail compose editor is wonderful. It indents just right, wraps just right, and does bullet points just right. It does quoted text the way I like it. The general user interface is well laid out, with folder list on the left, message list on the top right, and the message window on the lower right. The program works very well and reliably with my local Dovecot IMAP server.

On the minus side is its quirky user interface. Lacking any threading and almost completely lacking even separate processes, the program stops dead during sends (one or two seconds), and mail retrieval (could take up to a minute if you have a lot of mail). Much worse, whenever a dialog box or message box appears, all other windows stop working. Occasionally a message box or dialog box gets buried under a window, and Claws-Mail appears to hang. As you get accustomed to Claws-Mail, when it appears to hang (it almost never truly hangs), you start looking for that buried window, and do what's necessary to close it.

Claws-Mail has extensive configuration options, which, unfortunately, employ an interface reminisent of a an Easter egg hunt. You can write to the mailing list asking how to configure so and so, but that gets old, both for you and for the list inhabitants.

The primary thrust of this document is to reveal some configuration Easter eggs, and some workarounds for strange behavior.

Configuring Email Deletion

One of the cool things about Claws-Mail is that it has two completely different email deletion paradigms:
The trash and expunge is pretty much what most email programs do -- move the message from its current folder to the trash folder. When I first saw the mark for later deletion interface, it made me crazy and I asked on the list how to change it to "normal". But in the ensuing weeks and months, I came to prefer mark for later deletion -- much easier to recover accidental deletions. You can hide the marked messages in a folder by highlighting the folder, and then View->Hide_deleted_messages. And, at any given time, you can always permantently delete the marked emails with Tools->Expunge.

To set your preferred Click Configure->Preferences_for_current_account to get the Account Preferences window for the current account, then in the Page Index list on the left, click Advanced. Now look carefully at the screen for a checkbox called "Move deleted email to trash and expunge immediately". If you check that box, deleted emails are moved to the Trash folder right away. If you don't check that box, deleting a message simply marks it and turns it light gray.

While you're on this page of this window, notice the input field labeled "Put deleted messages in", with a checkbox. If you check it and select a folder, that folder becomes your trash folder. Usual choices for trash folder are either account/trash or account/INBOX/Trash.

To summarize, your deletion config is all contained on the advanced page of the current account's Account Preferences page, which is reached by clicking Configuration->Preferences_for_current_account, and then selecting "Advanced" from the page list on the left of the Account Preferences window.

The Hotkey Plan B

The way Claws hotkeys are supposed to work is that you use your mouse to navigate to the action you want to put a hotkey on, and then, with the mouse pointer hovering that action on the menu, press the desired keystroke. It usually works. But sometimes not. For instance, you cannot use this method to set the hotkey for "Move to Trash" to "d". This is because, when you hover over "Move to Trash" and press "d", the menu thinks you're saying "Delete", because "d" is the hotkey for "Delete" on this submenu. As of Claws 3.7.9, and perhaps beyond, Claws doesn't discern between submenu hotkeys and app hotkeys. As soon as the developers disable submenu hotkeys while the mouse is hovering, this annoyance will go away.
WARNING

If you actually do press "d" while hovering, you will delete the current message, so be sure to undelete it. This particular annoyance is one you might not want to reproduce, or if you do reproduce it, best to reproduce it in a folder with nothing but junk messages.


NOTE

Before you can change hotkeys, you must first enable customizeable hotkeys. To do that, Configuration->Preferences brings you to the Preferences window, from which you choose the Miscellaneous page near the bottom of the page list on the left side of the window. Make sure that "Enable customizeable keyboard shortcuts" is checked, because that's what enables you to change hotkeys.

I like using the d key for delete. Fast, pnemonic, and perfect for a touch typist. But just try getting d to delete with Claws-Mail's normal user interface. If you can, you're a better Clawser than I.

The workaround procedure

First, use the menu system's Message submenu to view the current hotkey for "Move to Trash". If there's no hotkey for it, press the keypad delete key, and the hotkey should change to KP_Delete. Whatever the hotkey ends up being, write it down letter for letter, case sensitive, because you'll need to search for it later. For the rest of this article we'll assume the hotkey is KP_Delete, so if yours is different, substitute it for KP_Delete.

Now close Claws-Mail. With a regex aware text editor, open $HOME/.claws-mail/menurc in your favorite editor with regex search capabilities, and search for KP.Delete . The reason for the dot wildcard instead of underscore is you don't know, at this point, what punctuation appears instead of the space you see in the menu's representation of the hotkey. You might find it helpful to do this search non-case-sensitive. When you find it, note that it's the hotkey for the /Menu/Message/Trash menu item. Using the editor, replace "KP_Delete" with "d". Save, and exit the editor. Run Claws-Mail again, and notice that d is now the hotkey for "Move to Trash".

In summary, if you can't set a hotkey in the normal way, memorize its current value, exit Claws-Mail, edit $HOME/.claws-mail/menurc, search for its current hotkey, and replace the string representing the current hotkey with the string representing the desired hotkey. Crude, but effective.

Claws Configuration


Broadly speaking, Claws has two classes of configuration:

Per account configuration

In Claws-Mail, an account is an entity supplied by a specific POP or IMAP server or Unix maildir file. It has a folder tree under it. If you look at Claws-Mail's folder list, you'll see that the very top level of that hierchical list consists of accounts. You configure accounts with the Account Preferences dialog box or the Folder Properties dialog box, which is used for defaults for the whole tree under it.

The Account Preferences dialog is reached via either Configuration->preferences_for_current_account, or, if you want to configure an account you're not currently looking at, the Configure->Edit_accounts dialog, then pick the one to edit, and click the Edit button. Configure->Edit is also where you add and delete accounts.

Anyway, once you're in the Account Preferences dialog for the desired account, you'll see the following dialog box pages in the page index list:
In my opinion, the organization of data within those categories leaves something to be desired, but maybe it's just me.

The Basic page has the name, contact info, email address for the account, which is what you'd expect. It also has a section called "Server information", which in my opinion belongs directly in the Receive and Send pages. It contains a read-only display of the protocol (IMAP, POP, local MBOX, and a couple others). The protocol can be set only on account creation, and not subsequently changed.

The Server Information area has three config items for incoming mail:
Interspersed with those is SMTP server (send), with the possibility of a less than totally experienced user mistaking User ID and/or Password for being associated with the SMTP server instead of the receive server. In my opinion, the best way to organize it would have been to put Server for receiving, User ID, and Password on the Receive page, and SMTP server on the Send page. This would have made the situation crystal clear, but that's not how it appears, so the user must be careful to understand what's what.

The most important piece of data on the Receive page is the Authentication Method dropdown list. It's also hard to configure, because their alternatives: Automatic, LOGIN, CRAM-MD5, ANONYMOUS, GSSAPI, and DIGEST-MD5 often don't correspond to the POP or IMAP server's documentation. This often necessitates trial and error. When this happens, the log is your friend: Tools->Network_Log. Also, lots and lots of web research can help. There are other checkboxes on this page, but except for the  'Get Mail' checks for new messages on this account checkbox, I leave them unchecked, because I filter with Procmail rather than Claws itself. If you use Claws to filter your email, check the proper box. If you want a plugin to filter your email, check that one.

The Send page the username and password for the SMTP server listed on the Basic page (you can't make this up, folks). It also contains an authentication method dropdown list, which I've had success just leaving at Automatic, but your mileage may vary.

The Compose page contains info on signatures, automatic addresses (I don't use them -- nothing wrecks havoc on a mailing list like email with explicit Reply-To), and dictionaries. This page is clear as a bell and needs no explanation.

The Templates page has everything you need to know about *account wide* templates, as opposed to templates specific to a folder. Folder templates override account templates. There's a template for Compose, Reply and Forward. This page is not simple for a good reason -- Claws-Mail has extremely powerful templating facilities that are granularly configurable. Click the Information button to find the needed tokens to achieve what you need to do with your template. Also, look at Claws-Mail documentation in general.

The Privacy page is all about signing and encrypting. If you're one of those people who signs and encrypts every email, configure this page.

The SSL page is where you define SSL protocols for sending and receiving, and certificate stuff.
Litt's Opinion

Always use SSL for both transmitting and receiving email. To do otherwise is to give away your passwords, which at the very least enables badguys to receive your emails, and send bogus emails on your behalf. Can you imagine if somebody took over your account to send out underaged porn?

There are people who scrupulously tunnel through to their home server when on the road, and yet that home server itself doesn't use SSL and is therefore wide open. Make sure to use SSL on both send and receive. If your ISP doesn't have SSL, get a new one.

The Advanced page contains miscelleneous configurations that affect your whole life in email. It defines your send and receive ports -- not necessarily necessary if you use the standard ports, but if your ISP gives you specific ports to use, you should probably put them in here. Then there's the "Move deleted emails to trash and expunge immediately" checkbox, which determines which deletion user interface Claws presents to you. And at the bottom of this page you can define which mailboxes receive email that has been sent, queued, drafted, or deleted.

Program-wide configuration

Secret Configuration



z

The Frustration-Free Way to Search

Claws Mail has two completely different search facilities for searching through messages in a folder. One and only one is capable of recursing folders -- the quick search. The other one, available as Edit->Search_folder, cannot recurse, so I frankly don't see why you'd ever use it. As far as I can tell, the Quick Search facility can do everything that Edit->Search_folder can do, and more so. So I limit my search activities to the Quick Search facility.

The Quick Search facility is available in the space below the message list and above the message view. It consists of a list button on the left, a text input area following that, and buttons labeled Clear, Edit and Information on the right. If you can't see these buttons and input area, click on the little magnifying glass button on the left end of the border below the message list and above the message view.

When you click on the left hand list button, you see alternatives Subject, From, To, Tag, Subject/From/To/Tag, and Extended. Below those you see checkboxes Recursive, Sticky, Type-Ahead, and Run on Select. "Recursive" means search not only the current folder but the whole tree below it.

"Sticky" means that whatever search criteria you used last time will still be in effect. The benefit is that you can go from folder to folder executing the same search criteria. The cost is that if you forget to clear your last search, you could end up searching a folder you didn't intend to, and once in a while cancelling out of an unintended search can cause Claws-Mail to abort. Personally, I like Sticky and use it.

"Type-Ahead" means that, as you type each character into the search input area, the messages are narrowed to finds beginning with those letters. So when you slowly type "brian", the b narrows it down to the bobs, bryans, brians, briannas, and brittanys. Then when you type r, it eliminates the Bobs. Type in i, it eliminates the Bryan's. Type in a t, it zooms in on Brittany. As you back space the letters out, the other records reappear.

I have no idea what "Run on Select" means, so I leave it unchecked.

If you suspect your search phrase appears in headers Subject, From, To, or Tag, the quick way to search is to select Subject/From/To/Tag, from the list, and type in the search phrase in the input area. Those four headers are cached, so the search is lightning quick. Unfortunately, actually very unfortunately, the CC header is not cached, so if you're looking for an email that might have arrived to you via CC, you'll need to use a more complex and slower search.

The Extended Quick Search

If you choose Extended from the list button, you can put together almost any search you want. There are two ways to put together an extended search:

Typing the codes for the conditions directly into the input area

The following is a good reference for the various codes:

https://github.com/marvil07/claws-mail

In the preceding web page, search for "Quick Search" to skip all the stuff not applicable.

Because Subject, To, From and Tag are cached and run very fast, if you're using compound searches, put the searches for Subject, To, From and Tag before the other ones when using And conditions. For instance:
f troubleshooters.com & ~B troubleshooting
The preceding first selects only messages from troubleshooters.com, and then, with that subset, does a full message search on "troubleshooting" and returns only those messages not containing the word "troubleshooting". If most messages are not from troubleshooters.com, the preceding search goes very fast because it first eliminates everything not from troubleshooters.com, and full text searches only that small subset.


With the Condition Configuration window




Getting it to Work With Mutt

You might find that Mutt doesn't work with Nullmailer.

You know why Mutt doesn't work with nullmailer? Because Mutt uses the environment variable $EMAIL as the sender address, and this address is typically a local address instead of something at your ISP or anything else on the Internet under control of the global DNS system. So the SMTP server drops the message on the floor.

Here's a script you can use to get Mutt to work with Nullmailer:
=========================================
#!/bin/bash
oldemail=$EMAIL
EMAIL=your-email@your-isp.com
export EMAIL
mutt

=========================================
The preceding makes sure that Mutt's "From" header is your-email@your-isp.com, not something on your local box.

I'm Recommending Claws-Mail

Remember the first sentence of this document's Introduction was "All email clients suck"? If this document sounds like a whine, well, it is. All email clients suck, including Claws-Mail. But Claws-Mail is, in my opinion, the best of the bunch. As a matter of fact, right now my only alternate to Claws-Mail would be a very tweaked Mutt with an extensive cheat-sheet that makes this document look svelte.

If you want an email client that doesn't lose email, doesn't crash or hang (except for fake hangs when a dialog box gets buried), doesn't expect you to have 8GB of RAM to work well, and makes emailing, for the most part, a pleasure, then Claws-Mail is your client.

Hopefully, this document has explained how to work with and around the suckiest parts of Claws-Mail, to minimize frustration and maximize productivity.

Trust But Verify

Fool me once, shame on you. Fool me twice, shame on me. Kmail already fooled me once, when right before my eyes it spiraled into the sea of uselessness, and I had to scramble to recover all my emails contained in Kmail. It's always possible that Claws-Mail will implode in similar fashion. I trust the Claws-Developers to keep Claws stable and productive, but I'll verify as I use it. And if Claws does implode like Kmail did, I'm ready.

My email isn't kept in Claws-Mail. It's kept in the Maildir folder setup used by my local Dovecot IMAP server. At a moment's notice I can plug in any IMAP compliant email client, and keep on truckin.

Of course, you're no dummy, so you'll quickly tell me I just moved my single point of failure from my email client to my IMAP server. But even if that's true (and I don't think it's entirely true), it's still an improvement. Email clients have waaayyyy too much to do, without worrying about storing emails. On the other hand, an IMAP server has no GUI, and no user interface beyond command line arguments. It's pretty much a perpetually running process with a socket and some authentication thrown in.

And even if my Dovecot did completely stop working, my email would still be in an almost industry standard Maildir tree. It probably wouldn't take too mucht to bring in another IMAP server. Or worst case, import it into a mail client and then copy it to an IMAP server.


Back to Troubleshooters.Com * Back to Linux Library