Topic: How To Strip Specific Headers on Outbound to Relay Host
==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.6.3 OPENLDAP edition
- Deployed with downloadable installer
- Linux/BSD distribution name and version: Debian 11
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
I'd like to remove some headers specifically when mail is sent outbound to a relay / smarthost. I have RelayHost defined in main.cf
In searching for a solution, I've found references to header_checks, but that file is blank. I'm also not sure to use REGEXP or PCRE format or even know what that means.
See the attached image. The headers within the red boxes are what I'd like to remove. The goal is to limit what is sent to the public. I'd still like the virus, spam, and DKIM signing to work correctly.
If anyone can help, it would be greatly appreciated.
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.