Multiple Accounts / Same IMAP Server

2012-06-01 Thread Malte Detlefsen
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  'source 
~/.mutt/account.whllnd!'
macro index  'source 
~/.mutt/account.drsp!'

account-hook imaps://imap.gmx.com 'set imap_user = "whl...@gmx.de" imap_pass = 
""'
#account-hook imaps://imap.gmx.com 'set imap_user = "d...@gmx.de" imap_pass = 
""'

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"

Thanks in advance! Greetings, Malte



Re: Multiple Accounts / Same IMAP Server

2012-06-01 Thread Malte Detlefsen
The #'s are typos! I forgot to clear them out.


Re: Multiple Accounts / Same IMAP Server

2012-06-01 Thread Paul Tansom
** Malte Detlefsen  [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  'source 
> ~/.mutt/account.whllnd!'
> macro index  'source 
> ~/.mutt/account.drsp!'
> 
> account-hook imaps://imap.gmx.com 'set imap_user = "whl...@gmx.de" imap_pass 
> = ""'
> #account-hook imaps://imap.gmx.com 'set imap_user = "d...@gmx.de" imap_pass = 
> ""'
> 
> 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  'source 
~/.mutt/account.whllnd!'
macro index  'source 
~/.mutt/account.drsp!'

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

account-hook imaps://imap.gmx.com 'set imap_user = "d...@gmx.de" imap_pass = 
""'
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