procmail
[Top] [All Lists]

Re: matching on bad word list but which word was it ?

2006-08-20 04:27:37


Ruud H.G. van Tol schrieb:
Matthias Haeker schreef:

  
next thing to lear is how to put all the bad words in a file 
and to read it in.
    

Have you considered SpamAssasin?


  


yes but under FreeBSD 4.8 patched from Goldvision its quite dificult to 
implant it
/stand/sysinstall gives errors  and its another thing to learn  how to 
fix this

You can easily do that in pure procmail too, check the archives.

Example:

  BADWORDS = '(\
bad1|\
bad2|\
bad3|\
intelligent design)'

  :0
  *$ B ?? ()\<\/$BADWORDS\>
  { BADWORD =  $MATCH }


  

Since you are willing to spill a process, try fgrep.
  

i do something with fgrep like


FGREP=/usr/bin/fgrep

        :0
        * ? (echo "$X_ENVELOPE_FROM"     \
        | $FGREP -i -f /etc/mail/friendslist)
        {
        LOG = "$NL ======> Received Email From \
        "$X_ENVELOPE_FROM" is Whitelisted <====== $NL" 
         WHITE=$TRUE
        }
        :0 fhw
        * $ WHITE ?? $TRUE
        |formail -i "X-WHITE: TRUE"


but there i tell fgrep to look for 
 "$X_ENVELOPE_FROM" 
in friendslist

with the bad word searching i will do
it the other way arround

looking for all BADWORDS in the mailbody


but let me think ( i hope it dosn't hurt:))

if  badwords.rc contains 

BADWORDS = '(\
bad1|\
bad2|\
bad3|\
intelligent design)'

i can do it without fgrep  
and use in the calling recipe


 
INCLUDERC=/wherever/badwords.rc

:0
  *$ B ?? ()\<\/$BADWORDS\>
  { BADWORD =  $MATCH }


!!!!!!!!

but 
?????????

how big can such a file be without
harming the system Performance ?


Matthias



 








____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail