You are not logged in.

#1 2016-10-16 13:49:39

Beli3ver
Member
Registered: 2013-08-25
Posts: 19

Mutt multiple Accounts

Hello,

I am trying to setup mutt with multiple imap accounts, thats how my .muttrc is looking

# Folder hooks
folder-hook 'mailbox' 'source ~/.mutt/mailbox'
folder-hook 'icloud' 'source ~/.mutt/icloud'
folder-hook 'vonderland' 'source ~/.mutt/vonderland'
folder-hook 'google' 'source ~/.mutt/google'

# Default account
source ~/.mutt/mailbox         

# Macros for switching accounts
macro index <f4> '<sync-mailbox><enter-command>source ~/.mutt/mailbox<enter><change-folder>!<enter>'
macro index <f5> '<sync-mailbox><enter-command>source ~/.mutt/icloud<enter><change-folder>!<enter>'
macro index <f6> '<sync-mailbox><enter-command>source ~/.mutt/vonderland<enter><change-folder>!<enter>'
macro index <f9> '<sync-mailbox><enter-command>source ~/.mutt/google<enter><change-folder>!<enter>'

# Fetch mail shortcut
bind index G imap-fetch-mail

set sidebar_visible = yes
set sidebar_width = 35

set mailcap_path        = ~/.mutt/mailcap
auto_view text/html

source /home/malte/.mutt/theme/my
set imap_check_subscribed
unset imap_passive
set imap_keepalive = 300
set mail_check = 120
set timeout=10

set send_charset="utf-8"

set query_command= "khard email --parsable %s"
bind editor <Tab> complete-query
bind editor ^T    complete

set text_flowed
set editor="vim -c 'set spell spelllang=de,en' -c 'set tw=72 et'"

macro compose v "<edit-from>^Uidentity_<tab>" "Select from"

The first mail account is working perfectly. But when I am trying to switch the accounts, I see how the create the connection to the other mailaccount. Mutt receive the folder list, but then try to login with the imap userdatas from the first account:

[2016-10-16 05:45:32] Reading configuration file '/home/malte/.mutt/icloud'.
[2016-10-16 05:45:32] Schlage imap.mail.me.com nach...
[2016-10-16 05:45:32] Verbinde zu imap.mail.me.com...
[2016-10-16 05:45:32] SSL/TLS Verbindung unter Verwendung von TLS1.2 (ECDHE-RSA/AES-128-GCM/AEAD)
[2016-10-16 05:45:33] Connected to imap.mail.me.com:993 on fd=5
[2016-10-16 05:45:33] 5< * OK [CAPABILITY st11p00mm-iscream002 15E226 XAPPLEPUSHSERVICE IMAP4 IMAP4rev1 SASL-IR AUTH=ATOKEN AUTH=PLAIN] iSCREAM ready to rumble (15E226-247b1a5791fe:20148) st11p00mm-iscream002 [31:479:03:45:32:8A]
[2016-10-16 05:45:33] imap_authenticate: Using any available method.
[2016-10-16 05:45:33] SASL local ip: 192.168.178.107;56602, remote ip:17.172.34.52;993
[2016-10-16 05:45:33] External SSF: 128
[2016-10-16 05:45:33] External authentication name: maltekiefer
[2016-10-16 05:45:33] mutt_sasl_cb_authname: getting authname for imap.mail.me.com:993
[2016-10-16 05:45:33] mutt_sasl_cb_authname: getting user for imap.mail.me.com:993
[2016-10-16 05:45:33] mutt_sasl_cb_pass: getting password for maltekiefer@imap.mail.me.com:993
[2016-10-16 05:45:33] Authentifiziere (PLAIN)...
[2016-10-16 05:45:33] 5> a0000 AUTHENTICATE PLAIN bWFsdGVraWVmZXIAbWFsdGVraWVmZXIAO2JyUTZneWFD
[2016-10-16 05:45:34] 5< a0000 OK [CAPABILITY XAPPLEPUSHSERVICE IMAP4 IMAP4rev1 ACL RIGHTS=tekx QUOTA LITERAL+ NAMESPACE UIDPLUS CHILDREN BINARY UNSELECT SORT CATENATE URLAUTH LANGUAGE ESEARCH ESORT THREAD=ORDEREDSUBJECT THREAD=REFERENCES CONDSTORE ENABLE QRESYNC CONTEXT=SEARCH CONTEXT=SORT WITHIN SASL-IR SEARCHRES METADATA ID XSENDER X-SUN-SORT ANNOTATE-EXPERIMENT-1 X-UNAUTHENTICATE X-SUN-IMAP XUM1 IDLE] User maltekiefer logged in
[2016-10-16 05:45:34] Communication encrypted at 128 bits
[2016-10-16 05:45:34] 5> a0001 CAPABILITY
[2016-10-16 05:45:34] 5< * CAPABILITY XAPPLEPUSHSERVICE IMAP4 IMAP4rev1 ACL RIGHTS=tekx QUOTA LITERAL+ NAMESPACE UIDPLUS CHILDREN BINARY UNSELECT SORT CATENATE URLAUTH LANGUAGE ESEARCH ESORT THREAD=ORDEREDSUBJECT THREAD=REFERENCES CONDSTORE ENABLE QRESYNC CONTEXT=SEARCH CONTEXT=SORT WITHIN SASL-IR SEARCHRES METADATA ID XSENDER X-SUN-SORT ANNOTATE-EXPERIMENT-1 X-UNAUTHENTICATE X-SUN-IMAP XUM1 IDLE
[2016-10-16 05:45:34] 5< a0001 OK Completed
[2016-10-16 05:45:34] 5> a0002 ENABLE UTF8=ACCEPT
[2016-10-16 05:45:35] 5< * ENABLED
[2016-10-16 05:45:35] Handling ENABLED
[2016-10-16 05:45:35] 5< a0002 OK Completed
[2016-10-16 05:45:35] 5> a0003 LIST "" ""
[2016-10-16 05:45:35] 5< * LIST (\Noselect) "/" ""
[2016-10-16 05:45:35] 5< a0003 OK Completed
[2016-10-16 05:45:35] 5> a0004 LSUB "" "*"
[2016-10-16 05:45:35] 5< * LSUB (\NoInferiors) "/" INBOX
[2016-10-16 05:45:35] 5< * LSUB (\HasNoChildren) "/" Drafts
[2016-10-16 05:45:35] 5< * LSUB (\HasNoChildren) "/" Junk
[2016-10-16 05:45:35] 5< * LSUB (\HasNoChildren) "/" Notes
[2016-10-16 05:45:35] 5< * LSUB (\HasNoChildren) "/" Queue
[2016-10-16 05:45:35] 5< * LSUB (\HasNoChildren) "/" Sent
[2016-10-16 05:45:35] 5< * LSUB (\HasChildren) "/" Trash
[2016-10-16 05:45:35] 5< * LSUB () "/" Trash/Privat
[2016-10-16 05:45:35] 5< * LSUB () "/" Trash/Software
[2016-10-16 05:45:35] 5< a0004 OK Completed
[2016-10-16 05:45:35] 5> a0005 STATUS "Drafts" (MESSAGES)
[2016-10-16 05:45:35] 5< * STATUS Drafts (MESSAGES 0)
[2016-10-16 05:45:35] 5< a0005 OK Completed
[2016-10-16 05:45:35] Mailbox unverändert.
[2016-10-16 05:45:36] Lese imaps://maltekiefer@imap.mail.me.com:993/INBOX...
[2016-10-16 05:45:36] Wähle INBOX aus...
[2016-10-16 05:45:36] 5> a0006 MYRIGHTS "INBOX"
[2016-10-16 05:45:37] 5< * MYRIGHTS INBOX lrstwiepkxancd
[2016-10-16 05:45:37] Handling MYRIGHTS
[2016-10-16 05:45:37] Unknown right: n
[2016-10-16 05:45:37] 5< a0006 OK Completed
[2016-10-16 05:45:37] 5> a0007 STATUS "Drafts" (MESSAGES)
[2016-10-16 05:45:37] 5< * STATUS Drafts (MESSAGES 0)
[2016-10-16 05:45:37] 5< a0007 OK Completed
[2016-10-16 05:45:37] 5> a0008 SELECT "INBOX"
[2016-10-16 05:45:37] 5< * FLAGS (\Answered \Flagged \Draft \Deleted \Seen NonJunk $NotJunk $Junk &any-ventura webseite Junk $Forwarded NotJunk JunkRecorded $MDNSent)
[2016-10-16 05:45:37] 5< * OK [PERMANENTFLAGS (\Answered \Flagged \Draft \Deleted \Seen NonJunk $NotJunk $Junk &any-ventura webseite Junk $Forwarded NotJunk JunkRecorded $MDNSent \*)]  
[2016-10-16 05:45:37] 5< * 3 EXISTS
[2016-10-16 05:45:37] Handling EXISTS
[2016-10-16 05:45:37] cmd_handle_untagged: New mail in INBOX - 3 messages total.
[2016-10-16 05:45:37] 5< * 0 RECENT
[2016-10-16 05:45:37] 5< * OK [UIDVALIDITY 1289648849]  
[2016-10-16 05:45:37] 5< * OK [UIDNEXT 18887]  
[2016-10-16 05:45:37] 5< a0008 OK [READ-WRITE] Completed
[2016-10-16 05:45:37] 5> a0009 UID FETCH 1:18886 (UID FLAGS)
[2016-10-16 05:45:37] 5< * 1 FETCH (FLAGS (\Answered \Seen) UID 18862)
[2016-10-16 05:45:37] 5< * 2 FETCH (FLAGS (\Answered \Seen) UID 18868)
[2016-10-16 05:45:37] 5< * 3 FETCH (FLAGS (\Seen) UID 18869)
[2016-10-16 05:45:37] 5< a0009 OK Completed
[2016-10-16 05:45:37] imap_open_mailbox: msgcount is 3
[2016-10-16 05:45:37] Sortiere Mailbox...
[2016-10-16 05:45:37] Schlage imap.mailbox.org nach...
[2016-10-16 05:45:37] Verbinde zu imap.mailbox.org...
[2016-10-16 05:45:37] SSL/TLS Verbindung unter Verwendung von TLS1.2 (DHE-RSA/AES-256-GCM/AEAD)
[2016-10-16 05:45:38] Connected to imap.mailbox.org:993 on fd=6
[2016-10-16 05:45:38] 6< * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE ACL UIDPLUS AUTH=PLAIN AUTH=LOGIN] director-01.heinlein-hosting.de: Dovecot ready. Master.
[2016-10-16 05:45:38] imap_authenticate: Using any available method.
[2016-10-16 05:45:38] SASL local ip: 192.168.178.107;49230, remote ip:80.241.60.199;993
[2016-10-16 05:45:38] External SSF: 256
[2016-10-16 05:45:38] mutt_sasl_cb_authname: getting authname for imap.mailbox.org:993
[2016-10-16 05:45:38] mutt_sasl_cb_authname: getting user for imap.mailbox.org:993
[2016-10-16 05:45:38] mutt_sasl_cb_pass: getting password for maltekiefer@imap.mailbox.org:993
[2016-10-16 05:45:38] Authentifiziere (PLAIN)...
[2016-10-16 05:45:38] 6> a0000 AUTHENTICATE PLAIN bWFsdGVraWVmZXIAbWFsdGVraWVmZXIAO2JyUTZneWFD
[2016-10-16 05:45:40] 6< a0000 NO [AUTHENTICATIONFAILED] Authentication failed.
[2016-10-16 05:45:40] imap_auth_sasl: IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE ACL UIDPLUS AUTH=PLAIN AUTH=LOGIN failed
[2016-10-16 05:45:40] Anmeldung...
[2016-10-16 05:45:40] Sending LOGIN command for maltekiefer...

Maybe you have a tip what I do wrong?

Thanks

Offline

#2 2016-10-16 16:53:16

seth
Member
Registered: 2012-09-03
Posts: 51,017

Re: Mutt multiple Accounts

What do you account files look like?

Is there a trailing

account-hook $folder "set imap_user=<login> imap_pass=<password>"

(with correctly set $folder being the imap address of your account)

Offline

#3 2016-12-08 16:57:11

triumvir
Member
Registered: 2016-12-08
Posts: 1

Re: Mutt multiple Accounts

Sorry if this is considered a necro, but I thought I'd post it here since it took me a while to figure out why I couldn't login.
In case you still haven't fixed it, I've gotten the same error since I had activated the two factor authentification. You'll have to disable it since mutt can't handle the extra authentication.

Offline

Board footer

Powered by FluxBB