Sending an email with Mutt

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?

1

1 Answer

You can try to switch authentication to OAuth2 in your muttrc - doc

  1. Use the oauth2.py script from Google's gmail-oauth2-tools
  2. Visit following site Click on Create Credentials > OAuth client ID and continue until you get client_id and client_secret
  3. Then run oauth2.py --generate_oauth2_token to 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

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like