i'm experimenting with removing certain "internal" received headers, and am 
having trouble constructing a proper header check to match headers which span multiple 
lines.

cat test_message
Delivered-To: f...@example.com
Return-Path: <b...@example.net>
Received: from localhost (localhost [127.0.0.1])
        by mta.example.com (Postfix) with ESMTP id 76ABF40DF1
        for <u...@example.com>; Tue, 19 Apr 2011 22:50:30 -0400 (EDT)
From: "b...@example.net" <b...@example.net>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: tuesday's meeting
Date: Thu, 21 Apr 2011 21.47.30 -0400
To: "f...@example.com" <f...@example.com>
Mime-Version: 1.0
X-Mailer: mail client

today's meeting will be today

cat header_checks-ignored
/^Received: from localhost \(localhost \[127\.0\.0\.1\]\)\s+by 
mta\.example\.com \(Postfix\) with ESMTP id/             IGNORE
#/^Received: from localhost \(localhost \[127\.0\.0\.1\]\)/                     
                                        IGNORE

postmap -q - regexp:./header_checks-ignored < test_message

if i use the shorter version, it works, so i believe i'm using proper syntax 
and test method.  how can i construct a header check for a header in which it 
may not be known where exactly in the string a newline will be found, and how 
much whitespace might be interspersed?

thanks
-ben

Reply via email to