OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: Using pcre to modify headers

From: Noel Jones (njonesmegan.vbhcs.org)
Date: Mon Mar 01 2004 - 23:58:01 CST


On Mon, Mar 01, 2004 at 09:37:44PM -0800, Hans Baume wrote:
> Hallo,
>
> I use evolution as my mail client, but I don't like how it adds extra
> headers to each email and doesn't have the option (AFAIK) to disable
> them. I also prefer not to have the identifying "camel" string in each
> of my message IDs, so after someone on the debian-users mailing list
> mentioned that you can use pcre and postfix to strip these from outgoing
> mail, I implemented it and love it.
>
> Except for one thing. It naturally (but unexpectedly) strips these from
> incoming messages as well. Does anyone know of a way to restrict this
> behaviour only to outgoing mail?
>
> Many thanks,
>
> /H
>

Header and body checks apply to all mail handled by postfix, there is
no whitelist or bypass method.

But you still have some options:
- if the header you wish to remove has some locally identifiable
  information such as an IP, use that to limit the scope of your PCRE
  expression.
- configure a local submission IP:port for your internal mail that
  has header checks disabled. This is done by configuring a second
  cleanup service. Details are in the FILTER_README file included with
  postfix.
- run two or more completely separate instances of postfix, each with
  their own queue and config directories, listening on different IP
  addresses, each with their own header checks files.

--
Noel Jones