LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-15-2021, 12:38 PM   #1
peter7089
Member
 
Registered: May 2016
Distribution: MX Linux
Posts: 249

Rep: Reputation: Disabled
I get 'Login Failed' with mutt email client


I installed mutt on mx linux, and setup the configuration file for gmail, but when i start mutt in terminal i get 'Login Failed'. This is the configuration file:

Code:
set from = "user@gmail.com"
set realname = "user name"
# IMAP settings
set imap_user = "user@gmail.com"
set imap_pass = "password"
# SMTP settings
set smtp_url = "smtps://user@smtp.gmail.com:465"
set smtp_pass = "password"
# Remote Gmail folders
set folder = "imaps://imap.gmail.com:993"
set spoolfile = "+INBOX"
set postponed = "+[Gmail]/Drafts"
set record = "+[Gmail]/Sent Mail"
set trash = "+[Gmail]/Trash"

Any idea what might be the reason for this?
 
Old 09-15-2021, 03:56 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,777

Rep: Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935
Code:
set ssl_starttls=yes
set ssl_force_tls=yes
set from = "user@gmail.com"
set realname = "user name"
set imap_user = "user@gmail.com"
set imap_pass = "imap password"
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://user@smtp.gmail.com:465/"
set smtp_pass = "smtp password"
set move = no 
set imap_keepalive = 900
I have not used mutt in awhile but here is my muttrc file which is very similar. However, google wants 2 factor authentication unless you enable access to less secure apps.

https://support.google.com/a/answer/6260879?hl=en
 
Old 09-15-2021, 04:24 PM   #3
peter7089
Member
 
Registered: May 2016
Distribution: MX Linux
Posts: 249

Original Poster
Rep: Reputation: Disabled
I tried your muttrc file with my data but still getting 'login failed'. The strange thing is that the same gmail account works without issue on thunderbird.
 
Old 09-15-2021, 05:02 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,777

Rep: Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935
Newer versions of Thunderbird should automatically use OAuth2 but mutt does not.

I have a few muttrc files... This one works but is setup for my mail domain and I have enabled less secure apps.
Code:
set from = "user@gmail.com"
set use_from = yes
set realname = "real name"
set imap_user = "user@gmail.com"
set imap_pass = "password"
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://user@gmail.com@smtp.gmail.com:465/"
set smtp_pass = "password"
set move = no 
set imap_keepalive = 900
 
Old 09-16-2021, 01:35 AM   #5
peter7089
Member
 
Registered: May 2016
Distribution: MX Linux
Posts: 249

Original Poster
Rep: Reputation: Disabled
I tried the new configuration and also enabled less secure apps access, but still get 'login failed'.
 
Old 03-05-2022, 02:20 AM   #6
andrew.46
Senior Member
 
Registered: Oct 2007
Distribution: Slackware
Posts: 1,365

Rep: Reputation: 493Reputation: 493Reputation: 493Reputation: 493Reputation: 493
Quote:
Originally Posted by peter7089 View Post
I tried the new configuration and also enabled less secure apps access, but still get 'login failed'.
Has your Gmail account been forced over to 2fa authentication? If so you need to set up an App Password with Google. Works well enough here although I use POP3/SSL not IMAP.
 
Old 03-05-2022, 09:22 AM   #7
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
This thread is a similar topic.
https://www.linuxquestions.org/quest...ts-4175708934/
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] [Mutt] Can I process a current mail in a shell command from Mutt? Michael Uplawski Linux - Software 5 06-21-2016 02:56 AM
[SOLVED] Mutt does not change the "unread" flag on the IMAP server and other Mutt questions TobiSGD Linux - Software 1 10-09-2012 08:44 AM
mutt does not honour mutt.rc 'use_from' entry when accepting piped input davidchall Linux - Software 0 05-28-2012 02:13 AM
Mutt experts - Mutt won't use the Maildir I specify in .muttrc moistTowelette Debian 2 08-24-2009 08:04 AM
Mutt question: "How can I configure mutt for not automarking as read??" xowl Linux - Software 0 09-25-2007 09:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration