How to disable various headers in Zimbra

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


Ref:

https://wiki.zimbra.com/wiki/How_to_disable_various_headers

Comments

Popular posts from this blog

Cambium cnPilot E400/E410/E500 Configuration Tutorial

Disabling Zimbra's AntiSpam, Amavis and AntiVirus filtering

Error "Unable to retrive Zimbra GPG key for package validation"