procmail
[Top] [All Lists]

Re: scanning the body of a message

1997-05-08 11:40:00
Wotan writes:

Is there an option other than scanning the body like this:

:0b
* http://www\.(siteone|sitetwo|sitethree)

My list of sex domains 70+ long, making the above method hard to read.  :( 

If your list gets too long, use the weighted scoring technique
documented in procmailsc(5).  Here's an example:

    :0B
    * 2147483647^1 http://www\.siteone
    * 2147483647^1 http://www\.sitetwo
    * 2147483647^1 http://www\.sitethree
    /dev/null

You can use 1^1 instead of 2147483647^1, but the latter will cause
the recipe to finish immediately as soon as it finds a match, instead
of continuing to try all the subsequent patterns.

BTW, use the flag "B" instead of "b" - see procmailrc(5) for a
description of each.

-- 
Michael Fuhr
http://www.dimensional.com/~mfuhr/