You are not logged in.
Hello
I've configured two different account with mutt.
Each one work correctly without the other, but when i try switch for the first to the second account (bind to F2 and F3), it just cannot login.
Logging in
Login failed
...Here are my mutt configuration files :
muttrc
set header_cache = "~/.cache/mutt"
set message_cachedir = "~/.cache/mutt"
set imap_check_subscribed
set imap_keepalive = 300
unset imap_passive
set mail_check = 60
set mbox_type=Maildir
set edit_headers = yes
set editor=vim
set use_from=yes
## ACCOUNT2
source "~/.mutt/obsmuttrc"
folder-hook westpham.ns@obs.ujf-grenoble.fr/ 'source ~/.mutt/obsmuttrc'
## ACCOUNT1
source "~/.mutt/gmailmuttrc"
# Here we use the $folder variable that has just been set in the sourced file.
# We must set it right now otherwise the 'folder' variable will change in the next sourced file.
folder-hook mathieu.westphal.ns@gmail.com/ 'source ~/.mutt/gmailmuttrc'
macro index,pager <f2> '<sync-mailbox><enter-command>source ~/.mutt/gmailmuttrc<enter><change-folder>!<enter>'
macro index,pager <f3> '<sync-mailbox><enter-command>source ~/.mutt/obsmuttrc<enter><change-folder>!<enter>'
#macro index 'c' '<change-folder>?<change-dir><home>^K=<enter>'gmailmuttrc
set imap_user = mathieu.westphal.ns@gmail.com
set imap_pass = *********
set folder = imaps://mathieu.westphal.ns@imap.gmail.com/
set spoolfile = +INBOX
#mailboxes = +INBOX
unset ssl_starttls
# Specify where to save and/or look for postponed messages.
set postponed = +[Gmail]/Brouillons
unset record
set from="mathieu.westphal.ns@gmail.com"
set smtp_url=smtps://$imap_user:$imap_pass@smtp.gmail.com
## Hook -- IMPORTANT!
account-hook $folder "set imap_user=mathieu.westphal.ns@gmail.com imap_pass=*******"obsmuttrc
set imap_user = westpham.ns
set imap_pass = *************
set folder = imaps://$imap_user@hermes.obs.ujf-grenoble.fr:993/
set spoolfile = +INBOX
#mailboxes = +INBOX
set record = +Sent
set postponed = +Drafts
set ssl_starttls = yes
set from="westpham.ns@obs.ujf-grenoble.fr"
set my_smtp_user=westphma
set my_smtp_pass=******
set smtp_url=smtp://$my_smtp_usero:$my_smtp_pass@smtps.ujf-grenoble.fr:587
account-hook $folder "set folder=$folder"Last edited by GloW_on_dub (2013-04-10 11:35:16)
Offline
After you've switched user, you can query the values of the settings with:
:set [?]<variable>Where the ? is needed for booleans and quadoptions.
It might show if one variable is not getting changed.
"...one cannot be angry when one looks at a penguin." - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle
Offline
Once i've tried to change account, mutt is stuck with :
Logging in
Login Failed
Logging in
Login Failed
...Cannot type anything.
I need to kill him to close it.
Offline
Is the password correct in the last line of your gmail rc? Looks like a typo - and you forgot to remove it from the listing?
"...one cannot be angry when one looks at a penguin." - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle
Offline
thank you, let's say nobody else see that.
Offline
I did wonder whether to test the typo theory myself... ![]()
"...one cannot be angry when one looks at a penguin." - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle
Offline
I had a similar issue when setting up mutt recently and couldn't get it to work. So if you do find a solution I'd be interested to know.
Instead I configured mutt to cooperate with offlineimap (which handles multiple accounts very well), and it's been working great since. Honestly using offlineimap is faster and makes more sense, since mutt won't need to sync with your accounts every time, assuming you're comfortable having all of your mail stored locally.
Last edited by SolarBoyMatt (2013-04-10 18:00:07)
Offline
Ok, here is my working configuration.
My main mistake was to copy what we can find in here :
https://wiki.archlinux.org/index.php/Mutt where there is this line :
account-hook $folder "set imap_user=user@gmail.com imap_pass=****"wich is incorrect.
muttrc:
set header_cache = "~/.cache/mutt"
set message_cachedir = "~/.cache/mutt"
set imap_check_subscribed
set imap_keepalive = 300
unset imap_passive
set mail_check = 60
set mbox_type=Maildir
set edit_headers = yes
set editor=vim
set use_from=yes
## ACCOUNT1
source "~/.mutt/gmailmuttrc"
folder-hook mathieu.westphal@gmail.com/ 'source ~/.mutt/gmailmuttrc'
## ACCOUNT2
source "~/.mutt/obsmuttrc"
folder-hook westpham@obs.ujf-grenoble.fr/ 'source ~/.mutt/obsmuttrc'
macro index,pager <f2> '<sync-mailbox><enter-command>source ~/.mutt/gmailmuttrc<enter><change-folder>!<enter>'
macro index,pager <f3> '<sync-mailbox><enter-command>source ~/.mutt/obsmuttrc<enter><change-folder>!<enter>'
#macro index 'c' '<change-folder>?<change-dir><home>^K=<enter>'gmailmuttrc
set imap_user = mathieu.westphal.ns@gmail.com
set imap_pass = *********
set folder = imaps://mathieu.westphal.ns@imap.gmail.com/
set spoolfile = +INBOX
#mailboxes = +INBOX
unset ssl_starttls
# Specify where to save and/or look for postponed messages.
set postponed = +[Gmail]/Brouillons
unset record
set ssl_starttls = no
set from="mathieu.westphal@gmail.com"
set smtp_url=smtps://$imap_user:$imap_pass@smtp.gmail.com
## Hook -- IMPORTANT!
account-hook *gmail.com "set imap_user=mathieu.westphal.ns@gmail.com"obsmuttrc
set imap_user = westpham
set imap_pass = ************
set folder = imaps://$imap_user@hermes.obs.ujf-grenoble.fr:993/
set spoolfile = +INBOX
#mailboxes = +INBOX
set record = +Sent
set postponed = +Drafts
set ssl_starttls = yes
set from="westpham.ns@obs.ujf-grenoble.fr"
set my_smtp_user=westphma
set my_smtp_pass=******
set smtp_url=smtp://$my_smtp_user:$my_smtp_pass@smtps.ujf-grenoble.fr:587
account-hook *.obs.ujf-grenoble.fr "set imap_user=westpham"I still don't understand everything here, but doesn't matter, it's working ![]()
Last edited by GloW_on_dub (2013-04-10 18:20:50)
Offline
Just for reference: http://dev.mutt.org/doc/manual.html
"...one cannot be angry when one looks at a penguin." - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle
Offline
While this thread is fresh and on the topic of mutt I'd shoot the community a question about a major problem I'm having with my setup. That is if the OP can hold off on marking the topic as [SOLVED].
I had a working setup and decided to patch it with the sidebar patch. The compilation screwed up the flags for some reason and when launching mutt I get this error:
Error in /home/hiro/.mutt/muttrc, line 7: imap_user: unknown variable
Error in /home/hiro/.mutt/muttrc, line 8: imap_pass: unknown variable
Error in /home/hiro/.mutt/muttrc, line 9: smtp_url: unknown variable
Error in /home/hiro/.mutt/muttrc, line 42: imap_passive: unknown variable
Error in /home/hiro/.mutt/muttrc, line 43: imap_keepalive: unknown variable
Error in /home/hiro/.mutt/muttrc, line 71: ssl_force_tls: unknown variable
Error in /home/hiro/.mutt/muttrc, line 72: ssl_starttls: unknown variable
source: errors in /home/hiro/.mutt/muttrc
Press any key to continue...I reinstalled mutt being unable to determine the problem. The problem persists.
The article here describes the same issue and identifies it as the install failing to activate the compile options. The solution presented is to change the flag options before compiling but this person is on Gentoo and I don't see why $ pacman -S mutt won't suffice.
As expected $ mutt -v reads:
Mutt 1.5.21 (2010-09-15)
Copyright (C) 1996-2009 Michael R. Elkins and others.
Mutt comes with ABSOLUTELY NO WARRANTY; for details type `mutt -vv'.
Mutt is free software, and you are welcome to redistribute it
under certain conditions; type `mutt -vv' for details.
System: Linux 3.8.6-1-ARCH (x86_64)
ncurses: ncurses 5.9.20110404 (compiled with 5.9)
libidn: 1.26 (compiled with 1.26)
Compile options:
-DOMAIN
-DEBUG
-HOMESPOOL -USE_SETGID +USE_DOTLOCK -DL_STANDALONE +USE_FCNTL -USE_FLOCK
-USE_POP -USE_IMAP -USE_SMTP
-USE_SSL_OPENSSL -USE_SSL_GNUTLS -USE_SASL -USE_GSS -HAVE_GETADDRINFO
+HAVE_REGCOMP -USE_GNU_REGEX
+HAVE_COLOR +HAVE_START_COLOR +HAVE_TYPEAHEAD +HAVE_BKGDSET
+HAVE_CURS_SET +HAVE_META +HAVE_RESIZETERM
+CRYPT_BACKEND_CLASSIC_PGP +CRYPT_BACKEND_CLASSIC_SMIME -CRYPT_BACKEND_GPGME
-EXACT_ADDRESS -SUN_ATTACHMENT
+ENABLE_NLS -LOCALES_HACK +HAVE_WC_FUNCS +HAVE_LANGINFO_CODESET +HAVE_LANGINFO_YESEXPR
+HAVE_ICONV -ICONV_NONTRANS +HAVE_LIBIDN +HAVE_GETSID -USE_HCACHE
ISPELL="/usr/bin/ispell"
SENDMAIL="/usr/sbin/sendmail"
MAILPATH="/var/mail"
PKGDATADIR="/usr/local/share/mutt"
SYSCONFDIR="/usr/local/etc"
EXECSHELL="/bin/sh"
-MIXMASTER
To contact the developers, please mail to <mutt-dev@mutt.org>.
To report a bug, please visit http://bugs.mutt.org/.
patch-1.5.21.sidebar.20130219.txtSo options like IMAP aren't activated for some reason even after pulling the mutt package from the official repositories. The sidebar patch is listed above so that is fishy. I don't know how to unpatch and I am thinking that may be the next step to try if I can figure that out.
I also have a full system backup so another route may be to replace the necessary directories and files with the backups. Any ideas?
I may start a thread dedicated to Mutt and errors regarding the setups since it can be a tricky software to figure out.
Offline