EASY [email protected] wrote:
On Fri, 2009-06-12 at 16:40 +0200, Ralf Hildebrandt wrote:
* Ralf Hildebrandt <[email protected]>:
* Steve <[email protected]>:

/^Received: from.*(cmodem|dhcp|adsl|broadband|dynamic)/ REJECT dynamic host in 
headers
OK

In the logs; tripped on the header filter;
Jun 12 11:01:58 mail4 postfix/cleanup[1419]: B9F16AC09D: reject: header
Received: from [192.168.1.xx] (xx [192.168.1.xx])??by mail4.xx.co.uk
(xx) with ESMTPA id B9F16AC09D??for <[email protected]>; Fri, 12 Jun
2009 11:01:58 +0100 (BST) from mail4[192.168.1.xx];
from=<[email protected]> to=<[email protected]> proto=ESMTP
helo=<[192.168.1.xx]>: 5.7.1 dynamic host in headers
The regular expression is too broad, since it also matches the "for 
<[email protected]>"
portion in the headers!
Since the headers look like:

Received: from [192.168.1.xx] (xx [192.168.1.xx])  NEWLINE
          by mail4.xx.co.uk (xx) with ESMTPA id B9F16AC09D NEWLINE
          for <[email protected]> ...

You COULD solve this using:

/^Received: from .*(cmodem|dhcp|adsl|broadband|dynamic).*by / REJECT dynamic 
host in headers

It's worth a try.

Indeed, but it's *not* in the header section of the email, is it! It has
been pasted into the *BODY* of an email.

Yes, it's in the headers. Look, here's what you originally sent:

Subject: UCE: 86.140.171.207
From: <munged>
Reply-To: [email protected]
To: [email protected]
Content-Type: text/plain
Organization: <munged>
Message-Id: <1244801375.6998.30>
Mime-Version: 1.0
X-Mailer: Evolution 2.24.3
Content-Transfer-Encoding: 7bit
Date: Fri, 12 Jun 2009 11:09:36 +0100
X-Evolution-Format: text/plain
X-Evolution-Account: 1242054711.26374.4

Since you're sending it to '[email protected]', one of the 'Received:' headers will look like this:

Received: from [192.168.1.xx] (xx [192.168.1.xx])
        by mail4.xx.co.uk (xx) with ESMTPA id B9F16AC09D
for <[email protected]>; Fri, 12 Jun 2009 11:01:58 +0100 (BST) from mail4[192.168.1.xx];

Note that the recipient address is in the 'Received:' header. And the string 'broadband' in that address is what the regex is matching.

Mark

Reply via email to