16

I am confused by this, I have installed a lot of new packages and followed some tutorials after googling but I keep getting this kind of SASL -error. I am not sure whether the mistake is in some Gmail settings or should I check some settings in Ubuntu?

I thought this tutorial here would have solved this problem (i am simply trying to set up local mail reading with mutt, using gmail) but I cannot see the instructed things with telnet: "250-STARTTLS 250-AUTH PLAIN LOGIN" so that is why it is not working.

$cat .muttrc

set imap_user = "[email protected]"  
set imap_pass = "pass"   
#set smtp_url = "smtp://[email protected]:465/"  
set smtp_url = "smtp://[email protected]:587/"    
set smtp_pass = "pass"  
set from = "[email protected]"  
set realname = "name"    
set folder = "imaps://imap.gmail.com:993" 
set spoolfile = "+INBOX"  
set postponed="+[Gmail]/Drafts"    
set move = no
2
  • 1
    This question appears to be abandoned and unanswered, could you perhaps add more detail to your question? If this question no longer applies then you can either delete it or answer it yourself if you've solved the problem. Thanks! Mar 24, 2012 at 3:56
  • 3
    How on earth is this too localized?? Apr 12, 2017 at 14:14

1 Answer 1

13

This

set smtp_url = "smtp://[email protected]:587/" 

should probably be

set smtp_url = "smtps://[email protected]@smtp.gmail.​​​com:465/"

2 differences:

  • use smpts and not smtp;
  • it is not clear if you meant that but name in your command should be like [email protected] (not just the xxx in front of the @)

Also make sure

  • openssl
  • libsasl2
  • gnutls-bin

are installed.

6
  • set smtp_url = "smtp://[email protected]:587/" is correct.
    – pchaigno
    Sep 9, 2017 at 14:10
  • On mac OSX, 465 port works fine with smtps. Not sure why
    – Nabin
    Nov 20, 2017 at 16:27
  • FWIW, what fixed this problem for me was simply adding: set smtp_authenticators="login" set ssl_starttls = yes set ssl_force_tls = yes to muttrc. Mar 13, 2020 at 22:17
  • Thank you for this very useful asnwer. It allowed me to get neomutt working with fastmail.
    – sehe
    Jun 30, 2020 at 21:17
  • 1
    In Ubuntu 20_04, I needed libsasl2-2 instead of libsasl2 which replaced it. Openssl was already installed, gnutls-bin I had to install. The error remains: SASL authentication failed Could not send the message.
    – Timo
    Feb 28, 2022 at 14:59