On Jan 12, 2012 at 02:02 PM -0800, Tracy Reed wrote:
I've been a mutt user for well over 10 years but more and more I am running
into limitations which I am having trouble solving.
I don't have exactly the same setup, but I do select a 'profile'
depending on what folder I'm in. I set up each profile in it's own
file, like so:
set realname="Tim Gray"
set from="tg...@address.com"
set use_from=yes
set signature=~/.mutt/signatures/signature1
set use_envelope_from=yes
color status black magenta
The other profiles look similar, just with different signature files or
froms. Then, set a hook like so (doesn't have to be a folder-hook, it
could be a reply or send hook):
folder-hook work "source ~/.mutt/profiles/work_profile"
The key for me was to have this at the *top* of the other hooks:
folder-hook .* "source ~/.mutt/profiles/default_profile"
Basically, for *every* folder you enter, a profile needs to be sourced,
otherwise you'll be stuck with the leftovers of some previous profile.
The above hook sources the default profile for every folder that doesn't
have a hook defined.
To be honest, your setup looks pretty close to mine. I do notice I have
'use_from' and 'use_envelope_from' set for some reason, but I don't
remember why. It might be to deal with the kind of issues you are
having. I seem to remember some trick like that because I originally
did have some issues with this kind of setup. I'm also really only
dealing with two or three profiles. If you are using a lot, you might
want to have different muttrc's and just run separate instances of mutt.
Maybe in screen.
As to the other filtering question, imapfilter might be helpful:
https://github.com/lefcha/imapfilter
Personally, I find it easier to forward *all* my email to one account and
sync that with offlineimap or getmail.