top | item 41321981

Aerc: A well-crafted TUI for email

298 points| edward | 1 year ago |blog.sergeantbiggs.net | reply

151 comments

order
[+] Ringz|1 year ago|reply
Aerc has been my daily driver for a long, long time. I use it with IMAP (GMail and other reasons) but its completely usable with local mail directories.

- I have redefined the Aerc key mapping with a set of Vim-like keybindings, since I am too old to learn new keybindings. And I bet now I as fast as possible slashing through countless mails…

- I configured Aerc to work properly with Gmail and Imapfilter.

- I created some filters that I missed from any mail client I ever tried (at least two keystrokes away). Like:

  ff = :filter -f<space> "{{index (.From | emails) 0}}" <Enter> # filter mails from current sender
  fs = :filter -H<space> subject:"{{.SubjectBase}}" <Enter> # Show Mails with the same subject
  fS = :filter -H<space> subject:<Space> # filter mails with subject e.g. "fs foo" filters mails with subject containing "foo"
 
If someone is interested, I will link my GitHub repo.
[+] jackthetab|1 year ago|reply
I'm interested in the Gmail integration. Tried it with mutt and decided I didn't want to spend an afternoon figuring it out.

'Sides, I hear that Gmail is phasing out IMAP. :-?

[+] hdb2|1 year ago|reply
> If someone is interested, I will link my GitHub repo.

I'm very interested...this post has encouraged me to play with aerc again, and the first filter you posted is something I have always wanted in an email client!

[+] icambron|1 year ago|reply
I'm interested, specifically with the vim keybindings, which would make getting started with it much easier for me.
[+] djha-skin|1 year ago|reply
I have plumbed the depths of mutt, and I have discovered that, alas, graphical email clients fit my needs better.

- Mutt/aerc doesn't support windows, an OS many use by preference or requirement (though I have explored this with mutt[2], it's hard getting anything to work in mailcap on windows)

- Doesn't support viewing HTML email, a ubiquitous phenomenon

- Doesn't support sending HTML email, which is fine until your coworkers wonder why your mails always look funky and replies lose formatting

- I'm faster in Betterbird[1] than I am in mutt. Turns out drag-and-dropping mails into folders is pretty fast.

- Configuring an even halfway decent set-up takes ages, Betterbird just works out of the box

- Mutt relies on mbsync[3] or offlineimap[4], these tools don't support OAuth well. Betterbird supports it out of the box. (You can run without them, if you're willing to put up with bad buggy behavior in GMail where when messages are moved into folders they are only copied, the original message stays put in the original folder while a new message is copied into the other.)

- With shift+click, Betterbird allows the user to reply or compose using plain text just fine when the need arises

Sorry guys. I absolutely live in the terminal, but enough's enough. I'm out.

I do like using newsboat as an RSS reader though, that investment panned out so far.

1: https://www.betterbird.eu/

2: https://news.ycombinator.com/item?id=39812124

3: https://isync.sourceforge.io/mbsync.html

4: https://www.offlineimap.org/

[+] Ringz|1 year ago|reply
Aerc:

Could probably be built on Windows. You just need Go and make. Betterbird supports MacOS only since a view weeks. My initial suggestions to build it for Mac was denied by the author because of „money“.

Let’s you view html emails. It’s in the article.

I bet moving mails by keystrokes are much faster than drag and drop per mouse. If you use the same folders again and again it even faster. Eg:

  pa = :archive flat<Enter> # move (think put or paste) mail in the archive folder
  pb = :move<space> Brain<Enter> # move mail in my Brain.
  pf = :move<space> # move (think put or paste) mail in folder. Next character filters folders.
works out of the box. Configuration is less complicated than mutt (by far)

Works fine with OAUTH

BB is fine but I hate it that I can’t use my own keyboard shortcuts. A ubiquitous phenomenon.

[+] gerdesj|1 year ago|reply
"Mutt/aerc doesn't support windows, an OS many use by preference or requirement"

All modern Windows boxes have Hyper-V built in to some extent and you can run a Linux VM. You have OpenSSH natively too. It will take a bit of twiddling to setup a suitable environment but not much.

I use Linux exclusively and prefer GUIs too. I use Evolution against MS Exchange on-prem, for my sins. I also run a set of vanity email domains for friends and family (Dovecot, Exim etc).

I'm not familiar with Betterbird but it is now bookmarked and noted for eval.

One day we are going to have to dump the Exchange box and I look forward to the discussion about what happens next. M365? Nope, or OK - you kids do that and I'll bugger off and do my own thing. Do bear in mind that I've been running the email system for 25+ years (it was GroupWise once) and I am the Managing Director!

In the end you really can replace Exchange with and IMAPD, MTA etc and a calendaring app of some sort.

Anyway, I'm strolling rather rapidly off topic. Sorry and thanks for the Betterbird notes.

[+] fossdd|1 year ago|reply
Maybe dodo[1] is something for you. It is basically a graphical email client but with lots of vim-bindings.

Basically the best of both worlds, terminal and graphical. Like the qutebrowser[2] for emails.

However I think its kinda in a unmaintained state and only supports notmuch backend.

1: https://github.com/akissinger/dodo 2: https://qutebrowser.org/

[+] necrotic_comp|1 year ago|reply
despite the questionable politics of the author, I use mutt-wizard, and using its configs, a simple "v" instead of "o" will open the mail in the open web-browser. I've found this more than acceptable for reading html mail.

I don't use it for work, only personal use, though, so ymmv.

[+] abound|1 year ago|reply
I got sick of having five different GMail tabs open (and two non-GMail mail tabs open), so I have been setting up aerc this week, using the Notmuch backend and either lieer (for GMail) or mbsync (for non-GMail) to sync the mail.

Its taken maybe a dozen hours to get it set up and get into the flow, but I find it much, much more enjoyable than my previous workflow. Plus, though GMail tabs each took a 100+ MB of memory in Firefox, the new setup is much less heavyweight, and the local search is speedy and high quality.

[+] aidenn0|1 year ago|reply
If you are using Notmuch, I recommend trying bower[1]. It is a TUI for interacting with notmuch, and can even be configured to do so over ssh, so that e.g. opening attachments can happen on your local machine, even if your notmuch db is on a different computer.

1: https://github.com/wangp/bower

[+] BeetleB|1 year ago|reply
> so I have been setting up aerc this week, using the Notmuch backend

I strongly urge people to try notmuch. I switched to it in around 2011 and have never gone back.

You don't have to use Emacs as the client. There are plenty of other frontends (including aerc).

https://notmuchmail.org/frontends/

alot[1] is probably the most well known among them:

https://github.com/pazz/alot

[+] endorphine|1 year ago|reply
While tui mail clients always seemed appealing to me, I think I realized why something in me resists them.

The terminal is my "meditation space"; it's where I go when I want to focus deeply and do real and work that I enjoy; my playground.

Viewing or writing emails is a chore, just like Slack. I don't want that iny terminal.

[+] haswell|1 year ago|reply
I see this a bit differently. It’s exactly because some tasks feel like a chore that I gravitate to tools that improve the experience.

To me, keeping these tasks separate is just reinforcing the negative association those tasks have built up over time in my brain. The degree to which they continue sucking has as much to do with my own thinking about the tasks as the tasks themselves. I’d rather find ways to make the suckiest tasks even a tiny bit more palatable, and at least in my case, don’t find that this impacts the things I love about working in the terminal in any way.

At the end of the day, I’m going to have to tackle all of it eventually. Might as well make it easier on myself. YMMV.

[+] Atreiden|1 year ago|reply
This is enlightening. I prefer to lean heavily on my terminal for most things, but tui email + web browsing never quite "clicked" for me. And I feel like this perfectly encapsulates why. Thanks for putting words to the feeling!
[+] kkfx|1 year ago|reply
The issues we humans have with emails in the present time lay in the lack of modern PERSONAL email tools development.

For modern and personal I mean NOT living on someone else mailserver but easily download or sync remote IMAPs, or to use them directly (with some issues [1]) or via a personal homeserver IMAP, with a modern search-based client like notmuch-emacs/mu4e, and a built-in decent filtering tool (like MailDrop).

We have essentially all the pieces (we can use IMAPFilter + OfflineIMAP to refile messages if we just sync them, or the old fetchmail + MailDrop if we download, using notmuch in Emacs or with also Aerc) but they are different software with different configs, styles, variable level of documentation and userfriendliness etc. There is NOTHING for less geek/expert users a thing that makes many considering email == webmails and so a webmail is a service by a third party (for such users) as is Slack, WhatsApp web and so on, a dangerous vision for the freedom of communication and the power emails offer.

I hope some think about that enough to makes thing changes not only at geek levels... It's not that hard having a MailDrop rule that match an ISP regular bill launching a script that add the due date, amount to an agenda, than check the local accounting software for relevant transaction presence and warn if something it's not as expects, not that hard with text-based tools, like org-agenda, BeanCount, MailDrop, emails. VERY hard with modern software and that's a big loss for many potential power users who can't profit of such easy automation simply because for them it's too long to learn and implement and often even an unknown option. IT was born to simply life and augment human cognition, it's very sad almost all have forgotten that.

[1] due to mail files naming syncing on multiple machines often create unread/tags annoyances, with duplicate messages generation and so on...

[+] jjav|1 year ago|reply
> modern PERSONAL email tools

The capitalized personal part there is so important! So few people today even realize what is possible, since they are captive in websites like gmail that have so very little functionality.

email was always supposed to have a 100% customizable workflow, filtering, sorting, foldering, etc.

We still have this of course, as all the old tools work. But there needs to be more awareness how great email is when used as originally intended. I'd despise email too if I believed gmail is email, but it's not.

procmail and mutt still work just fine!

[+] jmorenoamor|1 year ago|reply
I love modern text based projects, really, thank you all for keeping the terminal alive and relevant.
[+] tjoff|1 year ago|reply
aerc is really weird in the sense of being designed as a client, not storing the mails on your computer. Which has some performance implications and limitations. Though you can have local mail too, really felt like a second-class feature when I looked. But to be fair it has been a long time since I looked at it.

Given the above I'm really surprised that IMAP doesn't work better than it does. Often gets disconnected and I have to restart to get back to it.

Also have trouble with shortcut overlapping in neovim and aerc.

All in all, not super happy. I could maybe give it a second chance and see what I've missed in my setup, but currently more hopeful about neomutt.

[+] daft_pink|1 year ago|reply
I would really love to try a terminal email client with html email parsing.

I miss pine.

[+] eddyfromtheblok|1 year ago|reply
I used to use mutt and bind a keyboard shortcut to pipe HTML messages to w3m.
[+] wgrover|1 year ago|reply
I miss Pine too. I could read/file/delete scores of plaintext emails in seconds using single keystrokes.

Every email client I've used since Pine has been better at dealing with all the stuff we've bolted on to email (HTML, attachments, calendar invites...) but none of them have been as efficient at the core tasks of email as Pine was.

[+] samuell|1 year ago|reply
I'm kind of locked in to Thunderbird as it manages decades of my mail.

I wonder if one could develop a decent TUI for Thunderbird / its database...

[+] hello_computer|1 year ago|reply
The problem with a TUI is that it’s a silo. Makes more sense to have pipeable, scriptable program(s) to retrieve/filter/sync/send. Then you can make several different UIs for it—vim, emacs, web, vscode, acme, thick client, etc—with a minimum of effort. TUI ends up re-implementing a good part of tmux unnecessarily.
[+] xyst|1 year ago|reply
I frequently have to send e-mails from different addresses, so it seems I need to have manage multiple .conf files for this to work correctly? Example:

- login user: [email protected] - alises: *@example.com, [email protected], [email protected] ...

Mail addressed to "[email protected]" is delivered to "[email protected]" inbox. But instead of replying from "[email protected]", I would prefer to reply via "[email protected]"

Thunderbird offers the feature to modify the "from" header for each mail (which is nice). So I am curious how I would be able to do this with Aerc without having to constantly fiddle with the configuration files (ie, create new conf, add conf entry, ...)

[+] noahmasur|1 year ago|reply
Aerc lets you do this, although it doesn't automatically fill it in based on the recipient in a reply. So you have to remember to adjust the sender for each email that you send.
[+] pmarreck|1 year ago|reply
There's one big drawback I discovered the hard way, to not storing emails locally.

If you have to leave an org for any reason, you lose access to the entire email history with that org. Some of which might still be important to you for a multitude of very legitimate reasons (such as contacts).

[+] goku12|1 year ago|reply
You're right about keeping an offline copy of emails - especially with the help of an indexer like notmuch or mu. But I'm not sure why you mentioned it here. In case you think that aerc supports only IMAP, it has good integration with local maildirs and notmuch. Somebody else mentioned that maildir support felt like a second class citizen. This was true during the initial phase of the project. But the developers changed their mind some time later (there's a blog post about it somewhere) and gave it a better UX.
[+] johntash|1 year ago|reply
Assuming by org you mean an employer - this is also a benefit. For legal reasons, you may not want to have a copy of any of those emails anymore, or at least your employer may not want you to.

I try to forward important e-mails to myself if I think I'll need them outside of work (insurance details, etc).

[+] kuon|1 year ago|reply
I love aerc but I use it with my own mail server that is on the same LAN, which makes it very fast.

For HTML, if the mail is too complicated for the text renderer, you can pipe it to your browser with a single key.

With this setup, it is quite ideal for me.

[+] rediguanayum|1 year ago|reply
Consider adding OAuth2.0 support. While Gmail IMAP/SMTP still supports Application Specific Passwords, you can see the writing on the wall, and the future is OAuth authentication.
[+] kemiller|1 year ago|reply
I miss using a TUI for mail but it looks like they haven’t really solved the most important reason I don’t, which is rendering HTML emails.
[+] ndegruchy|1 year ago|reply
Emacs (even on the TTY), can do a decent job of rendering markup using it's built in EWW browser. Works pretty well, at least for most of the content I'm looking for.

Using it with Notmuch or mu4e is not the easiest thing to do, but it works pretty solidly.

[+] layer8|1 year ago|reply
Rendering HTML emails is fine, IMO, unless you want images. (I use mutt with w3m auto-view.) What’s more difficult is authoring/replying to HTML emails.
[+] Tmpod|1 year ago|reply
You can configure aerc to pass the email contents through an intermediate program depending on the MIME type. I believe it renders HTML through w3m by default or something like that. Of course it isn't full rendering with CSS and whatnot, but it is pretty good for most mails.
[+] tristan957|1 year ago|reply
I use lynx to render html email. Other people use w3m. It's your choice and it's a solved problem.
[+] JulianWasTaken|1 year ago|reply
I haven't tried to use this, but if someone has, how does it compare to alot (https://github.com/pazz/alot) which is the best TUI mail client I've used?
[+] goku12|1 year ago|reply
I haven't given alot much attention yet, but one feature that sets aerc apart is its focus on git-email workflow. Viewing, applying and sending patches is much easier with aerc. Remember that the author of aerc (Drew Devault) is also the developer of sourcehut.