OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: question about nested headerchecks

From: Anne Ramey (annerblast.com)
Date: Tue Oct 18 2005 - 15:34:34 CDT


> Noel Jones wrote:
>
>> At 01:57 PM 10/18/2005, Anne Ramey wrote:
>>
>>> I'm having a problem with my logic trying to filter using header
>>> checks. What I want to do is send a message to a filter if the
>>> return path is my domain *and* the header my filter adds is not
>>> already present. I'm thinking this would do it, but my messages are
>>> never getting sent to the filter
>>>
>>> if /Return-Path:\s*<\S*mydomain.com>.*/
>>> if !/X-Copyrighted-Material:.*/ FILTER dmsg:
>>> endif
>>> endif
>>
>>
>>
>> (bonus points for including postconf -n)
>> Sorry, header_checks will only process one header at a time, so it is
>> not possible to perform actions based on multiple headers.
>> You could do this with a custom content_filter. Maybe one of the
>> existing filters could be modified for your use.
>> http://www.postfix.org/FILTER_README.html
>> http://www.postfix.org/addon.html#content
>>
  I wondered about that, but I figured, what good are nested
header_checks if it can't look at more than one? I've read and re-read
the filter chapter of the book and the readme and am having trouble
figuring out how to add a disclaimer onto only outgoing messages without
ending up in a loop. Any help would be appreciated.

  Anne