Dan Langille a écrit :
> Following one from John's success, I'm failing.  One difference between
> John's setup and mine is my header_checks directive.  It was defined in
> master.cf:
> 
>  -o header_checks=pcre:/usr/local/etc/postfix/obscure_smtp_auth
> 

did you add that to an smtpd service? see below.

> I know I'm putting this directive into the direct Postfix daemon becuase
> the remove of the following directive, from within the same declaration,
> affects the email headers:
> 
>  -o smtpd_sasl_authenticated_header=yes
> 
> 
> I had to move this header_checks directive into main.cf to get the
> REPLACE working.
> 

you can do it in master.cf:

submission ... smtpd
  -o smtpd_sasl_authenticated_header=yes
  -o cleanup_service_name=cleanmsa
  ...

cleanmsa .... cleanup
  -o header_checks=pcre:/usr/local/etc/postfix/obscure_smtp_auth



> The expression I'm using does the following:
> - replaces the authenticated user
> - replaces the host/ip address of the origin host
> - retains the original spacing/newlines
> 
> /^Received: from (.* \([-._[:alnum:]]+
> \[[.[:digit:]]{7,15}\]\))(.*)\(Authenticated sender: ([^)]+)\)(.*)(by
> nyi\.unixathome\.org) \(([^)]+)\) with (E?SMTPS?A?) id
> ([A-F[:digit:]]+)(.*)/ REPLACE Received: from smtp-auth.unixathome.org
> (smtp-auth.unixathome.org [10.4.7.7])$2(Authenticated sender:
> hidden)$4$5 ($6) with $7 id $8 $9
> 

Reply via email to