Difference between revisions of "How to disable various headers"

(How to disable various headers)
(Resolution)
 
(17 intermediate revisions by the same user not shown)
Line 7: Line 7:
  
 
The aim of this wiki is to show how to remove sensitive email headers that are normally generated when sending an email.  
 
The aim of this wiki is to show how to remove sensitive email headers that are normally generated when sending an email.  
 
  
 
==Resolution==
 
==Resolution==
  
To start with, we will first add a custom header check file, that will contain our new headers:
+
1. To start with, we will first create a custom header check file, that will contain our headers that we want to ignore:
  
  touch /opt/zimbra/conf/custom_header_checks
+
  $ touch /opt/zimbra/conf/custom_header_checks
  
Once we create the file, we are going to add it to the zimbra configuration:
 
  
zmprov mcf zimbraMtaHeaderChecks 'pcre:/opt/zimbra/conf/postfix_header_checks  pcre:/opt/zimbra/conf/custom_header_checks'
+
2. Once the file is created, we are going to add it to the zimbra configuration:
  
The next step would be to populate the file with data. Below is an example of this file, with various headers that we would like to be ignored:
+
$ zmprov mcf zimbraMtaHeaderChecks 'pcre:/opt/zimbra/conf/postfix_header_checks  pcre:/opt/zimbra/conf/custom_header_checks'
 +
$ zmprov mcf zimbraMtaBlockedExtensionWarnRecipient FALSE
  
 +
Confirm the new header check file is picked up by zimbra:
 +
$ postconf | grep header_checks
  
/X-Virus-Scanned/                    IGNORE
 
/^Received: from 127.0.0.1/    IGNORE
 
/^X-Originating-IP:/                  IGNORE
 
/^X-Mailer:/                              IGNORE
 
/^Mime-Version:/                      IGNORE
 
/^User-Agent:/                          IGNORE
 
/^X-Sanitizer:/                          IGNORE
 
/^X-Spam-Status:/                    IGNORE
 
/^X-Spam-Level:/                      IGNORE
 
/^Message-ID:/                        IGNORE
 
/^X-MimeOLE:/                        IGNORE
 
/^X-MSMail-Priority:/                IGNORE
 
/^Received:/                              IGNORE
 
  
 +
3. The next step would be to populate the file with data. Below is an example of this file with various headers:
  
The above headers are just an example. You can use any of these headers to hide sensitive information. But beware that some MX servers will automatically mark such emails passing through as spam. Furthermore, removing all the above information will make troubleshooting very difficult. Choose which headers you would like to remove and perform tests before implementing that on a production system.  
+
/X-Virus-Scanned/    IGNORE
 
+
/^Received: from 127.0.0.1/    IGNORE
 
+
/^X-Originating-IP:/    IGNORE
Once you finish editing that file, run the following commands to complete the setup:
+
/^X-Mailer:/    IGNORE
 
+
/^Mime-Version:/    IGNORE
zmprov mcf zimbraMtaBlockedExtensionWarnRecipient FALSE
+
/^User-Agent:/    IGNORE
zmmtactl restart
+
/^X-Sanitizer:/    IGNORE
 +
/^X-Spam-Status:/    IGNORE
 +
/^X-Spam-Level:/    IGNORE
 +
/^Message-ID:/    IGNORE
 +
/^X-MimeOLE:/    IGNORE
 +
/^X-MSMail-Priority:/    IGNORE
 +
/^Received:/    IGNORE
  
  
Confirm by running:
+
The above headers are just an example. You can use any of these headers to hide sensitive information based on your needs. But beware that some MX servers will automatically mark such emails passing through as spam. Furthermore, removing all the above information will make troubleshooting very difficult. Choose which headers you would like to remove, and perform tests before implementing that on a production system.
postconf | grep header_checks
 
  
  
 +
4. Once you finish editing the file, restart MTA to complete the setup:
  
 +
$ zmmtactl restart
  
  
  
{{Article Footer|Zimbra Collaboration 8.7, 8.8.9, 8.8.12| 12/02/2018}}
+
{{Article Footer|Zimbra Collaboration 8.7, 8.8.9, 8.8.12| 7/10/2019}}
 
{{NeedSME|SME1|SME2|COPY EDITOR}}
 
{{NeedSME|SME1|SME2|COPY EDITOR}}

Latest revision as of 14:19, 10 July 2019

How to disable various headers

   KB 23867        Last updated on 2019-07-10  




0.00
(0 votes)


Problem

The aim of this wiki is to show how to remove sensitive email headers that are normally generated when sending an email.

Resolution

1. To start with, we will first create a custom header check file, that will contain our headers that we want to ignore:

$ touch /opt/zimbra/conf/custom_header_checks


2. Once the file is created, we are going to add it to the zimbra configuration:

$ zmprov mcf zimbraMtaHeaderChecks 'pcre:/opt/zimbra/conf/postfix_header_checks  pcre:/opt/zimbra/conf/custom_header_checks'
$ zmprov mcf zimbraMtaBlockedExtensionWarnRecipient FALSE

Confirm the new header check file is picked up by zimbra:

$ postconf | grep header_checks


3. The next step would be to populate the file with data. Below is an example of this file with various headers:

/X-Virus-Scanned/     IGNORE
/^Received: from 127.0.0.1/     IGNORE
/^X-Originating-IP:/     IGNORE
/^X-Mailer:/     IGNORE
/^Mime-Version:/     IGNORE
/^User-Agent:/     IGNORE
/^X-Sanitizer:/     IGNORE
/^X-Spam-Status:/     IGNORE
/^X-Spam-Level:/     IGNORE
/^Message-ID:/     IGNORE
/^X-MimeOLE:/     IGNORE
/^X-MSMail-Priority:/     IGNORE
/^Received:/     IGNORE


The above headers are just an example. You can use any of these headers to hide sensitive information based on your needs. But beware that some MX servers will automatically mark such emails passing through as spam. Furthermore, removing all the above information will make troubleshooting very difficult. Choose which headers you would like to remove, and perform tests before implementing that on a production system.


4. Once you finish editing the file, restart MTA to complete the setup:

$ zmmtactl restart


Verified Against: Zimbra Collaboration 8.7, 8.8.9, 8.8.12 Date Created: 7/10/2019
Article ID: https://wiki.zimbra.com/index.php?title=How_to_disable_various_headers Date Modified: 2019-07-10



Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »


Wiki/KB reviewed by SME1 SME2 COPY EDITOR Last edit by Teodor Vizirov
Jump to: navigation, search