procmail
[Top] [All Lists]

Re: recipe?

1998-10-06 12:56:03
On Fri, 2 Oct 1998 20:07:50 -0700 (PDT), Jauder Ho
<jauderho(_at_)transmeta(_dot_)com> wrote:
Does anyone have a good recipe to direct mails that have more x words that
are all capitalized to a file? i.e. I want the recipe to catch the
following
GET RICH QUICK OR ANY OTHER ANNOYING TEXT LIKE THIS. 

Merely catching text with lots of uppercase in it is of course fairly
trivial, but also prone to accidental mismatches. I have been playing
around with a scoring recipe, based on an idea by Greg Sutter, which
allows up to a certain percentage of Gratuitously Capitalized Words In
the Text. (This should be simple to adapt for all uppercase, or
whatever.) Here's what that recipe currently looks like:

  :0BD
  * -10^0.5 > 500
  * -1^1 ()\<[a-z][a-z]+\>
  *  1^1 ()\<[A-Z][a-z]+\>
  { REJECT="$REJECT${REJECT:+$NL}${REJ}Too Much Capital Bogosity [$=]" }

I go in and adjust the parameters every now and then but on the whole,
I think it works fairly well. Ideally, only mail from people you don't
know should be checked against this kind of recipe, anyhow.

I'm not 100% sure I grok the first score completely. Look in
procmailsc(5) for explanations, it's probably better than anything I
can cook up :-)

Hope this helps,

/* era */

Uh, perhaps I should add comments to that recipe, too ...

-- 
Bot Bait: It shouldn't even matter whether  (`')  Just  (`')  http://www.iki
I am a resident of the State of Washington   \/ Married! \/   .fi/~era/

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