procmail
[Top] [All Lists]

Re: Question about filtering by criteria in the body

2006-10-18 02:59:11
On Wed, 18 Oct 2006, Steve Lake wrote:

        In an ongoing effort to get rid of all this gawd awful image spam,
until the new OCR spam filtering system is in place, I'm looking at
temporarily implementing a solution that I hope will do what I need for the
time being.  I'm looking at doing a rule that will grab the criteria '<img
alt="" ' in the body (all the image spam seems to use a blank alt with the
image tag in exactly the same way from what I can tell) and automatically
flag it as image spam and toss it in a new folder.  It's a test for now,
and a stopgap, so I'm well aware of the 1% potential for false
positives.  But since that's not likely to be an issue with me, I'm more
than happy to do it.  Here's what I'm thinking will work, but rather than
risk having it crash and not filter anything, I'd like your opinion to see
if this would catch the requested image spam and sort it into another folder.


        How to check a little pricmail script:

        1>  Make file contain the following lines:

VERBOSE=yes
LOGABSTRACT=yes
#LOGFILE=/tmp/log.procmail
SHELL=/bin/sh
DEFAULT=/dev/null


        2>  Append your recipe into this file.

        3>  Save the message that you want to check in NEW folder.

        4>  Run the command:

formail -s procmail ./the-procmail-file < the-new-folder

        You will see if your script match or not.  You can do instant
        checking by egrep(1), for example:

egrep  -i  '\<img src=\"\"'  the-new-folder


        For more complicated scripts see Sean's page:
        http://www.professional.org/procmail/sandbox.html



# This addition filters viruses
:0
* B ?? \<img src=\"\"
mail/images

        Would that little rule work?  Thanks in advance.

        The syntax is OK

Bye,
  Udi

____________________________________________________________
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