Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email email@example.com
From: Tomasz Chmielewski (mangoowpkg.org)
Date: Mon Jun 29 2009 - 16:27:41 CDT
Victor Duchovni wrote:
>>> Anyone there adding custom headers in Postfix?
>> Use smtp_header_checks, defined in master.cf on the "smtp" service.
>> Requires postfix 2.5 or newer.
>> # master.cf
>> smtp unix - - n - - smtp
>> -o smtp_header_checks=regexp:/path/add_my_header
>> # add_my_header
>> /^/ PREPEND X-Custom: my header
> This will prepent the custom header above *each* header of the
> message. One needs to match a header that is present exactly once in
> each outbound message. Perhaps a locally added "Received" header or
> something else added on input.
Would such logic be possible then (not sure how Postfix syntax would
look like here, or if it's possible at all)?
if !(^X-Custom: header)
PREPEND X-Custom: header
This would make adding this header independent of everything else (and
thus, be able to be replicated to other setups without any change).