procmail
[Top] [All Lists]

Re: Question about filtering by criteria in the body

2006-10-18 06:37:41

On 18 Oct 2006, at 03:23 , Dallman Ross wrote:

:0
* B ?? \<img src=\"\"
mail/images

         Would that little rule work?  Thanks in advance.

1) All you have to do to test a body-egrep rule is to try
it on your command line with grep.  For me, going to my
spam folder and typing

   % grep -w 'img src=\"\"' *

produces no hits.

Of course it doesn't. That's searching of an image tag with no image.

The OP said alt originally, but the code said src.

:0
* B ?? ()<img (.*)alt=\"\"

would be what I would try

For the record, I find very little that matches this that is not spam

$ grep -re "\<img .*alt=\"\"" * | grep -iv spam | wc -l
        4
$ du -sh .
77M    .
# 2505 messages

and on another account:

$ grep -re "\<img .*alt=\"\"" * | grep -iv spam | wc -l
      132
$ du -sh .
811M    .
# 422839 messages

Not good enough that I would trust it to trash mail, but good enough  
to tag up.

-- 
The Monks of Cool, whose tiny and exclusive monastery is hidden in a  
really cool and laid-back valley in the lower Ramtops, have a passing- 
out test for a novice. He is taken into a room full of all types of  
clothing and asked: Yo, my son, which of these is the most stylish  
thing to wear? And the correct answer is: Hey, whatever I select.


____________________________________________________________
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