Putting Email in Its Place with Emacs and Mu4e
Key topics
The eternal quest for email nirvana: a lively discussion erupts around using Emacs and Mu4e to tame the email beast. As commenters weigh in, it becomes clear that Gnus, another Emacs-based email client, has its fans, with some touting its improved IMAP performance, while others lament its slow NNTP speeds compared to SLRN. Meanwhile, those dealing with corporate email servers reveal a cat-and-mouse game with IT departments, with some successfully using Davmail to bypass Microsoft Outlook restrictions, while others hit a brick wall. Amidst the chaos, a glimmer of hope emerges in the form of pizauth, a tool for simplifying OAUTH2 authentication.
Snapshot generated from the HN discussion
Discussion Activity
Very active discussionFirst comment
6d
Peak period
46
Day 7
Avg / period
18
Based on 54 loaded comments
Key moments
- 01Story posted
Dec 3, 2025 at 4:42 PM EST
30 days ago
Step 01 - 02First comment
Dec 10, 2025 at 3:21 AM EST
6d after posting
Step 02 - 03Peak activity
46 comments in Day 7
Hottest window of the conversation
Step 03 - 04Latest activity
Dec 12, 2025 at 8:40 AM EST
21 days ago
Step 04
Generating AI Summary...
Analyzing up to 500 comments to identify key contributors and discussion patterns
Want the full context?
Jump to the original sources
Read the primary article or dive into the live Hacker News thread when you're ready.
I remember the two main reasons I switched from Gnus: 1) there was no good reliable search, 2) I couldn't drag&drop attachments into E-mails and back so I was spending a lot of time pointing to files. I hope both things have improved since then.
concerning (1): I have no offline sync in place, all my emails stay on the server. The IMAP protocol has a decent server-side search included[0], combined with Gnus unified search syntax[1], I enjoy a hassle-free search experience.
[0]: https://www.gnu.org/software/emacs/manual/html_node/gnus/Sea...
[1]: https://www.gnu.org/software/emacs/manual/html_node/gnus/Sea...
Currently, only Thunderbird with the proprietary "OWL" extension somehow manages to connect despite the block. My understanding is that they somehow abuse the web interface to do so, instead of actually going through the proper protocols, but not sure.
If someone has another way to access Exchange servers that intentionally blocks non-Outlook clients I’d love to hear about it.
In my previous org I could also use offlineimap and msmtp to connect to their Microsoft mail server via standard protocols. But in this org I’ve so far tried the built-in Exchange support in Thunderbird as well as in Evolution Data Server based exchange clients (Evolution and KMail). All of them manage to connect to the server, kinda, but then I get an error message saying basically that my mail client is not approved and I’ll have to contact my admin to use it.
My Uni also made it difficult but I succeeded in setting up a working davmail, using the exchange protocol.
Mail my username at gmail.com if you think I can help.
Gateway: Exchange Protocol: O365Interactive OWA or EWS (Exchange) URL: https://outlook.office365.com/EWS/Exchange.asmx
(follow the instructions at https://davmail.sourceforge.net/faq.html)
though I tend to stick with org
Everything in emacs becomes a Project.
The other benefit is that using standard mailbox formats and separate tools allows you to configure, replace, and integrate any part of the setup. With traditional clients you're locked into whatever they support and allow you to configure.
And I never had to hack anything together.
Wikipedia lists many UI and functionality changes over the years for the Mail app.[1] As recently as this year, people are upset about changes in the Mail app in recent versions.[2]
[1]: https://en.wikipedia.org/wiki/Apple_Mail
[2]: https://www.macrumors.com/how-to/get-old-apple-mail-back-ios...
Has the interface in Mail evolved since the early 2000s? Yes.
Does that constitute a material change, or even an adjustment, on my part? No.
Did I ever have to hack anything together to make this happen so smoothly for so long? Also no. ;)
As it is, my emacs and e-mail are almost fully separated due to (I'm assuming intentional) lack of a simple method of interoperability.
Basically DavMail connects to outlook at creates a local smtp and imap server which I connect to with mbsyc and msmtp. Mu indexes these emails from the local server created by DavMail, and Mu4e displays them and sends them with that local server as well. Once you have DavMail setup you can basically follow any standard mu/mutt/msmtp/mbsync tutorial, just use localhost and the ports exposed by DavMail.
Getting DavMail setup can be the tricky part, I remember having a lot of trouble, but I think it was related to the fact that the config I was editing wasn't being picked up systemd service that was controlling DavMail. The best advice I can give you is experiment with different authentication modes (davmail.mode in the config) and try sending mail to the DavMail server in an attempt to trigger it to do the authentication workflow.
In the end, set davmail.mode=O365Manual and davmail.url=https://outlook.office365.com/EWS/Exchange.asmx Upon attempting to send an email from mu4e it opened up a browser to do a microsoft authentication, and then I believe it saved a token in my config file (variable davmail.oauth.<your email>.refreshToken) which has been handling authentication without issue for the past few months.
Some miscellaneous notes. First, this may have been harder for me as it was not possible for me to use the DavMail GUI which might make the authentication workflow easier. I also have two email username@organization and first.last@organization. I have all of my davmail,msmtp, and mbsync configurations using username@organization, My mu4e config references the username@organization maildir folders, but my user-mail-address variable is first.last@organization and that is what recipients see (although mu complains about not knowing about the first.last account). Lastly, this DavMail setup isn't mu4e specific, I initially used it with mutt, and it worked for that as well.
I hope this is helpful, if there's interest I can try to go through the setup from the beginning and create a more in depth tutorial. I wish Microsoft did not make this such a pain, and I wonder if DavMail's days of effectiveness will soon be over...
https://stuff.sigvaldason.com/email.html
https://github.com/jgunthorpe/cloud_mdir_sync/issues/25
https://marcoapp.io
https://davmail.sourceforge.net/images/davmailArchitecture.p...
Also, the real test would have been my much more voluminous work email!
The HTML rendering isn't great, as you said, but you are two keystrokes from opening that email in a browser, if you have to.
And I have tweaked the config several times now, but I think that's mostly because I'm changing my (and the charity's) email, which involves a lot of shuffling about. Again, in six months, I'll have another look and decide whether it _really_ helped.
This is the reason I haven't tried all the email tools that seem fun to play with, but not worth it :/
And the search.... fantastic. Best email search and virtual folder capability I've used on any platform.
Why not? Does your job mandate that you watch your inbox constantly, and respond immediately to all messages? How do you get anything else done?
I've not seen the other things you mentioned. I only check for email every 10 minutes, but opening and (especially) searching for emails seem much faster than doing it in Gmail. Plus, I can do searches across email accounts, like all unreads across all three accounts. That was definitely slower in the online clients.
Finally, there's a quick ('a' then 'v') way to just open a message in a browser if the HTML is too thick.
Authorize once in a web dashboard, then use your accounts as if they didn’t need OAuth (ie. normal IMAP, POP3 or SMTP).
https://stuff.sigvaldason.com/email.html
Being able to write simple expressions to filter email, mass delete, and avoid embedded javascript are killer features. I can run all html through w3m and still have nicely rendered emails.
I still use a phone app for on the go browsing, but during work hours I have mutt open alongside neovim all day long.
Has anyone figured out a solution to keep this value updated? One issue is that I'm never sure when the new TLS certificate has rolled out.
Then you can just do (eg. in mbsync)
PassCmd "pizauth show accountname"