On 10/27/2016 1:57 PM, Den1 wrote:
> my apologies to post here again as the thread is quite old but I am having аn
> absolutely identical issue. I cannot seem to remove any headers at all no
> matter what I do.
> 
> I tried setting this in master.cf:
> submission inet n       -       -       -       -       smtpd
>   -o smtpd_tls_security_level=encrypt
>   -o smtpd_sasl_auth_enable=yes
>   -o smtpd_client_restrictions=permit_sasl_authenticated,reject
>   -o milter_macro_daemon_name=ORIGINATING
>   -o cleanup_service_name=subcleanup

This looks reasonably correct.

> 
> and this:
> subcleanup unix n       -       -       -       0       cleanup
>   -o smtp_header_checks=regexp:/etc/postfix/header_checks

smtp_header_checks is a property of the smtp delivery agent, not
cleanup.  Not surprising it doesn't work here.

> 
> then changed smtp_header_checks to header_checks just to test it:
> subcleanup unix n       -       -       -       0       cleanup
>   -o header_checks=regexp:/etc/postfix/headerch

This looks reasonably correct.

> 
> with my both header_checks and headerch files that contain this:
> /^Received: .*/     IGNORE
> /^X-Originating-IP:/    IGNORE
> /^Received:.*from:/ IGNORE
> /^Received:.*\s*from/ IGNORE
> /^Received:.*\sfrom/ IGNORE
> /^Received:\s.*from/ IGNORE
> /^Received:\sfrom/ IGNORE
> /^Received: from .*/  IGNORE

You can replace all the above with;
/^Received: /  IGNORE


> 
> and I have this in my main.cf :
> smtp_header_checks = regexp:/etc/postfix/header_checks
> header_checks = regexp:/etc/postfix/headerch

unwise, that will mangle all your mail, both incoming and outgoing.

> 
> but all the headers are still there in both incoming and outgoing emails. 


Do you have receive_override_options set in main.cf?
What's "postconf -n" show?
what's "postconf -Mf" show?




  -- Noel Jones

Reply via email to