procmail
[Top] [All Lists]

RE: TO_ is not expanded

2001-08-14 08:19:50

:0:
* 
^(TO_|From:).*(announce|news|dot-stories|editors(_at_)eff\(_dot_)org|kcdistrib).*
lists/news

Might it be illegal to embed TO_ inside an expression like that? If
so, why, and how can I circumvent it?

I think the ^TO_ needs to be all together and should *not* have the .* after
it

I would just make two recipes, one with the ^TO_ and one with the From:....
put the lists in a variable so you only have to maintain one copy

NEWSLISTS="(announce|news|dot-stories|editors(_at_)eff\(_dot_)org|kcdistrib)"

:0:
* $ ^From:.*$NEWSLISTS
lists/news

:0:
* $ ^TO_$NEWSLISTS
lists/news


n.b.: If you don't need all the hairyness of ^TO_ (personally I usually just
want To and Cc but that's just me) you could also do this:

:0:
* 
^(To|Cc|From):.*(announce|news|dot-stories|editors(_at_)eff\(_dot_)org|kcdistrib)
lists/news

(Note that I did remove the .* at the end of the line, it is not necessary
and I think it can even cause problems)

BTW you realize that "announce" and "kcdistrib" and "news" and "dot-stories"
will match any list that has those in them, and only editors(_at_)eff(_dot_)org 
is
specific.  This may be what you want, but I'm on a lot of different lists
that use "announce" in the To/From and wouldn't want the behavior you have
here, personally.


TjL

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>