About 18 months ago or so, I posted about switching my Mail User Agent / mail client from claws-mail to thunderbird: https://www.scrye.com/wordpress/nirik/2017/03/24/mua-or-on-to-thunderbird/ last week, I moved on to a new setup.

First let em talk a bit about why I am moving on from thunderbird. Since moving to it thunderbird seems to have gotten slower and slower (no matter how much I compacted mail folders). They made some, IMHO, anoying changes (like in thunderbird 52: “”When replying to a mailing list, reply will be sent to address in From header ignoring Reply-to header”, which is just dead WRONG). Recent thunderbird versions had taken to pausing randomly and just not doing anything at all for like 20-30seconds. I had become annoyed more than once because thunderbird handled all my filtering, so if I was offline for a while and reconnected, it would take a long time for thunderbird to filter my emails and during that time I couldn’t really do anything else. The final straw was thunderbird 68’s changes to add-ons. Since they were moving to the newer engine, all add-ons have to be reworked to be “webextensions”. Firefox went through this last year. However, thunderbird seems to have not handled it well. I didn’t see any press or announcement, just updated and suddenly all my add-ons were gone. Additionally, going to the thunderbird addons site, there’s a filter for version, but at the time, it didn’t even have 68 listed! Pretty much non of my addons were ready for this change.

So, finally I decided I would look at mutt. I had avoided it in the past for a few reasons: I wanted to be able to see html emails easily in the same application I was using to read the rest of my emails, and I just liked the idea of a application that didn’t depend on a terminal. With no real GUI MUA’s left, I decided to get over those and look at mutt.

Doing some reading and pondering, I ran into a number of places talking about patches to mutt (“If you want to use this, you need patch X…”) which lead me to neomutt. I don’t know the details, but my understanding is that mutt development slowed way down for a number of years, and a lot of patches piled up. neomutt is a fork of mutt with all those patchsets applied, with the goal of cleaning them up and getting them into the mainstream mutt package. They already got the sidebar patches in, and hopefully they will get others in over time. Since I like living on the edge, I went with neomutt, which has a handy copr made by the main developer.

Thinking about the filtering annoyance I looked at a number of possible process changes, but finally just went with an easy one: procmail on my mail server. It’s pretty old school, but it was already setup a long time ago, can filter things as they arrive and is easy to add rules to.

neomutt/mutt can of course use imap, but I like to have my laptop setup so I can read and answer emails even when off line (although that state is increasingly rare). So, I looked at syncing my imap store to my laptop. Many people seem to prefer offlineimap, but it seems it’s on life support now and the developers have moved on to a newer tool that isn’t really ready yet to be used. Additionally, offlineimap in rawhide (what my laptop runs) is currently broken because it uses python2 and a module it needs has been retired. So, I settled on mbsync. This is a fast, written in C program to sync between local folders and imap server (both ways). It took just a few minutes to configure and then a bit to sync all my imap folders down.

The final part of the new setup was searching. I really liked the ability in thunderbird to search everything, find threads if I just had one email, etc. The winner here is ‘notmuch’, a xiapan database for emails. After installing the package a simple ‘notmuch new’ and answering a few questions and away it went. After the initial indexing, it can (and should) be run after each mbsync invocation. You can then search from the command line or (if using neomutt) virtual folders and search queries. It much faster to come back than thunderbirds virtual folders. As a bonus all the emailed I had ‘flagged’ in thunderbird were still flagged to mutt, so I can continue to flag things I want to reply to and search for and reply to them later.

neomutt (and now mutt too apparently) has a sidebar setup, which is much like thunderbirds accounts/folders setup. I set mine to show any folder that has unread mail (and how many) and any folder that has flagged messages (and how many). Using that I can decide which one(s) I want to deal with. If I just want to crunch through them all, doing c (change folder) will default to the next folder with unread messages.

I of course have multiple accounts, but thats not a problem for neomutt or mbsync. Just need to define the local and remote folders and tell neomutt to read in those folders when you change to them. One issue that I was stuck on for a bit was how to filter the gmail accounts I have. (Since there’s no way to use procmail on those). Luckily it seems you can get google to do it. Just need to go to the account on the web interface, select the message(s), click on the little 3 dots “more actions” at the top, filter messages like these, set it to archive automatically (skip mbox) and set a label (which makes google put it in a imap folder with that label).

So, it’s been about a week with this setup so far, and I have to say, I really like it. I was off power for about 5 hours last week (power outage) and was impressed how much more battery life my laptop had without thunderbird spinning up fans and taking up CPU. Re setting up all my filters allowed me to find some things that need to be dealt with, which is nice. I think it’s made me more caught up/responsive to emails than before. It’s definitely more responsive/faster than thunderbird and I never really find myself waiting on the client.

There are a few things I miss from the old/previous setups:

  • Calendaring. Thunderbird had calendaring built in, and now I have to just pull up a web version. I did try gnome-calendar for a bit, but it doesn’t allow you to see who attendees are or answer yes or no or maybe on going to the meeting. So, web interface it is for now.
  • Thunderbird could display annoying html only emails well in the interface, but… I always prefer the text/plain part, and turn off remote image loading, so many of the most broken emails werent that pretty anyhow. Additionally, mutt can easily open those parts in a browser or the like.
  • When you are composing an email in neomutt, you can’t super easily just go and look at other emails. Thunderbird having a seperate window for this was nice. You can start another neomutt -R (read only), but that seems like a hassle. You can of course postpone your email, go look at whatever else, then resume it, but still a bit of a pain.
  • My old setup used spamassassin on the mail server to detect spam, but in addition I was using thunderbirds bogofilter support as a ‘second line’. Without this I have been getting more spams to my inbox (mostly to list moderator addresses).

And there’s a number of TODOs left:

  • I’m trying to decide if there is any point in keeping old email list posts or bug tracker emails. I was going to archive them, but then I wondered: why? I can get them from the list archives or the bug tracker application. Is there any great point in having more than say 90days of them around? Still pondering on that…
  • Right now I am running ‘mbsync; notmuch new’ manually (I bound it to f1 in neomutt) when I want. I wonder if it’s worth setting up a cron job? Right now it takes about 90 seconds to run (mostly because gmail is slow), but not sure any interval matters. I’m likely to pull before I start answering emails.
  • There’s still some weirdness around switching accounts. It seems like if I start neomutt and never go to an accounts folders, I never see new emails for that account until I do. Should figure out what I might be doing wrong and file a bug if it seems like it’s not my fault. 🙂
  • A full mbsync takes like 90 seconds. If I nuke a bunch of old emails (see point 1 above), I think I can reduce that time. Also, I looked at doing clever things like moving a bunch of old things to archive and not syncing them all the time, but that requires a lot of manual work, which I would like to avoid.
  • Look at setting up a local bogofilter or second line spam handler to reduce spam even more.

So, all in all, I am pretty happy with this setup. Happy to share any config or help others setup the same mail workflow. We will see in a year or two how well it sticks.