procmail
[Top] [All Lists]

Re: Sort field of mailing lists

1997-01-03 22:50:00
On Thu, 2 Jan 1997, James V. Di Toro III wrote:
On Thu, 2 Jan 1997, Stan Ryckman wrote:
At 09:49 AM 1/2/97 -0500, Timothy J Luoma wrote:
(missing quotation credit)
So what field does everybody else use?
on a GOOD, well maintained list like the procmail list, I use
^TOprocmail(_at_)Informatik(_dot_)RWTH-Aachen(_dot_)DE

I recently started using

                * ^([A-Za-z]+-*)+:.*procmail.*$ 

this for my mailing lists like procmail. It will pick the word
procmail out of _any_ headerfield that has a colon before the part
we're trying to match. Since procmail puts it's address in a
"Resent-To:" field this regex picks it up.  Since I don't discuss
procmail with my friends, this works great. 

For those who are mystified by this, it's a "regular expression" and
means roughly: "a line begining with a series of one or more letters,
possibly with some dashes, followed by a single colon, folowed by
anything or nothing, followed by 'procmail', followed by anything or
nothing, up to the end of the line." The initial asterix is not part
of the expression, but is what tells procmail that this regular
expression is a condition to be matched.

I use a the same thing in my anti-spam 'bot, followed by a
'bad-user/host list, followed by a 'bad-subject' list. I use a similar
regular expression to to check for _any_ non-empty 'X-Loop:' fields. 

David