|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: Tomasz Chmielewski (mangoo
wpkg.org)
Date: Mon Jun 29 2009 - 16:27:41 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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.
>>
>> http://www.postfix.org/postconf.5.html#smtp_header_checks
>>
>> # 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
fi
This would make adding this header independent of everything else (and
thus, be able to be replicated to other setups without any change).
--
Tomasz Chmielewski
http://wpkg.org
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]