** Malte Detlefsen <malte.detlef...@gmx.de> [2012-06-01 21:35]:
> Hello!
> 
> Still got a problem with my multiple account setup, although I narrowed
> it down to the following:
> 
> When loading mutt, mutt shows the INBOX of the account, which in the
> .muttrc is the last one. So I figured it's got to do something with mutt
> not being able to distinguish the accounts, which share the same IMAP
> server. Someone in the irc channel then suggested that I, while working
> with hooks, should better use something like user[at]server instead of
> server. I tried that one, but couldn't get it to work either. Since the
> DebugConfig points out the possibility of misunderstanding hooks, I
> could understand a hooks related problem in my case. But to be honest: I
> don't know, what I exactly have to change, since all my tries ended in
> errors. I hope some of you might know, what to do! Here's my
> .muttrc the way I thought it should work:
> 
> 
> folder-hook imaps://imap.gmx.com 'source ~/.mutt/account.whllnd'
> #folder-hook imaps://imap.gmx.com 'source ~/.mutt/account.drsp'
> 
> source ~/.mutt/account.whllnd
> 
> macro index <f2> '<sync-mailbox><enter-command>source 
> ~/.mutt/account.whllnd<enter><change-folder>!<enter>'
> macro index <f3> '<sync-mailbox><enter-command>source 
> ~/.mutt/account.drsp<enter><change-folder>!<enter>'
> 
> account-hook imaps://imap.gmx.com 'set imap_user = "whl...@gmx.de" imap_pass 
> = "xxxx"'
> #account-hook imaps://imap.gmx.com 'set imap_user = "d...@gmx.de" imap_pass = 
> "xxxx"'
> 
> set timeout = 30
> set editor = "vim"
> set check_new = yes
> set charset = "utf-8"
> set locale = `echo "${LC_ALL: -${LC_TIME: -${LANG}}}"`
> set send_charset = "us-ascii: iso-8859-15: utf-8"
> set file_charset = "us-ascii: iso-8859-15: utf-8"
> set sendmail = "/usr/bin/msmtp"
** end quote [Malte Detlefsen]

I do this with quite a few accounts on the same server. I have my set commands
at the top of the .muttrc file, not sure whether this would impact anything.
The main difference I have is separate files for each account-hook, in which I
have my folder-hook and mailbox, etc.. I also keep everything in a directory
called .muttrc (so no need for the . on indifidual files and it keeps things
together). So how about:


muttrc:

set timeout = 30
set editor = "vim"
set check_new = yes
set charset = "utf-8"
set locale = `echo "${LC_ALL: -${LC_TIME: -${LANG}}}"`
set send_charset = "us-ascii: iso-8859-15: utf-8"
set file_charset = "us-ascii: iso-8859-15: utf-8"
set sendmail = "/usr/bin/msmtp"

macro index <f2> '<sync-mailbox><enter-command>source 
~/.mutt/account.whllnd<enter><change-folder>!<enter>'
macro index <f3> '<sync-mailbox><enter-command>source 
~/.mutt/account.drsp<enter><change-folder>!<enter>'

account-hook imaps://imap.gmx.com 'set imap_user = "whl...@gmx.de" imap_pass = 
"xxxx"'
source ~/.mutt/account.whllnd

account-hook imaps://imap.gmx.com 'set imap_user = "d...@gmx.de" imap_pass = 
"xxxx"'
source ~/.mutt/account.drsp


then move the rest into the source files with:


account.whllnd

folder-hook imaps://imap.gmx.com


account.drsp

folder-hook imaps://imap.gmx.com


I also have a batch of set statements to sort out outbound email addresses,
etc. when I change folders.

As an aside, you don't need to use msmtp as Mutt now supports direct SMTP 
traffic using:

set smtp_url="smtp://smtp.home.aptanet.com:25/"
set smtp_pass=""

replacing with your SMTP server, and password, of course :)

-- 
Paul Tansom | Aptanet Ltd. | http://www.aptanet.com/ | 023 9238 0001
Registered in England  |  Company No: 4905028  |  Registered Office:
Crawford House, Hambledon Road, Denmead, Waterlooville, Hants, PO7 6NU

Reply via email to