Re: Multiple accounts at same privider

2010-07-01 Thread ilf

On 07-01 00:59, J. Prendick wrote:
macro index f1 source ~/.mutt/isp_1.cnf 
macro index f2 source ~/.mutt/isp_2.cnf
This is far too obvious ;) 


Since there seems to be some interest, I'll gladly share my setup. This:

- switches to this account with Alt+3
- keeps account-rcs small by adding another generic one
- adjusts $compose_format and $status_format to display the current 
  account. Others ITT do this with colors.


Feedback is of coure welcome.

#
# snip from ~/.mutt/muttrc
#

macro generic \e3 :source ~/.mutt/accounts/i...@zeromail.orgenter 
i...@zeromail.org

#
# ~/.mutt/accounts/i...@zeromail.org
#

set realname=ilf
set from=i...@zeromail.org
set hostname=zeromail.org
set pgp_sign_as=0x87C0AECC

source ~/.mutt/accounts/generic.rc

#
# ~/.mutt/accounts/generic.rc
#

# send
set sendmail=/usr/bin/msmtp --account $from

# compose
set signature=~/.mutt/sigs/${from}
my_hdr OpenPGP: id=${pgp_sign_as}\; preference=signencrypt
my_hdr Cc:

# format
set compose_format= $from | size: %l | attachments: %a 
set status_format= %r | %f | mails: %?M?%M/?%m%?n? new: %n?%?o? old: %o?%?d? 
deleted: %d?%?F? flagged: %F?%?t? tagged: %t?%?p? postponed: %%p?%?b? incoming: %b?%?l? | 
${from}?%* %P 

# override these two from /etc/Muttrc.d/gpg.rc
# always also encrypt to self
set pgp_encrypt_only_command=/usr/lib/mutt/pgpewrap gpg --batch --quiet 
--no-verbose --output - --encrypt --textmode --armor --always-trust  --encrypt-to 
$pgp_sign_as -- -r %r -- %f
set pgp_encrypt_sign_command=/usr/lib/mutt/pgpewrap gpg %?p?--passphrase-fd 0? 
--batch --quiet --no-verbose --textmode --output %- --encrypt --encrypt-to $pgp_sign_as 
--sign %?a?-u %a? --armor %--always-trust -- -r %r -- %f

--
ilf@jabber.berlin.ccc.de

Über 80 Millionen Deutsche benutzen keine Konsole. Klick dich nicht weg!
-- Eine Initiative des Bundesamtes für Tastaturbenutzung


signature.asc
Description: Digital signature


Re: Multiple accounts at same privider

2010-06-30 Thread lee
On Wed, Jun 30, 2010 at 08:57:02AM +0200, J. Prendick wrote:
 
 If now a equals b we do have a problem. I could for example change the
 macro-lines to
 
   macro index f1 change-folderimaps://user1:passwo...@a.com
   macro index f2 change-folderimaps://user2:passwo...@a.com
 
 which enables me to switch between the accounts, but e.g. from=,
 pgp_sign_as=, ...  are not beeing set correctly.
 
 Does anyone have any idea how to solve that problem?

Looks like a simple solution might be to run two instances of mutt,
each with its own configuration file?


Re: Multiple accounts at same privider

2010-06-30 Thread Joost Kremers
On Wed, Jun 30, 2010 at 01:33:16PM +0200, lee wrote:
 On Wed, Jun 30, 2010 at 08:57:02AM +0200, J. Prendick wrote:
  
  If now a equals b we do have a problem. I could for example change the
  macro-lines to
  
  macro index f1 change-folderimaps://user1:passwo...@a.com
  macro index f2 change-folderimaps://user2:passwo...@a.com
  
  which enables me to switch between the accounts, but e.g. from=,
  pgp_sign_as=, ...  are not beeing set correctly.
  
  Does anyone have any idea how to solve that problem?
 
 Looks like a simple solution might be to run two instances of mutt,
 each with its own configuration file?

that's my solution to all multiple-account related problems, so i highly
recommend it. ;-) just run two (or more) instances of mutt within a screen
session. i have a separate .muttrc-* for each account and a general .muttrc-gen
with settings that all accounts share. my .screenrc contains the following
lines:

screen -t Local mutt -F .muttrc-local
screen -t Fastmail mutt -F .muttrc-fm
screen -t Uni Göttingen mutt -F .muttrc-gaug
screen -t slrn slrn -n
select 1

now all i have to do is type screen in a terminal to be taken to my inboxes.


-- 
Joost Kremers, PhD
University of Göttingen
Institute for German Philology
Käte-Hamburger-Weg 3
37073 Göttingen, Germany


Re: Multiple accounts at same privider

2010-06-30 Thread J. Prendick
On Mi, 30.Jun 13:33, lee wrote:
 Looks like a simple solution might be to run two instances of mutt,
 each with its own configuration file?

Actually I had this in mind before. However, I'd prefer a solution
using a single configuration file (which I should have mentioned
before). Hopefully that doesn't become to complex...


Best regards,
Prendick


Re: Multiple accounts at same privider

2010-06-30 Thread Paul Tansom
** J. Prendick saftsec...@googlemail.com [2010-06-30 07:55]:
 I'm wondering if it is possible, to manage multiple accounts at the
 same e-mail provider. First let's say I have one account at a.com,
 another at b.com. Then in my .muttrc I have
 
   account-hook 'imaps://a.com' 'set imap_user=... etc.'
   folder-hook 'imaps://a.com' 'set folder=... etc.'
 

I'm doing this, although with my own server not a separate ISP. What I've done 
is put the account information into the account-hook and folder-hook info:

account-hook imaps://p...@domain2.com@imap.domain.com 'set imap_user = 
p...@domain1.com... '
folder-hook imaps://p...@domain2.com@imap.domain.com 'set ... '
account-hook imaps://p...@domain2.com@imap.domain.com 'set imap_user = 
p...@domain2.com... '
folder-hook imaps://p...@domain1.com@imap.domain.com 'set ... '

I use full email addressing as my login details. The only problem is the 
lengthy references when moving between folders or filing mail, but the tab 
completion helps. At the moment I have to type 'imaps:tab' before each (the 
tab only saves typing the '//') then the login name, etc. with tabs to save 
typing.

 and the analogue for b.com. Via
 
   macro index f1 change-folderimaps://imap.a.com
   macro index f2 change-folderimaps://imap.b.com
 
 I can switch between them.

I've not managed to get my head around macros yet, but it is on my list of 
things to do - one day, I've only been using Mutt about 10 years!!

 If now a equals b we do have a problem. I could for example change the
 macro-lines to
 
   macro index f1 change-folderimaps://user1:passwo...@a.com
   macro index f2 change-folderimaps://user2:passwo...@a.com
 
 which enables me to switch between the accounts, but e.g. from=,
 pgp_sign_as=, ...  are not beeing set correctly.
 
 Does anyone have any idea how to solve that problem?
** end quote [J. Prendick]

-- 
Paul Tansom | Aptanet Ltd. | http://www.aptanet.com/ | 023 9238 0001
==
Sponsor me in the Moonlit Memories Walk for Rowans Hospice
A 12 mile walk along Southsea seafront starting midnight 19th June
Visit: http://www.justgiving.com/MoonlitTansom2010
==
Registered in England  |  Company No: 4905028  |  Registered Office:
Crawford House, Hambledon Road, Denmead, Waterlooville, Hants, PO7 6NU


Re: Multiple accounts at same privider

2010-06-30 Thread J. Prendick
On Mi, 30.Jun 15:13, Joost Kremers wrote:

 that's my solution to all multiple-account related problems, so i highly
 recommend it. ;-) just run two (or more) instances of mutt within a screen
 session. i have a separate .muttrc-* for each account and a general 
 .muttrc-gen
 with settings that all accounts share. my .screenrc contains the following
 lines:
 
 screen -t Local mutt -F .muttrc-local
 screen -t Fastmail mutt -F .muttrc-fm
 screen -t Uni Göttingen mutt -F .muttrc-gaug
 screen -t slrn slrn -n
 select 1
 
 now all i have to do is type screen in a terminal to be taken to my inboxes.
 
Ok, you both convinced me ...  I gave it a try, and so far that's the
most comfortable solution. (I think it has actually been mentioned in
this mailing list before).


Best regards,
Prendick


Re: Multiple accounts at same privider

2010-06-30 Thread ilf

On 06-30 08:57, J. Prendick wrote:
If now a equals b we do have a problem. I could for example change the 
macro-lines to
	macro index f1 change-folderimaps://user1:passwo...@a.com 
	macro index f2 change-folderimaps://user2:passwo...@a.com
which enables me to switch between the accounts, but e.g. from=, 
pgp_sign_as=, ...  are not beeing set correctly.

Does anyone have any idea how to solve that problem?


How about this?

macro index f2 
change-folderimaps://user2:passwo...@a.comreturnset 
from=user2returnpgp_sign_as=0xDEADBEEFreturn


--
ilf@jabber.berlin.ccc.de

Über 80 Millionen Deutsche benutzen keine Konsole. Klick dich nicht weg!
-- Eine Initiative des Bundesamtes für Tastaturbenutzung


signature.asc
Description: Digital signature


Re: Multiple accounts at same privider

2010-06-30 Thread Eivind
On Wednesday 30.06.10 08:57 +0200, J. Prendick wrote:
Hi all,

I'm wondering if it is possible, to manage multiple accounts at the
same e-mail provider. First let's say I have one account at a.com,
another at b.com. Then in my .muttrc I have

   account-hook 'imaps://a.com' 'set imap_user=... etc.'
   folder-hook 'imaps://a.com' 'set folder=... etc.'

and the analogue for b.com. Via

   macro index f1 change-folderimaps://imap.a.com
   macro index f2 change-folderimaps://imap.b.com

I can switch between them.

If now a equals b we do have a problem. I could for example change the
macro-lines to

   macro index f1 change-folderimaps://user1:passwo...@a.com
   macro index f2 change-folderimaps://user2:passwo...@a.com

which enables me to switch between the accounts, but e.g. from=,
pgp_sign_as=, ...  are not beeing set correctly.

Does anyone have any idea how to solve that problem?


Best regards,
Prendick

How about

macro index f1 'enter-commandsource ~/.mutt/account1.rcenterrefresh' 
'use account1'
macro index f2 'enter-commandsource ~/.mutt/account2.rcenterrefresh' 
'use account2'

?

I have a generic muttrc containing `source ~/.mutt/accountname.rc'
where all the account spesific settings such as from=, folders= etc.

The `refresh' part is in the macro to refresh the status color which
I change to remind myself which account I'm currently on.

Eivind


Re: Multiple accounts at same privider

2010-06-30 Thread Roger
On Wed, Jun 30, 2010 at 04:15:11PM +0200, J. Prendick wrote:
On Mi, 30.Jun 15:13, Joost Kremers wrote:

 that's my solution to all multiple-account related problems, so i highly
 recommend it. ;-) just run two (or more) instances of mutt within a screen
 session. i have a separate .muttrc-* for each account and a general 
 .muttrc-gen
 with settings that all accounts share. my .screenrc contains the following
 lines:
 
 screen -t Local mutt -F .muttrc-local
 screen -t Fastmail mutt -F .muttrc-fm
 screen -t Uni Göttingen mutt -F .muttrc-gaug
 screen -t slrn slrn -n
 select 1
 
 now all i have to do is type screen in a terminal to be taken to my 
 inboxes.
 
Ok, you both convinced me ...  I gave it a try, and so far that's the
most comfortable solution. (I think it has actually been mentioned in
this mailing list before).

It's kinda my solution as well since I'm a everyday user of GNU Screen for
several plus years...

I use one .mutt-local/muttrc + fetchmail for all my personal email getting
from multiple remote domains which contains folder hooks for changing my
sender address.

And then one .mutt-gmail/muttrc for all my imap accounts on gmail.com -- this
gmail muttrc contains the above f1, f2, ... hooks for switching between the
2 or 3 gmail accounts I have.

In the end, I get no more email from pretty girls then I would likely get with
one email account.

-- 
Roger
http://rogerx.freeshell.org/


Re: Multiple accounts at same privider

2010-06-30 Thread Michelle Konzack
Hello J. Prendick,

Am 2010-06-30 08:57:02, hacktest Du folgendes herunter:
 Does anyone have any idea how to solve that problem?

Yes:
macro index f1 source ~/.mutt/isp_1.cnf
macro index f2 source ~/.mutt/isp_2.cnf

Put the same ISP specific config in both files and change its values.

Thanks, Greetings and nice Day/Evening
Michelle Konzack

-- 
# Debian GNU/Linux Consultant ##
   Development of Intranet and Embedded Systems with Debian GNU/Linux

itsyst...@tdnet France EURL   itsyst...@tdnet UG (limited liability)
Owner Michelle KonzackOwner Michelle Konzack

Apt. 917 (homeoffice)
50, rue de Soultz Kinzigstraße 17
67100 Strasbourg/France   77694 Kehl/Germany
Tel: +33-6-61925193 mobil Tel: +49-177-9351947 mobil
Tel: +33-9-52705884 fix

http://www.itsystems.tamay-dogan.net/  http://www.flexray4linux.org/
http://www.debian.tamay-dogan.net/ http://www.can4linux.org/

Jabber linux4miche...@jabber.ccc.de
ICQ#328449886

Linux-User #280138 with the Linux Counter, http://counter.li.org/


signature.pgp
Description: Digital signature


Re: Multiple accounts at same privider

2010-06-30 Thread J. Prendick
On Thu,  1.Jul 00:24, Michelle Konzack wrote:
 Hello J. Prendick,
 
 Am 2010-06-30 08:57:02, hacktest Du folgendes herunter:
  Does anyone have any idea how to solve that problem?
 
 Yes:
 macro index f1 source ~/.mutt/isp_1.cnf
 macro index f2 source ~/.mutt/isp_2.cnf
 
 Put the same ISP specific config in both files and change its values.
 
 Thanks, Greetings and nice Day/Evening
 Michelle Konzack
 

This is far too obvious ;)
Thanks for all tips similar to the one stated above. Even though I'll
stay with the screen-solution most likely, I'll keep in mind what a
macro is able to do.


Best regards,
Prendick