Dear all,

Although I am responding to this message in particular, please consider
this to be a response to all of you.

Many thanks to each of you for having taken the time to respond, all
your responses did help me at some point.

Steffen Nurpmeso (2023/04/14 02:47 +0200):
> Ian Collier wrote in
>  <zdh4+qm3kqrjd...@cs.ox.ac.uk>:
>  |On Thu, Apr 13, 2023 at 05:05:31PM -0400, Craig Gallek wrote:
>  |> I've managed to get this to work with gmail:
>  |> https://gitlab.com/muttmua/mutt/-/blob/master/contrib/mutt_oauth2.py.REA\
>  |> DME#L85
>  |
>  |I have used the mutt_oauth2.py script to authenticate against an institu\
>  |tional
>  |office365 account over IMAP (script is at URL above with .README removed). \

The same solution worked for me.

>  | I
>  |changed exactly two things in the script: (a) the GPG identity, and (b):
>  |'client_id': '9e5f94bc-e8a4-4e73-b8be-63364c29d753'

Same here, but I have been caught by the fact that the client_id appears
twice in the script and at first I didn't notice and did define it only
in one place, which happened to be the one for google, so the URLs
generated for Microsoft were wrong and I had to fix them manually until
I understood the problem.


>  |(that's nicked from a recent public version of Thunderbird, which I
>  |guess is not strictly kosher but it does work as long as you remember
>  |this when you see the authorisation message from Microsoft asking if
>  |Mozilla should be allowed access to your email.  The client secret is
>  |the empty string for this id.  It saves the faff of having to create
>  |an app registration and it allows the 'common' endpoints to work rather
>  |than needing your tenant ID).

One (likely naïve) question here: can't we, as mutt users, have
mutt be registered as Thunderbird is?


> I can confirm that this one works, both IMAP and SMTP are
> possible, tenant=common!  However, they now forbid "devicecode"
> flow.  "auth" works.  ("redirect" not tried.  And tThis is all my
> script thing.)

I did try redirect and the redirect URL has been reported as not conform
to the one expected.

Extra question although I do realise it's off-topic: did somebody try to
make SMTP work with exim and OAuth2? For the case one would be offline
while sending a mail that should be sent to the smarthost once one is
back online...

Many thanks again for your help!

Sébastien.

Reply via email to