mirror of
https://github.com/d99kris/nmail.git
synced 2026-04-26 09:46:01 +03:00
[GH-ISSUE #137] outlook-oauth2 issues #109
Labels
No labels
bug
enhancement
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nmail#109
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @fallwest on GitHub (Mar 8, 2023).
Original GitHub issue: https://github.com/d99kris/nmail/issues/137
Originally assigned to: @d99kris on GitHub.
Problems authenticating with outlook-oauth2:
Environment:
Summary
This is fantastic and desperately needed software but I had to hack a bit to get Outlook oauth2 to work.
Issues
--setup outlook-oauth2not documented in readme.md--setup outlook-oauth2failed. After successfully logging into the Microsoft website that opens during the setup process, the setup exited with message "Setup failed". I had to comment validation as follows to get the setup to work:SmtpClientAuthentication:See for more info: https://learn.microsoft.com/en-us/exchange/clients-and-mobile-in-exchange-online/authenticated-client-smtp-submission
@fallwest commented on GitHub (Mar 8, 2023):
Quick update: I got the mail admin to enable
SmtpClientAuthenticationby following instructions here: https://learn.microsoft.com/en-us/exchange/clients-and-mobile-in-exchange-online/authenticated-client-smtp-submission#enable-smtp-auth-for-specific-mailboxesBut it would still be great if nmail could use oauth2 (modern auth) for smtp authentication
@d99kris commented on GitHub (Mar 9, 2023):
Thanks for reporting and providing a detailed bug report. 👍
I'll look into this.
@d99kris commented on GitHub (Mar 12, 2023):
To summarize I believe there are three issues:
--setup outlook-oauth2. Thanks for highlighting, I will fix this.outlook-oauth2setup wizard, in case it's unable to determine from Outlook server. It would be neat to have a corp/org outlook account for reproducing the issue and testing a fix, but I'm not sure if there's any provider offering them free/cheap. Will try do some research.@fallwest commented on GitHub (Mar 16, 2023):
Thanks for investigating. I would suggest prompting for the user address when using the outlook-oauth2 setup wizard. With my monkey-patching that removes user validation, combined with manually updating the user in config, I find the client works great. I use it continually. As stated above, I could not get oauth2 to work for smtp validation. But my company's mail admin activated the permission specified here and now sending works fine: https://learn.microsoft.com/en-us/exchange/clients-and-mobile-in-exchange-online/authenticated-client-smtp-submission#enable-smtp-auth-for-specific-mailboxes . So maybe smtp2 oauth2 can be a less critical new feature development. I can't offer you a company email but am happy to test a new feature branch :-)
@fallwest commented on GitHub (Mar 16, 2023):
I have set up debugging to understand better what happens in my environment. Here are my findings:
int status = PerformAction(Generate);inauth.cppis 1280outlook-oauth2.tokensare:No email address here.
@fallwest commented on GitHub (Mar 16, 2023):
Found this in nmails
log.txt@d99kris commented on GitHub (Mar 17, 2023):
Thanks a lot for the PR! Looks fine, will probably merge tomorrow.
Yes, I will probably wait and observe how other email clients will handle this.
Fully understandable 🙂 Actually I found that MS offers 30-days trial of
Microsoft 365so I was able to reproduce setup/authentication issue you were facing.