My "workflow" to check the mail of the lists I'm subscribed to was more or less like this:
- Open the mailbox of the list.
- Check the first mail of every new thread.
- If interesting, keep the whole thread/read it/whatever. Sometimes, flag all the thread (sort-of mark it as important.)
- If not, delete the whole thread.
- If the thread lacks a head (the first mail of the thread), is because I have deleted its previous emails (because the thread's topic wasn't interesting to me). Delete such threads.
Mutt has (or can be "taught") keybindings to delete a thread, mark it as important, mark all of it as read, and so on. I even have a macro to mark all the mail in a mailbox as read, for whenever I felt/feel lazy. But even with this helpers, handling/checking maillists has always been a chore.
There was a thing that I always wanted to have for handling mail lists: to be able to tell mutt that I'm not interested in a given thread (conversation) and that I don't want any more mail related to it in the future. To have mutt delete automatically all those headless threads.
Deleting the thread when I first see it is not a solution, since more mails related to it might be sent after I delete the thread. I always ended up killing those threads manually when they reappeared. Talking with somebody about this problem, I learned that the hivemind offers its "users" that feature; they call it muting a conversation.
After thinking about how to achieve that with mutt, I defined a plan: tell mutt to tag the threads I'm not interested into, and delete them. The only hard part was to teach mutt which were the threads to tag.
The non-interesting threads are those that lack a parent mail
(the email that started the thread). These threads appear only when I delete its
initial emails previously, and more email ot if arrives. The parent email is the only
email in the thread that lacks a
References header (I'm not 100% sure about
this, let me know if I'm wrong). This is enough to build a folder hook to get
rid of the extra mail of unwanted threads.
# delete not-interesting conversations folder-hook listas/.* 'push "<tag-pattern>~A<enter><untag-pattern>~((! ~h References)|(~s fwd)|(~F))<enter><tag-prefix-cond><delete-message><end-cond>"'
That monstrosity does the following
- Tag all the mails in the mailbox.
- Untag (I didn't know mutt could do that) all the threads where there is at
least one email in the thread that fulfills any of the following
- Doesn't have a
Referencesheader (hence is a parent email, and it survived after I read it the first time.)
- Has the text
Fwdin its subject. Without it the hook would delete the threads that started with a forwarded message.
- Are flagged. I placed it there to have a way of keeping headless threads.
- Doesn't have a
Now whenever I enter to the folder of a maillist, all those pesky threads that refuse to die are automatically wiped out by my faithful mutt.
By the way, have I told you before that I really love mutt's logo?