procmail
[Top] [All Lists]

Re: line-by-line processing (was: Filtering out unwanted mime attachments)

1997-10-20 09:06:12
Excerpts from mail: (18-Oct-97) line-by-line processing (was: Filtering out 
unwanted mime attachments) by J Daniel Smith
MATCH seems to strip all leading blank lines in some way...or maybe just
the regexp needs refinement. I'm using 3.11pre7, so that shouldn't be the
problem.

OK, I'm starting to this think is a bug with procmail. Can someone confirm
before I bring this to Stephen's attention?

MATCH doesn't seem to strip *all* leading blank lines in my tests, but it
does seem to strip the first one or two anyway. Consider this example:

-----------------------------------------------------------------------------
LOGFILE=test-matching.log
BODYLINES="




6. five blank lines above
"

:0
* BODYLINES ?? ^^(.*$)\/(.*$)+
{ REMAININGLINES = $MATCH }

:0E
{ REMAININGLINES }

LOG="REMAININGLINES = |$REMAININGLINES|
"

:0
* BODYLINES ?? ^^\/.*$
{ THISLINE = $MATCH }

:0E
{ THISLINE }

LOG="THISLINE = |$THISLINE|
"

HOST
-----------------------------------------------------------------------------
This is the resulting contents of the logfile:

REMAININGLINES = |


6. five blank lines above
|
THISLINE = |
|

REMAININGLINES should start with four blank lines, but as you can see it only
starts with three.