Noel, thanks for your patient response.

On 13/02/12 16:17, Noel Jones wrote:
On 2/13/2012 9:49 AM, li...@coffeehabit.net wrote:
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.

not sure why you would be trying to match Exchange lines anyway...

I was unclear, sorry. I'm submitting mail to the postfix box in question, via submission, with TLS and Auth. I was sending my test mails to two addresses: one that deliveres on the same box, and one that's delivered to an exchange server. The header below is generated by Postfix, but on the mail on the exchange side, it's just wrapped longer. Anyway, that's not really important.

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

Most likely reason is that your pattern doesn't match the input.

Test patterns with
postmap -q - pcre:/path/to/header_checks<  /path/to/testfile

Note that with postfix earlier than 2.6 you'll need to manually
collapse multi-line headers before testing.  With postfix 2.6 and
newer you can use "postmap -hq - ..." to enable header query mode.

I couldn't get this to match either, but I'll play around with it some more. This box is getting replaced soon anyway, so I'll be working with a newer build of Postfix soon.

Thanks!

Reply via email to