<<< Date Index >>>     <<< Thread Index >>>

multiple IMAP accounts



Hi,

I have some trouble using mutt with multiple IMAP accounts.
I use the following accounts (servers and account names masked):

imaps://user1@imap1/
imap://user2@imap2/
imap://user3@imap2/

now I'd like mutt to correctly do the following things when I switch
accounts using "c" + "tab" ( + "tab" )

1) use correct imap_user / passwd
2) use correct from / reply-to headers
3) use correct IMAP namespace / $folder
4) use correct folder hooks, but I guess this depends on 3)

Here's my curret setup, for which points 1) and 2) seem to work. However, 3)
and 4) fail:
--
account-hook . 'unset imap_user; unset imap_pass; unset tunnel; unset from; 
unmy_hdr From; unmy_hdr Reply-to; unset folder'
account-hook "user1@imap1" 'source ~/.mutt/muttrc.imap1'
account-hook "user2@imap2" 'source ~/.mutt/muttrc.imap2a'
account-hook "user3@imap2" 'source ~/.mutt/muttrc.imap2b'
--

here's one of the muttrc.* files that's muttrc.imap1:
--
set imap_user=user1
set folder=imaps://user1@imap1/
set from=user1@domain1
my_hdr From: user1@domain1
my_hdr Reply-to: user1@domain1
--

Apparently it's the whole namespace thing which doesn't get changed, even if
I put "set folder" directive. I also tried using "set imap_home_namespace
imaps://user1@imap1/" but it seems only to set the subdirectory of the imap
server and thus does nothing.

Moreover, if I use the directive "mailboxes imaps://user1@imap1/ 
imap://user2@imap2/ imap://user3@imap2/", things get even worse :-(

any idea on what should be done using multiple IMAP accounts?

I've been fiddling around for days, looking in man pages and all and
browsing dejanews but found nothing...