How to disable various headers: Difference between revisions
(Created page with "=How to disable various headers= {{KB|{{ZC}}|{{ZCS 8.8}}|{{ZCS 8.7}}||}} {{WIP}} ==Problem== The aim of this wiki is to show how to remove sensitive email headers that are...") |
|||
Line 22: | Line 22: | ||
/X-Virus-Scanned/ IGNORE | /X-Virus-Scanned/ IGNORE | ||
/^Received: from 127.0.0.1/ IGNORE | /^Received: from 127.0.0.1/ IGNORE | ||
/^X-Originating-IP:/ IGNORE | /^X-Originating-IP:/ IGNORE | ||
/^X-Mailer:/ IGNORE | /^X-Mailer:/ IGNORE | ||
/^Mime-Version:/ IGNORE | /^Mime-Version:/ IGNORE | ||
/^User-Agent:/ IGNORE | /^User-Agent:/ IGNORE | ||
/^X-Sanitizer:/ IGNORE | /^X-Sanitizer:/ IGNORE | ||
/^X-Spam-Status:/ IGNORE | /^X-Spam-Status:/ IGNORE | ||
/^X-Spam-Level:/ IGNORE | /^X-Spam-Level:/ IGNORE | ||
/^Message-ID:/ IGNORE | /^Message-ID:/ IGNORE | ||
/^X-MimeOLE:/ IGNORE | /^X-MimeOLE:/ IGNORE | ||
/^X-MSMail-Priority:/ IGNORE | /^X-MSMail-Priority:/ IGNORE | ||
/^Received:/ IGNORE | /^Received:/ IGNORE | ||
Revision as of 13:56, 10 July 2019
How to disable various headers
Problem
The aim of this wiki is to show how to remove sensitive email headers that are normally generated when sending an email.
Resolution
To start with, we will first add a custom header check file, that will contain our new headers:
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'
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:
/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. 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.
Once you finish editing that file, run the following commands to complete the setup:
zmprov mcf zimbraMtaBlockedExtensionWarnRecipient FALSE zmmtactl restart
Confirm by running:
postconf | grep header_checks