davmail is your answer.

I use it to access work M365 and Seneca College M365, which both require
multi factor authentication.

On my ubuntu desktop/laptop I install the packages davmail and openjfx,
and my ~/.davmail.properties includes (among others)
    davmail.mode=O365Interactive
    davmail.url=https://outlook.office365.com/EWS/Exchange.asmx

at startup/login I run
    ( davmail -server > /dev/null 2>&1 & )

and my .muttrc has things like
    set imap_user="[email protected]"
    set spoolfile=imap://localhost:1143/INBOX
    set smtp_url = "smtp://[email protected]@localhost:1025/"
    set smtp_authenticators = "login"
    set ssl_force_tls = no

Start up mutt, get prompted for password, get popup window asking
for two factor (e.g. google authenticator, or duo push), comply,
and there's my mail.  And davmail is willing to cache credentials,
so I don't always have to two factor.

Note that this does not require IMAP access to M365 - it uses the
"normal" exchange protocols, just like Outlook would.

Feel free to let me know if you run into problems, and I'll try to help.

Hope that's helpful!

John


On Thu, 2023/04/06 10:51:34AM -0400, Peter King via talk <[email protected]> 
wrote:
| I desperately miss mutt.  But the University of Toronto, in its
| administrative wisdom, moved us all to Microsoft365 which insists on token
| security of a kind mutt doesn't implement.  If I ever leave or find a way to
| implement it, I'm back to using mutt like a shot.
---
Post to this mailing list [email protected]
Unsubscribe from this mailing list https://gtalug.org/mailman/listinfo/talk

Reply via email to