Sending an email with Mutt

1

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 = "mulligun81@gmail.com"
set realname = "Darek"
set imap_user = "mulligun81@gmail.com"
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://mulligun81@gmail.com@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?

Mulligan

Posted 2017-02-07T10:44:59.283

Reputation: 533

Are you sure it's a good idea to post your Gmail password here? – user1686 – 2017-02-07T14:11:41.670

Answers

0

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

Jakub Jindra

Posted 2017-02-07T10:44:59.283

Reputation: 503

This seems to be a link-only answer. You should provide context to all your links, otherwise the OP will have no idea what they are clicking into. Also, the link can break and the answer becomes worthless later.

– CaldeiraG – 2019-04-09T07:44:26.533