john mickler a écrit :
> The pcre example above indeed passes the newline through as mentioned.
> Here's an adjusted expression to fit my situation, as well as an
> example header after the replacement:
>
> main.cf:
> header_checks = /usr/local/etc/postfix/maps/header_checks.pcre
>
> header_checks.pcre:
> /^(Received): (.*?)(\n[\t\x20])(.*)$/ REPLACE ${1}: from smtp-auth
> (smtp-auth.mycompany.com [55.55.55.55]${3}${4}
>
>
> resulting replaced header-
>
> Received: from smtp-auth (smtp-auth.mycompany.com [55.55.55.55]
> (using TLSv1 with cipher AES128-SHA (128/128 bits))
> (No client certificate requested)
> (Authenticated sender: [EMAIL PROTECTED])
> by smtp.mycompany.com (Postfix) with ESMTPSA id EA8E9B879
> for <[EMAIL PROTECTED]>; Sun, 30 Nov 2008 11:58:51
> -0500 (EST)
>
>
>
> The beauty is that all other header information besides the actual
> remote host is kept intact - in my eyes making this a perfect solution
> for my situation.
but the lack of beauty is the invalid HELO "smtp-auth". why not use
"smtp-auth.mycompany.com" instead?
>
> Thanks Victor, and thanks to everyone else for their input.