EASY steve.h...@digitalcertainty.co.uk wrote:
On Fri, 2009-06-12 at 16:40 +0200, Ralf Hildebrandt wrote:
* Ralf Hildebrandt <ralf.hildebra...@charite.de>:
* Steve <steve.h...@digitalcertainty.co.uk>:
/^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 <ab...@btbroadband.com>; Fri, 12 Jun
2009 11:01:58 +0100 (BST) from mail4[192.168.1.xx];
from=<mung...@munged.co.uk> to=<ab...@btbroadband.com> 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
<ab...@btbroadband.com>"
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 <ab...@btbroadband.com> ...
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: zen158...@zen.co.uk
To: ab...@btbroadband.com
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 'ab...@btbroadband.com', 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 <ab...@btbroadband.com>; 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