NobGit
public nobgit read

NobMail

Based on mailcow: dockerized

Languages

Repository composition by tracked source files.

PHP
PHP 49% JavaScript 35% HTML 9% CSS 4% Shell 2% Python 1% Lua 0% Perl 0% Ruby 0% SCSS 0%
Create file Wiki Documentation
Clone
https://nobgit.com/orgs/nobgit/nobmail.git
ssh://[email protected]:2222/orgs/nobgit/nobmail.git

Commit

[Postfix] Add mailcow_anonymize_headers to default config

a844adde
AndrĂ© <[email protected]> 8 years ago
data/conf/postfix/mailcow_anonymize_headers.pcre | 7 +++++++
 data/conf/postfix/main.cf                        | 1 +
 2 files changed, 8 insertions(+)
 create mode 100644 data/conf/postfix/mailcow_anonymize_headers.pcre

Diff

diff --git a/data/conf/postfix/mailcow_anonymize_headers.pcre b/data/conf/postfix/mailcow_anonymize_headers.pcre
new file mode 100644
index 00000000..48cf4bdb
--- /dev/null
+++ b/data/conf/postfix/mailcow_anonymize_headers.pcre
@@ -0,0 +1,7 @@
+/^\s*Received:.*Authenticated sender:(.+)/
+    REPLACE Received: from localhost (localhost [127.0.0.1]) (Authenticated sender:$1
+/^\s*User-Agent/        IGNORE
+/^\s*X-Enigmail/        IGNORE
+/^\s*X-Mailer/          IGNORE
+/^\s*X-Originating-IP/  IGNORE
+/^\s*X-Forward/         IGNORE
diff --git a/data/conf/postfix/main.cf b/data/conf/postfix/main.cf
index c5feeebb..dbb10cb8 100644
--- a/data/conf/postfix/main.cf
+++ b/data/conf/postfix/main.cf
@@ -129,3 +129,4 @@ smtp_sasl_password_maps = proxy:mysql:/opt/postfix/conf/sql/mysql_sasl_passwd_ma
 smtp_sasl_security_options = 
 smtp_sasl_mechanism_filter = plain, login
 smtp_tls_policy_maps=proxy:mysql:/opt/postfix/conf/sql/mysql_tls_policy_override_maps.cf
+smtp_header_checks = pcre:/opt/postfix/conf/mailcow_anonymize_headers.pcre