Noel Jones-2 wrote
> On 10/29/2016 1:45 AM, Den1 wrote:
>> Could you please, advise where do I exactly place those three in order
>> for
>> them to work (based on my postconf -n and postconf -Mf pasted here)? 
>> 
>> 1.) -o cleanup_service_name=subcleanup
> 
> The above line may be added after any smtpd service in master.cf,
> and must be indented.
> http://www.postfix.org/smtpd.8.html
> 
>> 2.)  subcleanup unix n       -       -       -       0       cleanup
> 
> This line can be added anywhere in master.cf, followed by indented
> options accepted by cleanup(8), such as "  -o header_checks=....."
> http://www.postfix.org/cleanup.8.html
> 
>> 3.) -o smtp_header_checks=regexp:/etc/postfix/header_checks
> 
> smtp_header_checks are a property of the smtp(8) delivery transport.
>  As such, it can be added after any "smtp" transport in master.cf.
> http://www.postfix.org/smtp.8.html
> 
> Some things to keep in mind...
> - only one action is allowed per header.  If a header matches
> multiple lines in your header_checks file, only the first match is
> performed.
> - You can have postfix log all the headers it examines with a
> header_check like:
> /./ INFO
> Note this prevents any further matches from being processed (one
> action per header).
> - postfix does see headers added by milters, see mime_header_checks
> (default value $header_checks).
> - postfix does not see headers added after postfix has received the
> mail, such as headers added by downstream content filters or a
> next-hop relay.
> - read the documentation!  Great effort has been put into
> documenting postfix clearly and correctly.
> 
> http://www.postfix.org/documentation.html
> http://www.postfix.org/header_checks.5.html
> http://www.postfix.org/postconf.5.html (for main.cf syntax)
> http://www.postfix.org/master.5.html (for master.cf syntax)
> 
>   -- Noel Jones

Thank you so much for your tips. I really do appreciate.

I have read of course the docs for many times before trying to implement it
but it still does not work. I could've missed something somewhere. I will
keep on trying though.

You are saying that "there is only one action allowed per header". I guess
this is the reason why it does not work. My
/^User-Agent: .*/   IGNORE  triggers 

and all the other rules like
/^Received: .*/     IGNORE
/^X-Originating-IP:/    IGNORE
and so on are not taken into account/consideration then and therefore do not
work, is that right?

Plus, you mentioned in your other post that header_checks and
smtp_header_checks if used together may mangle each other and conflict? Did
I understand you correctly? I will toggle them just to test and to check if
that could be the reason as well...  I haven't tried yet to use either
header_checks or smtp_header_checks only. I have always used them both at
the same time. Would be thankful for any further comments. 






--
View this message in context: 
http://postfix.1071664.n5.nabble.com/Stripping-Received-headers-tp56953p86997.html
Sent from the Postfix Users mailing list archive at Nabble.com.

Reply via email to