Ruud is trying to extract IP numbers from ALL Received: headers and,
not having much luck getting past the first such header, offered this
| I simplified the values of IP and REGEXP and MATEXP as following:
| to make the log-file more easily readable.
| The log-file now shows:
| procmail: Assigning "INCLUDERC=/xxx/XIP.rc"
| procmail: Assigning "MATCH="
| procmail: Matched "126.96.36.199"
| procmail: Match on
| ed:[ ]+from[ ]+.*[^0-9.]\/[0-9]+[.][0-9]+[.][0-9]+[.][0-9]
| procmail: Assigning "XIP=[188.8.131.52]"
| procmail: No match on
| ^Received:[ ]+from[ ]+(.*$)*\/^Received:[ ]+from[ ]+(.*$)*"
My *guess* is the ^ anchor in the middle of the regexp isn't working as
you want. My brain isn't prepared to analyze this further right now,
but I can offer a couple tips.
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.
2. I have an rcfile that processes all Received: headers, for a
different (apparent) purpose than yours. What I use probably has too
much stuff dependent on my local configuration to be helpful, but it
was borrowed heavily from:
That example might be helpful for you.
Sorry I don't have time or brain power for more right now, but maybe
that'll get you started.
Reply to list please, or append "6" to "procmail" in address if you must.
Spammers' unrelenting address harvesting forces me to this...reluctantly.
procmail mailing list