On Mon 16/12/2019 19:52, Stuart Henderson wrote: > -------- > oauth2.py is a script that can be used as a standalone utility for > generating and authorizing OAuth tokens, and for generating OAuth2 > authentication strings from OAuth tokens. > > This can be used with mutt to allow oauth2 logins to Gmail. > -------- > > More info at https://github.com/google/gmail-oauth2-tools / > https://github.com/google/gmail-oauth2-tools/wiki/OAuth2DotPyRunThrough > > OK to import?
oauth2.py is noisy when refreshing a token. This causes mutt to fail when using the *_oauth_refresh_command from pkg/README. This is easily fixed by using the '--quiet' argument. Use of the latter is mentioned by http://www.mutt.org/doc/manual/#oauth. Your port, with the diff below has been tested successfully with mutt and a gmail account. OK with the diff below. diff --git pkg/README pkg/README index db32dd7d032..f4856afa093 100644 --- pkg/README +++ pkg/README @@ -29,8 +29,8 @@ token: set imap_authenticators="oauthbearer" set imap_user="<email_address>" -set imap_oauth_refresh_command="oauth2.py --user=USER --client_id=CLIENTID.apps.googleusercontent.com --client_secret=CLIENT_SECRET --refresh_token=REFRESH_TOKEN" +set imap_oauth_refresh_command="oauth2.py --quiet --user=USER --client_id=CLIENTID.apps.googleusercontent.com --client_secret=CLIENT_SECRET --refresh_token=REFRESH_TOKEN" set smtp_authenticators="oauthbearer" set smtp_url="smtps://[email protected]@smtp.gmail.com:465" -set smtp_oauth_refresh_command="oauth2.py --user=USER --client_id=CLIENTID.apps.googleusercontent.com --client_secret=CLIENT_SECRET --refresh_token=REFRESH_TOKEN" +set smtp_oauth_refresh_command="oauth2.py --quiet --user=USER --client_id=CLIENTID.apps.googleusercontent.com --client_secret=CLIENT_SECRET --refresh_token=REFRESH_TOKEN"
