On Wed, Mar 17, 2010 at 12:01 PM, peng shao <shallp...@gmail.com> wrote:
> Hi. I was trying to set up multiple accounts with pop3+imap combined
> but with no success, so I have to seek help here. Maybe we can discuss
> a simple case at first. Asssume  I have two IMAP accounts from gmail
> and yahoo
> Then I may write the first few lines in my muttrc like:
>
> mailboxes imaps://imap.gmail.com/INBOX
> mailboxes imaps://imap.yahoo.com/INBOX
> account-hook . 'unset imap_pass imap_user '
> account-hook imaps://imap.gmail.com/ 'set imap_user="my_gmail_name"
> imap_pass="abc" '
> account-hook imaps://imap.yahoo.com/ 'set imap_user="my_yahoo_name"
> imap_pass="abc" '
>
> then I am stuck because I don't know where I should put the spoolfile
> variable. The reason why I care this variable very much is because I
> want by pressing c-->tab to be able to view all folders under the
> spool such as the sent/drafts .. I tried put it in both account-hook
> or folder-hook and to load mutt by mutt -y but this had no effect. If
> I simply put
>
> set spoolfile=imaps://imap.gmail.com/
> set spoolfile=imaps://imap.yahoo.com/
>
> in muttrc, I then use yahoo as the default spool. I can enter the sent
> folder of yahoo, but if I enter google mailboxes the spool is still
> yahoo.
>
> Basically speaking I have already built a basic two-account muttrc. I
> just don't how know to set the spoolfile correctly to access sent
> folder in both these two accounts.(to add these two folders into
> mailboxese variable is not desired for me )
>
> Thank you
>
> Peng
>

After many tests, I finally realize this is actually a problem of
"current directory" rather than the folder variable, It looks like
after I change folder the "current directory" does NOT change. I guess
this is the supposed way. So I added the following line

folder-hook 'imaps://imap.gmail.com' "push
<change-folder>?<change-dir><kill-line>imaps://imap.gmail.com<enter><exit>"

into muttrc. And it works. Correspondingly I have to set the current
directory for every mailboxes I defined.

Thanks

Peng

Reply via email to