On 2000.12.07, in <[EMAIL PROTECTED]>,
"Mark Triggs" <[EMAIL PROTECTED]> wrote:
> Hey all,
>
> When I write a message which has multiple addresses in the To: header,
> the force_name option (set in my .muttrc) causes the mail to be automatically
> saved to a file as the first recipient in the list. For example, if I send a
> mail to jimmy, bill and john, the mail is saved to =jimmy.
>
> What I'm trying to do, is setup a send-hook which causes any messages
> addressed to multiple recipients to be saved to a specified file..
Try something like this:
fcc-save-hook "~L jimmy ~L bill ~L john ^~L (jimmy\\|bill\\|john)" +everybody
The first three terms ensure that Jimmy, Bill, and John all are
present. The fourth term guarantees that no one except Jimmy, Bill,
and John are present.
That should work if you're Jimmy, Bill, or John. Extending it for more
people is obvious, but probably what you really want is to use the ~p
or ~P operators to permit any $alternates identity to be used. That's
more tricky, if it's even possible. The right thing probably looks
sort of like this:
fcc-save-hook "~L jimmy ~L bill ~L john (~p \| ~P) ^(~L (jimmy\\|bill\\|john) \| ~p \|
~P)" +everybody
That looks to me as if it should work, but my tests show that it
doesn't. Any ideas what's wrong with it? There's some problem with
the exclusivity modifier's ('^') affecting all terms in the parenthesis
that follows it, but I think pattern.c indicates that this should
work (in principle).
On the other hand, you might not even want the exclusivity part - in
that case, just
fcc-save-hook "~L jimmy ~L bill ~L john (~p \| ~P)" +everybody
should do.
Oh, I changed it to fcc-save-hook, but you're obviously welcome to use
fcc-hook if that's really what you want. :)
--
-D. [EMAIL PROTECTED] NSIT University of Chicago