Hello everyone,

I am trying to set up 3 accounts for use with mutt, two of them being gmail. 
But I cannot make it to work properly. I can only use one gmail account and the 
other non gmail account. I have the following lines in my muttrc:


# Account 3: Gmail
source ~/.mutt/gmail.muttrc
# 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 $folder 'source ~/.mutt/gmail.muttrc'

# Account 2: Inventati
source ~/.mutt/inventati.muttrc
# 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 $folder 'source ~/.mutt/inventati.muttrc'

# Account 1: Aurabindo.in
source ~/.mutt/aurabindo.muttrc
# 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 $folder 'source ~/.mutt/aurabindo.muttrc'

## Shortcuts
macro index,pager <f2> '<sync-mailbox><enter-command>source 
~/.mutt/gmail.muttrc<enter><change-folder>!<enter>'
macro index,pager <f3> '<sync-mailbox><enter-command>source 
~/.mutt/inventati.muttrc<enter><change-folder>!<enter>'
macro index,pager <f4> '<sync-mailbox><enter-command>source 
~/.mutt/aurabindo.muttrc<enter><change-folder>!<enter>'

The problem is, when I press F2, mutt tries switching the mailboxes, but I only 
see the Account 1.

The 3 muttrc files specific to these accounts are:

Account1:

# Change the following six lines to match your Gmail account details
set imap_user = "[email protected]"
set imap_pass = $my_passwd_aurabindo
set smtp_url = "smtp://[email protected]@smtp.gmail.com:587/"
set smtp_pass = $my_passwd_aurabindo
set from = "[email protected]"
set hostname = "aurabindo.in"
set realname = "Aurabindo J"

# Change the following line to a different editor you prefer.
set editor = "gvim -f"

# Basic config, you can leave this as is
set folder = "imaps://imap.gmail.com:993"
set spoolfile = "+INBOX"
set postponed = "+[Gmail]/Drafts"
set record = "+[Gmail]/Sent Mail"

## Hook -- IMPORTANT!
account-hook $folder "set [email protected] 
imap_pass=$my_passwd_aurabindo"

Account2 :

# Change the following six lines to match your Gmail account details
set imap_user = "[email protected]"
set imap_pass = $my_passwd
set smtp_url = "smtp://[email protected]:587/"
set smtp_pass = $my_passwd
set from = "[email protected]"
set hostname = "gmail.com"
set realname = "Jay Aurabind"

# Change the following line to a different editor you prefer.
set editor = "gvim -f"

# Basic config, you can leave this as is
set folder = "imaps://imap.gmail.com:993"
set spoolfile = "+INBOX"
set postponed = "+[Gmail]/Drafts"
set record = "+[Gmail]/Sent Mail"

## Hook -- IMPORTANT!
account-hook $folder "set [email protected] imap_pass=$my_passwd"

And finally the third non gmail account:

# Change the following six lines to match your Gmail account details
set imap_user = "[email protected]"
set imap_pass = $my_passwd
set smtp_url = "smtps://[email protected]@smtp.autistici.org:465/"
set smtp_pass = $my_passwd
set from = "[email protected]"
set hostname = "inventati.org"
set realname = "Jay Aurabind"

# Change the following line to a different editor you prefer.
set editor = "gvim -f"

# Basic config, you can leave this as is
set folder = "imaps://mail.autistici.org:993"
set spoolfile = "+INBOX"
set postponed = "+[Inventati]/Drafts"
set record = "+[Inventati]/Sent Mail"

## Hook -- IMPORTANT!
account-hook $folder "set [email protected] imap_pass=$my_passwd"

My full muttrc is: http://pastebin.com/QJTuNHZD


--
Thanks and Regards,
Aurabindo J



Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to