If an organization does not count Claws Mail among its approved software to access its Outlook / Microsoft Online / Office365 email systems but does consider Thunderbird to be good enough it is still possible to use Claws Mail with the Oauth2 authentication system.
Thunderbird’s client id and secret can be readily found within the Thunderbird sources, see comm/mailnews/base/src/OAuth2Providers.jsm
. Additionally, the following patch modifies the “Exchange” Oauth provider in Claws Mail to behave more closely to Thunderbird.
--- claws-mail-4.1.1.bak/src/oauth2.c 2022-10-18 23:38:33.000000000 +1300
+++ claws-mail-4.1.1/src/oauth2.c 2023-01-17 18:32:07.467399332 +1300
@@ -84,19 +84,19 @@
""},
{"login.microsoftonline.com",
"",
- "",
- "http://127.0.0.1:8888",
+ ".",
+ "http://localhost:8888",
"/common/oauth2/v2.0/authorize",
"/common/oauth2/v2.0/token",
"/common/oauth2/v2.0/token",
"code",
- "offline_access https://outlook.office.com/IMAP.AccessAsUser.All https://outlook.office.com/POP.AccessAsUser.All https://outlook.office.com/SMTP.Send",
+ "https://outlook.office365.com/IMAP.AccessAsUser.All https://outlook.office365.com/POP.AccessAsUser.All https://outlook.office365.com/SMTP.Send offline_access",
"authorization_code",
"refresh_token",
"common",
"",
"offline",
- "offline_access https://outlook.office.com/IMAP.AccessAsUser.All https://outlook.office.com/POP.AccessAsUser.All https://outlook.office.com/SMTP.Send",
+ "https://outlook.office365.com/IMAP.AccessAsUser.All https://outlook.office365.com/POP.AccessAsUser.All https://outlook.office365.com/SMTP.Send offline_access",
"query",
""},
{"api.login.yahoo.com",