procmail
[Top] [All Lists]

Re: Question about filtering by criteria in the body

2006-10-18 08:33:37
On Wed, Oct 18, 2006 at 07:21:33AM -0600, Google Kreme wrote:


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

   % 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.

I was mainly pointing out that he doesn't need to ask us.
He can find out in 5 seconds if it's a useful condition or not.


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

would be what I would try

You completely left off my much more important point, which
also was the main reason I responded: doing a body condition
for HTML is wasteful if we don't first limit the recipe
to messages that could be expected to have html in them.

I will now add that daemon bounces, whether real or faked,
also should be checked, though; and they won't have the
Content-Type header.  So:


   :0:  # again, the OP probably wanted a lock
   *  9876543210 ^0   ^Content-Type:.*(multi|html)
   *  9876543210 ^0   ^FROM_MAILER
   * -9876543210 ^0
   * B ?? ()<img .*alt=\"\"
   caught_file

Note, however, that there could be whitespace in that tag
that wouldn't be caught by the body condition.

Obtw: I do get two false pozzes from that on my 100-last
good mail.

dman

____________________________________________________________
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