I'm trying to send an email with mutt but get an error like so:
TLSv1.2 connection using TLSv1/SSLv3 (ECDHE-RSA-AES128-GCM-SHA256)
SASL authentication failed
Debugging at level 5.
Could not send the message.
My mutt config (~/.muttrc):
set ssl_force_tls=yes
set from = ""
set realname = "Darek"
set imap_user = ""
set imap_pass = "asmd0077"
set folder = "imaps://imap.gmail.com:993"
set spoolfile = "+INBOX"
set postponed ="+[Gmail]/Drafts"
set header_cache =~/.mutt/cache/headers
set message_cachedir =~/.mutt/cache/bodies
set certificate_file =~/.mutt/certificates
set smtp_url = "smtps://@smtp.gmail.com:465/"
set smtp_pass = "asmd0077"
set move = no
set imap_keepalive = 900
As suggested elsewhere i've
gnutls-bin (gnutls-3.4.13)
openssl (openssl-1.0.2h)
libsasl2 (cyrus-sasl-2.1.26)
installed.
PS. Why doesn't the debug option gives any info?
11 Answer
You can try to switch authentication to OAuth2 in your muttrc - doc
- Use the oauth2.py script from Google's gmail-oauth2-tools
- Visit following site Click on
Create Credentials > OAuth client IDand continue until you get client_id and client_secret - Then run
oauth2.py --generate_oauth2_tokento get a refresh_token,
muttrc snippet:
set imap_authenticators="oauthbearer"
set imap_oauth_refresh_command="/path/to/oauth2.py --quiet --user=[email_address]\ --client_id=[client_id] --client_secret=[client_secret]\ --refresh_token=[refresh_token]"Substitute pop or smtp for imap in the above example to configure for those.
Or create application password and if it doesn't work either Let less secure apps access your account
1