On Fri 18, Dec'09 at 7:10 PM +0000, chombee wrote:
That means that for every variable I set in a muttrc.accountX file (and I
have several of these files) I have to include a default case in the master
muttrc file, or I'll get unexpected behaviour. This is a recipe for
disaster, at some point I will edit a muttrc.accountX file and forget to
add a default case. There must be a better way?
I have three different 'profiles' setup. Mind you, they just change From
and a couple of other things - I'm not actually using different IMAP
accounts and SMTP accounts. I handle the IMAP problem with
offlineimap/getmail and the SMTP issue can be sorted out with msmtp if you
wish.
I have a different profile file for each profile, with something similar to
the following in them:
---------
set realname="Tim Gray"
set from="[email protected]"
set use_from=yes
set signature=~/.mutt/signatures/sig1
set use_envelope_from=yes
color status white magenta
-------
The last line in the profile file changes the color of the status bar so I
know which profile I'm using.
I call that profile with a combination of reply-hooks, folder-hooks, and
send(2)-hooks. Like so:
reply-hook '~C [email protected]' "source ~/.mutt/profiles/profile1"
folder-hook =work.* "source ~/.mutt/profiles/profile1"
send2-hook '~t address.com' "source ~/.mutt/profiles/profile1"
etc.
I also have macros set to switch between the profiles if I choose:
macro index,pager,compose \e3 ":source ~/.mutt/profiles/profile1\n"
Maybe I didn't totally answer the question you actually asked, but this
seems to work for me. All of my settings are consolidated, and only a few
things are changed when I switch profiles.
Tim