Re: multiple gmail accounts
Hello Dale,
On Tuesday, May 6, 2008 at 13:06:07 -0400, Dale Harris wrote:
> I have multiple gmail accounts that I would like to access from the
> same mutt process. So I'm using account-hook and folder-hook
Fine! If "rodmur" is your main gmail account, "second" and "third"
are others, then you can do something like:
| mailboxes imap://imap.med.cornell.edu/ # default cornell
account rodmur
| # mailboxes imap://rodmur@xxxxxxxxxxxxxxxxxxxx/
| mailboxes imaps://imap.gmail.com/ # default gmail account
rodmur
| # mailboxes imaps://rodmur@xxxxxxxxx@imap.gmail.com/
| mailboxes imaps://second@xxxxxxxxx@imap.gmail.com/
| mailboxes imaps://third@xxxxxxxxx@imap.gmail.com/
|
| account-hook . "unset imap_user imap_pass"
| account-hook ^imap://(rodmur@)?imap\\.med\\.cornell\\.edu/ \
| "set imap_user=rodmur imap_pass=<pass0>"
| account-hook ^imaps://(rodmur@gmail\\.com@)?imap\\.gmail\\.com/ \
| "set imap_user=rodmur@xxxxxxxxx imap_pass=<pass1>"
| account-hook ^imaps://second@gmail\\.com@imap\\.gmail\\.com/ \
| "set imap_user=second@xxxxxxxxx imap_pass=<pass2>"
| account-hook ^imaps://third@gmail\\.com@imap\\.gmail\\.com/ \
| "set imap_user=third@xxxxxxxxx imap_pass=<pass3>"
|
| source ~/.mutt/accounts.d/<defaultfile>
| folder-hook . "source ~/.mutt/accounts.d/<defaultfile>"
| folder-hook imap://(rodmur@)?imap\\.med\\.cornell\\.edu \
| "source ~/.mutt/accounts.d/<file0>"
| folder-hook imaps://(rodmur@gmail\\.com@)?imap\\.gmail\\.com \
| "source ~/.mutt/accounts.d/<file1>"
| folder-hook imaps://second@gmail\\.com@imap\\.gmail\\.com \
| "source ~/.mutt/accounts.d/<file2>"
| folder-hook imaps://third@gmail\\.com@imap\\.gmail\\.com \
| "source ~/.mutt/accounts.d/<file3>"
This way you can designate one default account per server, and have
to put account names in URLs only for other non-default accounts.
Bye! Alain.
--
Mutt muttrc tip to send mails in best adapted first necessary and sufficient
charset (version for Western Latin-1/Latin-9/CP-850/CP-1252 terminal users):
set send_charset="us-ascii:iso-8859-1:iso-8859-15:windows-1252:utf-8"