procmail
[Top] [All Lists]

RE: rule to catch a certain number of characters

2007-05-27 12:52:26
wolfgang wrote Sunday, May 27, 2007 8:46 PM:

In an older episode (Sunday, 27. May 2007 17:55), Bart Schaefer wrote:

Since you know the long line is in the HTML title tag:
:0:

* B ?? <title>\/.*</title>
* 1^1 MATCH ?? > 1000
spampile

That didn't work for me. Apparently, it's not that easy to match the 
heading "<" of a HTML tag. I changed it to a working version:

It's not hard.  But Bart didn't see your sample so didn't
know about the line breaks.  I had them in mine.  But I
had seen your sample by the second version of my offering.

:0:
* B ?? [<]title[>]\/.*$*.*$*.*[<][/]title[>]
* MATCH ?? > 1000
/tmp/spampile

You don't need to quote '>' or '<' in procmail except
when they come at the very left of an expression.
(It does no harm to quote, though.)

One problem though: with VERBOSE=yes that logs 
MATCH=<allofthe100kline>

Can I set verbose to no if <title> is matched and re-set it to yes 
afterwards automatically?

Yes.  You can.

Personally, I wouldn't bother capturing 100K chars, though.

Dallman


____________________________________________________________
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