From a844adde0f416357eefee125bbdf59185b17a3a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9?= Date: Mon, 15 Oct 2018 20:52:06 +0200 Subject: [PATCH] [Postfix] Add mailcow_anonymize_headers to default config --- 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 --git a/data/conf/postfix/mailcow_anonymize_headers.pcre b/data/conf/postfix/mailcow_anonymize_headers.pcre new file mode 100644 index 000000000..48cf4bdb5 --- /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 c5feeebb0..dbb10cb8c 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