Re: [S-mailx] OAuth, and Microsoft, and this little MUA

2023-03-15 Thread Steffen Nurpmeso
Hello Stephen.

Stephen Isard wrote in
 <6916-1678924548-25...@sneakemail.com>:
 |On Wed, 15 Mar 2023, Steffen Nurpmeso steffen-at-sdaoden.eu |s-nail| wrote:
 |> So i would assume you are using that "department tenant" and
 |> client ID like you did last September, and not the "s-mailx"
 |> "application"?
 |
 |I am using the client id that I set up for myself, following the 
 |instructions that you pointed me at.  I think that they were from the 
 |mutt website.  I believe that you were able to connect using that client 
 |id as well.  I have just tried
 |/s-nail-oauth-helper.py -a authorize -p Microsoft -R resourcefile
 |where resourcefile came from running
 |s-nail-oauth-helper.py -p Microsoft -a template -R resourcefile
 |
 |This was on a machine that I was logged in on remotely via ssh, so I 
 |changed flow from redirect to devicecode.  Everything went ok until I 
 |was asked to log in to my organization's website.  When I did that, I 
 |was told that s-nail was not trusted and I would need permission from 
 |some higher authority.  I don't get that if I use my own client id 
 |instead of the one that s-nail-oauth-helper.py puts into the 
 |resourcefile.

Thanks for checking this.

(The instructions are included in oauth-helper.py via action=manual
provider=Microsoft.  And oh i see -- this should not be enabled by
default, maybe someone misused that ID for bad things, and now
Microsoft has disabled?  But .. i can login via IMAP, POP3
protocols does not exist anyhow, and SMTP is rejected with
unauthorized.)

Well maybe i have to re-setup that app.  I put some more time.

Ciao, and good night!

--steffen
|
|Der Kragenbaer,The moon bear,
|der holt sich munter   he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)


Re: [S-mailx] OAuth, and Microsoft, and this little MUA

2023-03-15 Thread Stephen Isard

On Wed, 15 Mar 2023, Steffen Nurpmeso steffen-at-sdaoden.eu |s-nail| wrote:


So i would assume you are using that "department tenant" and
client ID like you did last September, and not the "s-mailx"
"application"?


I am using the client id that I set up for myself, following the 
instructions that you pointed me at.  I think that they were from the 
mutt website.  I believe that you were able to connect using that client 
id as well.  I have just tried

/s-nail-oauth-helper.py -a authorize -p Microsoft -R resourcefile
where resourcefile came from running
s-nail-oauth-helper.py -p Microsoft -a template -R resourcefile

This was on a machine that I was logged in on remotely via ssh, so I 
changed flow from redirect to devicecode.  Everything went ok until I 
was asked to log in to my organization's website.  When I did that, I 
was told that s-nail was not trusted and I would need permission from 
some higher authority.  I don't get that if I use my own client id 
instead of the one that s-nail-oauth-helper.py puts into the 
resourcefile.


Stephen Isard




Re: [S-mailx] OAuth, and Microsoft, and this little MUA

2023-03-15 Thread Steffen Nurpmeso
Hello Stephen.

Stephen Isard wrote in
 <27742-1678839459-662...@sneakemail.com>:
 |On Tue, 14 Mar 2023, Steffen Nurpmeso steffen-at-sdaoden.eu |s-nail| wrote:
 |> Is anybody using the oauth-helper.py with Microsoft?
 |
 |Sorry for the delay in responding.  I'm using oauth with Microsoft, but 

All on my side.  Thanks for answering.

 |after you taught me enough to make it work with the mutt oauth script
 |mutt_oauth2.py, I never converted to your (much superior) script, 
 |because I had a working setup and didn't want to disturb it.

Like the ballad of John and Yoko, another Apple Records
production.  Sigh.

 |My account definition includes the lines
 |set mta=submission://smtp.office365.com
 |set smtp-auth=oauthbearer
 |and I can send mail.

So i would assume you are using that "department tenant" and
client ID like you did last September, and not the "s-mailx"
"application"?

I would then conclude that during some work they "did
something" on all those dumb / gratis / few users / petty Azure
applications like "s-mailx" without even notifying their owners.
IMAP login and anything works, SMTP does not.

Thanks.
And Ciao!

--steffen
|
|Der Kragenbaer,The moon bear,
|der holt sich munter   he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)


Re: [S-mailx] OAuth, and Microsoft, and this little MUA

2023-03-15 Thread Steffen Nurpmeso
Hello.

Steffen Nurpmeso wrote in
 <20230314223059.awkol%stef...@sdaoden.eu>:
 |Steffen Nurpmeso wrote in
 | <20230314213206.paznm%stef...@sdaoden.eu>:
 ||Is anybody using the oauth-helper.py with Microsoft?
 | ...
 ||I am in the process of extending oauth-helper.py so that this can
 ||be automatized a bit (currently it fails hard because that
 | ...
 |
 |Now on [1]: instead of hard-failing for the no longer supported
 |access token refresh (i cannot believe this is really true), we
 |will now restart ourselfs to authorize.
 |Also a new configuration option "refresh_needs_authorize=y" (any
 |non-empty value) will forcefully skip over the useless try to
 |refresh the token.

To make this really work i have also added the -A / --automatic
option, so that we forcefully fail if interactivity would be
required.  (Also the --help output now fits in 25 lines.)

 |  [1] https://git.sdaoden.eu/browse/s-toolbox.git/plain/oauth-helper.py
 |
 |  Note: user "moon", password "mars", as in:
 |
 |  $ curl -u moon:mars --basic -O https://git.sdaoden.eu/browse/s-toolbo\
 |  x.git/plain/oauth-helper.py

--steffen
|
|Der Kragenbaer,The moon bear,
|der holt sich munter   he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)