aerc/nmail/neomutt email with a 2FA outlook account.

I would like to use a command line based email client however after trying aerc, nmail and neomutt I haven't been able to get anything to work (as well as thunderbird). I believe this is because my organisation requires 2FA on my account. I have managed to get this working on the outlook web client because it allowed me to setup my 2FA.

Does anyone know how I can use this account with a command line based email client on arch linux?

Posted Aug 27, 2023, 5:14 PM UTC

16
eftepede•

App Passwords, maybe?

1
droshuxOP•

My organisation (Uni) email isn't attached to a Microsoft account but outlook is the only service I've tried that it works with. Maybe because it's an outlook account but not a Microsoft one?

1
manipulate•

Davmail could work for you.

1
droshuxOP•

As far as I can tell it is a GUI, and the GUI is super old. But there's basically no pictures of the mail interface on google images. Am I missing something?

1
manipulate•

I think it has a gui client but you don't need that. It acts as a gateway providing you with a local IMAP endpoint. You can refer to this link for example, and the davmail FAQ found on their website has covered exchange online with MFA aswell: https://jonathanh.co.uk/blog/mutt-setup/

1
skUkDREWTc•

I can't recall if I used this guide:

https://www.redhat.com/sysadmin/mutt-email-oauth2

But Google search has others.

1
gumnos•

I wish I could give more encouraging news. Some organizations will limit allowed client MUAs to a list of blessed IDs/tokens, and if your MUA (or whatever is fetching/syncing mail on your behalf) isn't on that list of blessed IDs/tokens, you're out of luck.

For years I'd been merrily using any of OfflineIMAP, mbsync, or mutt/neomutt, or Claws-Mail directly hooked up to my IMAP/SMTP accounts at my primary contract gig. Until they made some requirement switch, and now I'm stuck using Outlook or the web UI. No app passwords, only OAUTH2 from blessed MUA IDs/tokens (a list they won't modify for me to include any of my MUAs).

I used to be highly responsive since I was in my MUA regularly for personal mail and it was easy to spot if new work-related messages came in. Now that none of those work and I have to connect to the VPN and rdesktop into the work machine, I check it at fixed intervals. It's healthier for me, but the change cost them my ability to respond quickly and I end up billing more because I'm far less efficient in Outlook than I am in mutt/neomutt or Claws.

1