Don Hammond wrote:
Ruud is trying to extract IP numbers from ALL Received: headers and,
not having much luck getting past the first such header[...]
My *guess* is the ^ anchor in the middle of the regexp isn't working as
you want.
I was just looking into that while you wrote this. I got part of my
code from the famous comma-counter
http://www.xray.mpe.mpg.de/mailing-lists/procmail/1997-02/msg00094.html
but must have taken out to much.
In that example, the .procmailrc has the lines
:0
* ^Resent-(From|Date|To|Cc|Message-Id):
{ REGEXP = "^(Resent-(To|Cc)|Apparently-To):" }
:0E
{ REGEXP = "^((Apparently-)?To|Cc):" }
and the included count_comma_sep.rc has the line
* HEADERLINES ?? $ $REGEXP(.*$)*\/$REGEXP(.*$)*
so the REGEXP there also has the ^ anchor in the middle.
1. Personally I've had more luck using "\>" (or "\<") when matching over
multiple lines with procmail regular expressions. Those "word boundary"
tokens will match a newline.
OK.
http://www.xray.mpe.mpg.de/mailing-lists/procmail/1999-07/msg00095.html
That example might be helpful for you.
OK, thanks, will try to grasp it.
Ruud
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail