Re: Mutt & 2 accounts
On Sun, Nov 27, 2005 at 06:30:57PM +0200, Vladimir Zolotykh wrote:
> Thank you for helping me get Mutt working.
> Could you please give me some clue how to set up Mutt working with two
> differenct accounts on the same IMAP server? Entering full server
> name, user name, and password each time I want to change account is
> I've tried
> account-hook imaps://user1@server ....
> account-hook imaps://user2@server ....
account-hook will only execute some mutt code when an account is used,
which is probably not quite what you think. What you want first is to
define the two accounts in .muttrc like so:
mailboxes imaps://user1[:pass1]@server imaps://user2[:pass2]@server [/var/mail/user]
Then you can run 'mutt -y' to choose your mailbox. I don't know whether
it is possible to bring up this menu from an already-started mutt. You
can also run 'mutt -f imaps://user@server' to open the appropriate
folder immediately on startup. I would recommend a shell alias for each
account, or two icons if you're into that GUI nonsense. Alternatively
you might want to look into fetchmail & procmail to unify/sort your mail
automatically in local folders.
Only if you have to change some mutt settings before switching accounts
do you need account-hook. Since both accounts are on the same server,
it is unlikely you will have to do this to get mutt merely *working*.
You may want to set save_name to save your outgoing messages on the
appropriate IMAP server.