summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2022-03-29 03:32:05 +0000
committerGitHub <noreply@github.com>2022-03-29 03:32:05 +0000
commitbb81d52537cf8015db95c15dacd4395ea1026549 (patch)
tree6cfe9a3a69743dcbaa60b5a801d34ed4eaa073ab
parenta371f9a56949c98519f98b23b0050f8b6f991d2b (diff)
parente66616423184fd5ac04e134fd4e4fc601d11d709 (diff)
Merge pull request #194 from Theory-of-Everything/fork
Fix: #178 leakage of public IP addresses in sent emails
-rwxr-xr-xemailwiz.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/emailwiz.sh b/emailwiz.sh
index 1d74054..3c0d07f 100755
--- a/emailwiz.sh
+++ b/emailwiz.sh
@@ -99,6 +99,14 @@ postconf -e 'smtpd_recipient_restrictions = permit_sasl_authenticated, permit_my
# boomers want and no one else).
postconf -e 'home_mailbox = Mail/Inbox/'
+# A fix referenced in issue #178 - Postfix configuration leaks ip addresses (https://github.com/LukeSmithxyz/emailwiz/issues/178)
+# Prevent "Received From:" header in sent emails in order to prevent leakage of public ip addresses
+postconf -e "header_checks = regexp:/etc/postfix/header_checks"
+
+# strips "Received From:" in sent emails
+echo "/^Received:.*/ IGNORE
+/^X-Originating-IP:/ IGNORE" >> /etc/postfix/header_checks
+
# master.cf
echo "Configuring Postfix's master.cf..."