Live data from Hacker News

Putting email in its place with Emacs and Mu4e

eamonnsullivan.co.uk

31–40 of 56 posts

Re: Putting email in its place with Emacs and Mu4e

#31

I'm also using Mu4e for personal email but stymied by Exchange auth for work email. I've been looking into using DavMail as an Exchange gateway, does anyone have experience with this? https://davmail.sourceforge.net/images/davmailArchitecture.p...

I have been usong mu4e with davmail in Exchange mode for my Uni mail. It was a pain to discover how to do it but the FAQ has been updated since and it works like a charm. Deop me a mail at gmail if you wish.

Re: Putting email in its place with Emacs and Mu4e

#32

I tried setting up mu4e once. It wasn’t worth it. It took me literally a few hours of reading random blog posts to figure out the configuration, and that was only to download email. Never got around to setting up sending them, which is a totally separate process. Even then, there were lots of issues. First, it’s slow. Loading an email had a noticeable pause and was slower than GMail. Also, you can’t avoid HTML email…

> Also, you can’t avoid HTML email nowadays This is the reason I haven't tried all the email tools that seem fun to play with, but not worth it :/

I use notmuch for email in emacs. I use w3m to process HTML emails for viewing in text, it does a pretty good job especially with tables, which are still used a lot in HTML email.

And the search.... fantastic. Best email search and virtual folder capability I've used on any platform.

Re: Putting email in its place with Emacs and Mu4e

#33
post #15

Earlier quoted context omitted.

I tried both. The error from davmail suggests it was specifically blocked/prohibit and I failed using actual Thunderbird.

My organization also explicitly blocks access from other clients than Microsoft Outlook, even if the credentials are correct and the protocol is supported. They also refused providing an exception, citing that I can just use the web interface via Microsoft Edge on Linux. (Which I prefer not to do for many reasons, e.g. backing up my emails locally, working offline, and authoring using native tools.) Currently, only T…

I am surprised as davmail with the Exchange protocol has worked for me since I set it up. They made offlineimap unusable but davmail works (it even has a small web client for the login when more than a month has passed). ??

Edit: they (my Uni) made offlineimap unusable, but it works with davmail.

Re: Putting email in its place with Emacs and Mu4e

#34

By the way, anyone have experience using emacs to analyse and visualise data (think spreadsheets and charts)? I’d really like to be able to use it to view any sort of data I happen to have.

I use the `vnlog` and `feedgnuplot` shell tools HEAVILY to do data analysis and visualization. In emacs, these work well in shell-mode or in any buffer with `shell-command-on-region` (M-|). Not strictly emacs, but works great.

Re: Putting email in its place with Emacs and Mu4e

#35
I have a very similar setup, but using gnus, mbsync, notmuch, and afew. All mail stays on the servers (including a self-hosted dovecot server on my home network). I manage about 10 email accounts with very little effort. It's easy to get extremely customized behavior by overriding defaults with elisp. Previously I was using Thunderbird, but I feel my emacs setup is much more productive.

Re: Putting email in its place with Emacs and Mu4e

#36
post #18

I was in this world for like 8 years but switched to Thunderbird after one too many emails didn't send because I missed some notification or something in mu4e, and too many emails weren't rendering well in Emacs, and etc little problems that cropped up. I needed my email to Just Work, not be another aspect of my procrastination machi- sorry I mean, my IDE.

The need for email to Just Work is one reason I've never let emacs anywhere NEAR my email flow. Everything in emacs becomes a Project.

The nice thing is that once things are setup in Emacs, they usually work without much maintenance or surprises for years to come. How many times have mainstream email clients changed UIs and featuresets in the last 10 years? How many of them do you expect to still exist 10 years from now?

Another 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.

Re: Putting email in its place with Emacs and Mu4e

#37

I wish there were a good workaround for those of us condemned to MS365/Outlook. Outlook desktop is very unstable and buggy, and Outlook web is full of weird antipatterns. For example, it is absurdly annoying to get a direct link to an e-mail message in Outlook web. If it were easy, I would just pass that url to org-protocol in the browser and keep my tasks organized with backlinks to the e-mails that originated those…

Have you tried this yet? Looks like it uses the ms graph API https://github.com/jgunthorpe/cloud_mdir_sync

Re: Putting email in its place with Emacs and Mu4e

#38

I tried setting up mu4e once. It wasn’t worth it. It took me literally a few hours of reading random blog posts to figure out the configuration, and that was only to download email. Never got around to setting up sending them, which is a totally separate process. Even then, there were lots of issues. First, it’s slow. Loading an email had a noticeable pause and was slower than GMail. Also, you can’t avoid HTML email…

> Can’t really have my inbox be one hour behind real time.

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?

Re: Putting email in its place with Emacs and Mu4e

#39

I tried setting up mu4e once. It wasn’t worth it. It took me literally a few hours of reading random blog posts to figure out the configuration, and that was only to download email. Never got around to setting up sending them, which is a totally separate process. Even then, there were lots of issues. First, it’s slow. Loading an email had a noticeable pause and was slower than GMail. Also, you can’t avoid HTML email…

This was my second attempt to get email working on Emacs and I gave up the first time, too. I persisted this time and I _think_ it will pay off. There is the obvious danger of this becoming another "project", but I'll make a note to check-in again in six months. It's an experiment!

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.

Re: Putting email in its place with Emacs and Mu4e

#40

Earlier quoted context omitted.

I have been able to use mu4e with my o365 account using davmail ( https://davmail.sourceforge.net/ ). I will say it was a bit of a pain to get authentication right, and involved a lot of trial and error.

Could you share a bit more details on your config?

Oh goodness, truthfully I'm not sure how well I understand it. I initially set it up a few years ago, and recently futzed with it after my organization changed something about their auth. My configs aren't really in a shareable state so I hope this ramble is at least somewhat helpful.

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..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...

Post reply on HN