On Sat, 17 Apr 2004 09:43:59 +0200, "Ruud H.G. van Tol"
<rvtol(_at_)isolution(_dot_)nl> wrote:
Toen wij multimedia-fan(_at_)myrealbox(_dot_)com kietelden, kwam er dit uit:
## Define the IP address to trap.
TRAPPEDIP='111.111.111.111'
## Capture the remote IP to $MATCH
:0
* ^Received:.*\[\/[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+
{ TCPREMOTEIP=${MATCH} }
That would get the IP from the very first Received-header
(the most recently inserted one) which is often local.
myIP = "111.111.111.111"
:0
*$ ^Received:.*\[$\myIP]
{ isMINE = TRUE }
To MATCH the last Received-header, you could use
:0
* ^\/(Received:.*(^.*)*)?^Received:.*
* MATCH ?? ()\[\/[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+.*^^
* MATCH ?? ^^\/[0-9.]+
{ IP = $MATCH }
or simply
:0
* 1^1 ^Received:.*\[\/[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+
{ IP = $MATCH }
You reminded me of how I forgot that point that was discussed earlier
here when I asked how can detect the first header.
Thank you very much.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail