On 13/02/12 15:24, Alex Bligh wrote:
So, what I did for future readers of the archives is have the following
line in header_checks:

/^Received: .*by (mail\.example\.com \(Postfix\) with
(ESMTPSA|SMTPSA|ESMTPA|SMTPSA).*)$/ REPLACE Received: by $1

This removes the inbound IP addresses data, but keeps the ID, date,
time etc, i.e.:

Received: from [10.10.10.10] (10-10-10-10.example.com [10.10.10.10])
by mail.example.com (Postfix) with ESMTPSA id D74CF456E001;
Sat, 11 Feb 2012 18:35:40 +0000 (GMT)

I have been trying this, but for some reason it does not work. I assume the wrapping doesn't matter, since the lines are different lengths depending on the recipient server. Below is postfix (IPs redacted), Exchange gives longer lines.

Received: from [100.100.100.100] (unknown [200.200.200.200])
        (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
        (No client certificate requested)
        by mx.domain.tld (Postfix) with ESMTPSA id 6F60A73404D;
        Mon, 13 Feb 2012 15:36:58 +0000 (GMT)

Using Postfix 2.5.5-1.1+lenny1 (stock debian package).  I have:

/^Received: .*by (mx\.domain\.tld \(Postfix\) with (ESMTPSA|SMTPSA|ESMTPA|SMTPSA).*)$/ REPLACE Received: by $1

It gets ignored.  This works though:

/^Received:.*\[200\.200\.200\.200/ IGNORE

Not sure what I'm doing wrong?

Reply via email to