procmail
[Top] [All Lists]

Re: matching Received (solved)

2006-01-10 09:43:38
Mr Duck:
Ruud H.G. van Tol:
Udi Mottelo:

* ! ^Received: .*$Received: .*\[65\.17\.84\.226\].*$

IMO this is clearer:
   * ! ^Received: .*\
       ^Received: .*\[65\.17\.84\.226\]

   The problem that I see with Udi's original idea is this:

   What guarantee is there that the second Received line is
the one that will contain the correct IP?  Whose to say
that the first line won't be the right match?  Or perhaps
a third one?

It tests that the IP-nr is not in the second *or further* (=older)
Received header field.

This is done to skip the very first (topmost, newest) Received header
field, in which the IP-nr always is.

So basicaly this test is: ignore the first Received header field, search
if the IP-nr is in any of the following Received header fields, and
return the negation of that search.

-- 
Grtz, Ruud


____________________________________________________________
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

<Prev in Thread] Current Thread [Next in Thread>