Score:0

Cannot get Mutt/Gmail/OAuth2 to work - cannot STARTTLS

cn flag

I'm trying to get Mutt working with Gmail using OAuth2.

I'm using Debian 10 and have compiled Mutt 2.2.1 with --enable-smtp.

I've created my tokens.

My muttrc contains:

set smtp_oauth_refresh_command="~/oauth2.py --quiet --user=my_user@gmail.com --client_id=my_client_id --client_secret=my_client_secret --refresh_token=my_refresh_token"
set smtp_authenticators="oauthbearer"
set smtp_url = "smtp://my_user@gmail.com@smtp.gmail.com:587/"
set from = "my_name@gmail.com" 
set use_from = yes
set realname = "my_realname"

When I try to send the message I get:

SMTP session failed: 530 5.7.0 Must issue a STARTTLS command first. v188-20020a1cacc5000000b00384b71a50d5sm10960779wme.24 - gsmtp
Could not send the message.

I've tried:

set ssl_starttls = yes
set ssl_force_tls = yes

But Mutt complains that these are unknown variables.

Any suggestions, please?

Score:0
cn flag

OK, all I needed to do was re-compile Mutt adding:

--with-gnutls
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.