[Users] oauth2 problem with GMail

George Avrunin avrunin at math.umass.edu
Tue Jan 4 13:38:10 UTC 2022


I'm using Claws-Mail 4.0.0 on a fully updated Fedora 35 system.   The rpm
is claws-mail-4.0.0-2.fc35.x86_64.

For several years, I've had an IMAP gmail account set up in Claws using an
application password.  About a week ago, partly as a demonstration for the
university IT group which wants to drop IMAP access to email on "security"
grounds but will allow GMail through phone apps, I decided to try the
oauth2 authentication in claws. So I created a new account and followed the
instructions in the FAQ for oauth2. Everything worked fine, so I disabled
the old account (stopped it from receiving mail).  Things continued to
work for several days; I was reading my GMail messages through this new
claws account.  But yesterday, the account with oauth2 stopped working.
Here's what I'm seeing in the network log (I took out the IP address):

2022-01-04 08:05:09] IMAP< 6289 OK Status completed (0.001 + 0.000 secs). 
* Account 'gmail-oauth2': Connecting to IMAP server: imap.gmail.com:993...
[2022-01-04 08:05:09] IMAP< * OK Gimap ready for requests from XX.XX.XX.XX
t8mb13956259qve 
* IMAP connection is un-authenticated
* OAuth2 obtaining access token using refresh token
* OAuth2 access token not obtained
* OAuth2 access token not obtained
[2022-01-04 08:05:10] IMAP> 1 CAPABILITY 
[2022-01-04 08:05:10] IMAP< * CAPABILITY IMAP4rev1 UNSELECT IDLE NAMESPACE
QUOTA ID XLIST CHILDREN X-GM-EXT-1 XYZZY SASL-IR AUTH=XOAUTH2 AUTH=PLAIN
AUTH=PLAIN-CLIENTTOKEN AUTH=OAUTHBEARER AUTH=XOAUTH 
[2022-01-04 08:05:10] IMAP< 1 OK Thats all she wrote! t8mb13956259qve 
[2022-01-04 08:05:10] IMAP> Logging georgeavrunin at gmail.com to imap.gmail.com using XOAUTH2
IMAP> 
[2022-01-04 08:05:10] IMAP< Invalid credentials (Failure) ** IMAP IMAP> error on imap.gmail.com: LOGIN error
[2022-01-04 08:05:10] IMAP< Error logging in to imap.gmail.com
[2022-01-04 08:05:44] IMAP> 3 LOGOUT 
[2022-01-04 08:05:44] IMAP< * BYE Logout Requested t8mb13956259qve 
[2022-01-04 08:05:44] IMAP< 3 OK Quoth the raven, nevermore...
t8mb13956259qve 
[2022-01-04 08:05:49] IMAP> 28715 NOOP 

I haven't changed any of the settings for that account, except that now
I've stopped it from receiving messages so Claws doesn't complain each
time it tries to get mail. Reactivating the old, non-oauth2 account, works
fine. And I can read GMail on my phone with an app (FairEmail) using oauth2
(though that's obviously with a different client secret, etc.), so there
doesn't seem to be a problem with my Google account.   The API dashboard
at Google still shows the project and the oauth2 stuff, and everything
looks ok as far as I can tell (though I've never used this before setting
up the account with oauth2, so I'm not sure what it should really look
like). 

Any idea what's going on?  I'm happy to collect more information.

Thanks,

  George


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 228 bytes
Desc: OpenPGP digital signature
URL: <http://lists.claws-mail.org/pipermail/users/attachments/20220104/65b975be/attachment.sig>


More information about the Users mailing list