On Wed, Dec 29, 2010 at 05:01:59PM -0500, Phil Howard wrote: > Received: from localhost (localhost [127.0.0.1]) by > my.mail.server (Postfix) with ESMTP id XX99999999 for > <u...@example.com>; Wed, 29 Dec 2010 09:23:27 -0500 (EST)
This is added locally, and is reasonably removed, if that's what you want. > Received: from localhost (localhost [127.0.0.1]) by > my.mail.server (Postfix) with ESMTP id XX99999999 for > <u...@example.com>; Wed, 29 Dec 2010 09:21:09 -0500 (EST) Who is going to bother forging this header, and why would you care to preserve it if they did? > Now, which one was added by the sender, and which one was added by > smtpd when it gets it from amavis. I'm sure you can see it. But > coding something like that in a regular expression? It makes no difference which is real and which is "fake", remove any header that should properly have been added by your system alone, and which you would drop if this is the case. > > The regular expression must Match the *differences* between the headers > > you want to remove and those you don't. This is NOT difficult. > > I don't see how. By removing headers that you normally add, and that no other correctly configured system would add. > > This is not correct. You match multiple features which together are > > sufficient to surgically remove just the right header. > > I don't see how. Headers are just piles of bits, if you don't want a particular pile of bits in your messages remove it. Asking metaphysical questions of how a particular pile of bits was born is the root of your confusion. :-( -- Viktor.