[Gllug] More Procmail

Stig Brautaset stigbrau at start.no
Tue Feb 26 00:59:32 UTC 2002


* Harry <nmeweb at yahoo.co.uk> spake thus:
> Hi Comrades
> 
> I have put the following in my procmail as a test and it works to a degree.

Yeah, but if I am not much mistaken, it requires that *all* the words
are found (because only the first occurance of each words are rewarded
any points). Use 1^1 instead of 1^0 to allow the recipe to trigger e.g.
if someone mentions "money" four times and "free" one or two times but
does not mention cash.

> I am not sure if the problem is with outlook express or me. When the mail
> fulfills the criteria it goes to the spam file but there is no message body
> whatsoever. Where has this gone any ideas.
> 
> :0 Bh:
> * -5^0
> * 1^0 .*money
> * 1^0 .*loan
> * 1^0 .*cash
> * 1^0 .*apr
> * 1^0 .*free
> $SPAMFILE


The h says that the recipe should only deliver/pipe the header, so drop
that one. Also, the ".*" is not needed, since it just egrep's the body
anyway. Whether you grep for "zero or more instances of any character
(except newline) followed by the string 'money'" or just the string
'money' is just the same. Also, you can use regular expressions, thusly:

# have a nice variable at the top of the file that we can change without
# mucking about in the ruleset:
CRAP="(money|loan|cash|apr|free)"

:B :
* -5^0
* $ 1^1 $CRAP
$SPAMFILE

-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list