<<< Date Index >>>     <<< Thread Index >>>

Re: From variable and multiple account



* Alberto Rizzi <greenant@xxxxxxxxxxx> [20081116 20:53]:
> I'm not new to mutt but only now I have time to try to solve some
> problems with mutt, problems that I have since I use mutt.
> This is the first of a long series of email.
> 
> I have four imap accounts (personal, 2 university, mailing list) and I
> want to use four different "Form:" header depending on the folder I am
> in. In thunderbird I can configure a different From: addresse for each
> account and then when I compose an email, it choose the correct sender
> address based on the selected folder.
> 
> How can I do this with mutt?
> account-hook get executed only the first time I open a folder on that
> account, so if I open the inbox on personal account, then inbox on uni
> account and then again inbox on personal account, this time the account
> hook doesn't get run and the from variable has the value from the uni
> account.
> 
> Maybe I can use a folder-hook but how can I create the correct regexp?
> How?
> 
> I use mutt 1.5.18, reverse_name=no, realname should be always the same
> for each account, I want to change only the from variable.

The way I have done it, because I use maildir's (through offlineimap)
under ~/Mail, my folder-hook's are simply

folder-hook <foldername1> set from="me@account1"
folder-hook <foldername2> set from="me@account2"
folder-hook <foldername3> set from="me@account3"

I have not tried this with GMail account or similar yet, but if I get
a chance to, I'll let you know what I find.

-- 
Anders Karlsson <anders@xxxxxxxxxxxxxx>
All-Round Linux Tinkerer & RHCE