procmail
[Top] [All Lists]

Re: rule to catch a certain number of characters

2007-05-27 08:59:37
On 5/26/07, Dallman Ross <dman(_at_)nomotek(_dot_)com> wrote:
wolfgang schrieb on Saturday, May 26, 2007 8:58 PM:
So, how would I - not familiar with scoring so far - match that long
line?

The starting place would be "man procmailsc", but this is
an interesting challenge, and I will try to help more specifically
now.

But 100,000 chars is a lot to capture, and implies a big
LINEBUF and thereby a big memory footprint.

Just to clarify -- it won't have anything to do with LINEBUF unless
you interpolate the capture (e.g. by using $MATCH).  Procmail is
likely to have already slurped the entire message into memory at some
point during the body scan so the length of that particular line is
not of much extra consequence.

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

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

I'm not sure that would work if you didn't know some way to pick out
the specific line that you want to stuff into MATCH.  That is, you
could try:

:0:
* B ?? ()\/^.*$
* 1^1 MATCH ?? > 9998
whatever

but I've forgotten whether procmail will retry the MATCH condition for
every success of the B condition.  I think not.

____________________________________________________________
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