Mutt ошибка sasl аутентификации

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 = "XYZ@gmail.com"  
set imap_pass = "pass"   
#set smtp_url = "smtp://name@smtp.gmail.com:465/"  
set smtp_url = "smtp://name@smtp.gmail.com:587/"    
set smtp_pass = "pass"  
set from = "XYZ@gmail.com"  
set realname = "name"    
set folder = "imaps://imap.gmail.com:993" 
set spoolfile = "+INBOX"  
set postponed="+[Gmail]/Drafts"    
set move = no

  • Home
  • Forum
  • The Ubuntu Forum Community
  • Ubuntu Official Flavours Support
  • General Help
  • [SOLVED] SASL Authentication Failure with Mutt

  1. [SOLVED] SASL Authentication Failure with Mutt

    I’ve had zero problems with my regular @gmail.com address with Mutt. This @bucknell.edu address however, will not let me send mail. I get a «SASL Authentication Failure» every time I try. Any ideas? Are my servers set up properly?

    The @bucknell.edu address is a google address, only with a different domain name. This login info works for all other clients I’ve set it up with. I’d really love to get mutt working.

    Thanks guys!

    Here’s a snippet from my config, with the password and username changed out.

    Code:

    # IMAP
    set from         = "USERNAME@bucknell.edu"
    set imap_user         = "USERNAME@bucknell.edu"
    set imap_pass         = "PWORD"
    set folder         = "imaps://imap.gmail.com:993"
    set imap_check_subscribed
    
    # SMTP
    set smtp_url        = "smtp://USERNAME@smtp.gmail.​​com:587/"
    set smtp_pass        = "PWORD"
    
    set spoolfile         = "+INBOX"
    set postponed         = "+[Gmail]/Drafts"
    set trash        = "imaps://imap.gmail.com/[​​Gmail]/Trash"
    
    set header_cache         =~/.mutt/cache/headers
    set message_cachedir         =~/.mutt/cache/bodies
    set certificate_file         =~/.mutt/certificates

    And here’s a snippet from the debug output…

    Code:

    [2012-03-25 18:03:46] Looking up smtp.gmail.com...
    [2012-03-25 18:03:46] Connecting to smtp.gmail.com...
    [2012-03-25 18:03:46] Connected to smtp.gmail.com:587 on fd=6
    [2012-03-25 18:03:46] 6< 220 mx.google.com ESMTP hr2sm26597687qab.8
    [2012-03-25 18:03:46] 6> EHLO xubuntu-SXPS
    [2012-03-25 18:03:46] 6< 250-mx.google.com at your service, [134.82.127.123]
    [2012-03-25 18:03:46] 6< 250-SIZE 35882577
    [2012-03-25 18:03:46] 6< 250-8BITMIME
    [2012-03-25 18:03:46] 6< 250-STARTTLS
    [2012-03-25 18:03:46] 6< 250 ENHANCEDSTATUSCODES
    [2012-03-25 18:03:46] 6> STARTTLS
    [2012-03-25 18:03:46] 6< 220 2.0.0 Ready to start TLS
    [2012-03-25 18:03:46] SSL/TLS connection using TLS1.0 (RSA/ARCFOUR-128/SHA1)
    [2012-03-25 18:03:47] 6> EHLO xubuntu-SXPS
    [2012-03-25 18:03:47] 6< 250-mx.google.com at your service, [134.82.127.123]
    [2012-03-25 18:03:47] 6< 250-SIZE 35882577
    [2012-03-25 18:03:47] 6< 250-8BITMIME
    [2012-03-25 18:03:47] 6< 250-AUTH LOGIN PLAIN XOAUTH
    [2012-03-25 18:03:47] 6< 250 ENHANCEDSTATUSCODES
    [2012-03-25 18:03:47] SASL local ip: 134.82.127.123;36547, remote ip:173.194.68.108;587
    [2012-03-25 18:03:47] External SSF: 128
    [2012-03-25 18:03:47] External authentication name: USERNAME
    [2012-03-25 18:03:47] Authenticating (LOGIN)...
    [2012-03-25 18:03:47] 6> AUTH LOGIN
    [2012-03-25 18:03:47] 6< 334 VXNlcm5hbWU6
    [2012-03-25 18:03:47] mutt_sasl_cb_authname: getting authname for smtp.gmail.com:587
    [2012-03-25 18:03:47] mutt_sasl_cb_pass: getting password for USERNAME@smtp.gmail.com:587
    [2012-03-25 18:03:47] 6> *****
    [2012-03-25 18:03:47] 6< *****
    [2012-03-25 18:03:47] 6> *****
    [2012-03-25 18:03:48] 6< 535-5.7.1 Username and Password not accepted. Learn more at
    [2012-03-25 18:03:48] SASL authentication failed
    [2012-03-25 18:03:50] Postpone this message? ([yes]/no): 
    [2012-03-25 18:03:51] mutt_free_body: unlinking /tmp/mutt-xubuntu-SXPS-1000-​​6696-8039055121269571200.
    [2012-03-25 18:03:51] Mail not sent.
    [2012-03-25 18:03:51] 4> a0021 NOOP
    [2012-03-25 18:03:51] 4 a0022 CLOSE
    a0023 LOGOUT
    [2012-03-25 18:03:52] 4< a0022 OK Returned to authenticated state. (Success)
    [2012-03-25 18:03:52] 4< * BYE LOGOUT Requested
    [2012-03-25 18:03:52] Handling BYE
    [2012-03-25 18:03:52] 4< a0023 OK 73 good day (Success)
    [2012-03-25 18:03:52] IMAP queue drained

    Last edited by Earsplit; March 26th, 2012 at 02:31 AM.


  2. Re: SASL Authentication Failure with Mutt

    I figured it out…

    For anyone else encountering this problem, I changed the line

    Code:

    set smtp_url        = "smtp://USERNAME@smtp.gmail.​​​com:587/"

    to

    Code:

    set smtp_url        = "smtps://USERNAME@DOMAIN.EDU@smtp.gmail.​​​com:465/"

    I had to change the port to 465, and use the secure smtp (smtps) to get this working.

    Also make sure the packages gnutls-bin, openssl, and libsasl2 are installed.


Tags for this Thread

Bookmarks

Bookmarks


Posting Permissions

I’m trying to set a cron-job for sending mail attachments from my cpanel server.
I found that Mutt is a great option.
However, I’m having difficulty due to this one error that keeps occurring again and again.

Whenever I try sending a mail I get this:

SASL authentication failed.
Could not send the message.

The following is my .muttrc file.

set from = USERNAME@gmail.com
set realname = "NAME"

#set smtp_url = smtp://USERNAME@gmail.com:587/
set smtp_url = "smtps://USERNAME@smtp.gmail.com:465/"
set smtp_pass = PASS
set imap_user = USERNAME@gmail.com
set imap_pass = PASS

set folder = imaps://imap.gmail.com:993
set spoolfile = imaps://imap.gmail.com/INBOX

set header_cache = ~/.mutt/cache/headers
set message_cachedir = ~/.mutt/cache/bodies
set certificate_file = ~/.mutt/certificates

# Etc
set mail_check = 100
set move = no
set imap_keepalive = 900
set sort = threads
set editor = "vim"

#source ~/.mutt/gpg.rc
set ssl_starttls=no
set ssl_force_tls=yes
set smtp_authenticators = "login"

set ssl_verify_host = no
set ssl_verify_dates = no

This may take a long time (probably won’t be solvable) and there might not be many people with this problem. But I feel that this thread might help others in the future

I’ve installed gnutils-bin and openssl

which gnutls-bin
/usr/bin/which: no gnutls-bin in (/usr/local/cpanel/3rdparty/lib/path-bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/opt/cpanel/composer/bin:/usr/local/python3.6/bin:/usr/local/bin:/home/covid/.local/bin:/home/USERNAME/bin)

which openssl
/usr/bin/openssl

asked Mar 24, 2020 at 11:54

Nikhilesh Prabhakar's user avatar

I ran into the same thing, I had to change my muttrc config so that set realname=’name’ was exactly the same as the Name in that is in gmails Personal Info for the account.

Also in Gmails Security «Less secure app access» needs to be set to ON

answered Apr 28, 2020 at 20:44

Jesse L.'s user avatar

1

Just a quick update, according to google support for security reasons «Allow less secure apps» is no longer availabe (see here), however, there is still a workaround, please see below:

You might need to first enable MFA and then in your google account setting, under «Sign in to Google» select «App Passwords» (check out this google article if you don’t see this option on your google account: 185833)

answered Aug 7, 2022 at 9:34

MRK's user avatar

MRKMRK

771 silver badge8 bronze badges

So i remember on the previous commit, The setup is asking about Gmail SMTP Server name and Gmail SMTP Port.

Then after this current version release, The setup doesn’t ask you to manually add the SMTP Server name/Port thing, And so the email refusing to send because of the SASL Auth. So i search around the Internet and finally found the fix.

So incase you have this problem too, just add these line to get it work.

 set imap_user = "JohnDoe@gmail.com"
 set imap_pass = "YourPassword"
 set smtp_url = "smtp://JohnDoe@smtp.gmail.com:587/"
 set smtp_pass = "YourPassword"
 set from = "JohnDoe@gmail.com"
 set realname = "John Doe"


Go to commandline


SASL authentication failure when using Mutt with Outlook.com

Outlook.com added IMAP support a couple of days ago. I have configured my muttrc to use Outlook.com, and can read my mails. But whenever I want to send an email, I get the SASL authentication error.

I have set the smtp_url as this:

set smtp_url = "smtp://my_email_id@smtp-mail.outlook.com:587/"

If any of you have an Outlook.com address, can you please tell me where I’m doing it wrong? Thanks.

UPDATE: The solution as suggested by u/grijandemoren is to replace my_email_id with my_email_id@outlook.com

Понравилась статья? Поделить с друзьями:
  • Murdered soul suspect ошибка
  • Mumu player ошибка
  • Multix pro ошибки
  • Multitronics ошибка 0504
  • Multitronics код ошибки 504