[lug] Procmail Recipie Help Needed

Bill Thoen bthoen at gisnet.com
Tue Dec 28 19:41:45 MST 2004


I'm trying out the "scoring" technique of procmail to weed out german 
language schpam, and I tried this to score messages based on common german 
whole words, but it doesn't work. What am I doing wrong?

:0
* -5^0
* 1^1 B ?? <mit>
* 1^1 B ?? <[Dd]u>
* 1^1 B ?? <[Aa]us>
* 1^1 B ?? <das>
* 1^1 B ?? <auf>
* 1^1 B ?? <sich>
* 1^1 B ?? <und>
* 1^1 B ?? <macht>
* 1^1 B ?? <der>
{
  :0 fwh
  | formail -I"Subject: GERMAN SCHPAM: ${SUBJ_}"
  :0
  $SPAMFOLDER
}

The variable SUBJ_ is defined as:
SUBJ_=`formail -xSubject: \
  | expand | sed -e 's/^[ ]*//g' -e 's/[ ]*$//g'`

and SPAMFOLDER is correct (these work on other messages.)

The test message had two "mit"s, a "das", a "macht",  a "sich" and a 
"Du", which should have made the score positive. Am I wrong in assuming 
that whole words are identified by text in angle brackets? I don't want 
words like "wonderful" to count as a "der."

- Bill Thoen






More information about the LUG mailing list