procmail
[Top] [All Lists]

RE: Multiline Received header not being matched

2004-02-13 22:45:10


-----Original Message-----
From: procmail-bounces(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
[mailto:procmail-bounces(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE]On Behalf Of 
LuKreme
Sent: Friday, February 13, 2004 8:45 PM
To: procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
Subject: Re: Multiline Received header not being matched


On 13 Feb 2004, at 08:58, Gary Funck wrote:
From: David Stone Friday, February 13, 2004 6:31 AM
:0f
* ^Received: from.* \(\[[0-9]+(.*$)[       ]+by example\.com
| formail -A "X-SpamTest: Sending MTA has no rDNS"

(The [] enclose a space and a tab)

Gary Funck wrote:

SPACE=" "
TAB="       "
WS="$SPACE$TAB"

:0 h fw
* $ ^Received:[$WS]+from.*[$WS]\(\[[0-9].*\<by example\.com
| formail -A "X-SpamTest: Sending MTA has no rDNS"

or

:0 hfw
* ^Received:.*by example\.com
| formail....

No.



or is there some purpose that \[[0-9] might serve?

Yes. The goal is to detect that mail was accepted from a host whose IP
address
doesn't reverse DNS. When sendmail sees that it adds a header along these
lines:

Received: from c188196.adsl.hansenet.de ([213.39.188.196])
        by example.com (8.12.8/8.12.8) with SMTP id i059IxNf028954
        for <recipient(_at_)example(_dot_)com>; Mon, 5 Jan 2004 01:19:03 -0800

but if it can rDNS, then the header looks like this:

Received: from ms-dienst.rz.rwth-aachen.de (ms-1.rz.RWTH-Aachen.DE
[134.130.3.130])
        by example.com (8.12.8/8.12.8) with ESMTP id i1E5VcWO003099
        for <recipient(_at_)example(_dot_)com>; Fri, 13 Feb 2004 21:31:39 -0800



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