procmail
[Top] [All Lists]

RE: egrepping all Received: headers

2002-07-16 16:08:11
From: Dallman Ross [mailto:dman(_at_)nomotek(_dot_)com] 

I've looked a bit through the archives to find a good way to
look at all Received: headers even if a putative match is
found.  I suppose scoring is the way.  That's my weak
area.  Would someone be willing to offer a quick
one-liner for how to phrase the condition?

I'm trying to imagine a scenario where a Received: line could
also be the first line of a message.  I might, for instance,
run the filter on a stored messages whose From_ header has
been stripped.

I didn't get any answers yet, so I looked harder in the archives.
I found one post that looked promising:
http://makeashorterlink.com/?S2FD51741

I had to fudge with it some.  I've now got this:

     * $
^Received:(.+$)*.+\([^$WS]+\.\/[a-z][a-z][a-z]*[$WS]+\[[0-9]+\.
     *     MATCH ?? ()\/[a-z]+

That gives me the putative TLD just before a whitespace (which
variable was assigned earlier in my rc) followed by open brace 
plus and start of a dotted quad.

The only thing I don't yet like is that it seems not to work if the
first line in saved mail is a Received: line.  I don't see why
it shouldn't.

dman


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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