email: Sender spoofing patch 1/2: domain rewriting

A sender canonical map deletes the domain part from sender addresses.
Postfix will append @$myhostname after the rewriting.
This commit is contained in:
fliu 2021-08-17 09:40:19 +00:00 committed by Sunil Mohan Adapa
parent 1e712f6bc4
commit 3ff823e837
No known key found for this signature in database
GPG Key ID: 43EA1CFF0AA7C5F2
2 changed files with 14 additions and 0 deletions

View File

@ -60,6 +60,13 @@ egress_filter_cleanup = postconf.ServiceFlags(
egress_filter_cleanup_options = {
'syslog_name': 'postfix/fbxout',
# "From" domain rewriting
'sender_canonical_maps': 'regexp:/etc/postfix/freedombox-rewrite-sender',
'local_header_rewrite_clients': 'static:all',
# "From" domain masquerading
'masquerade_domains': '$mydomain',
'masquerade_classes': 'envelope_sender,header_sender',
# Header privacy
'header_checks': 'regexp:/etc/postfix/freedombox-header-cleanup',
'nested_header_checks': ''
}

View File

@ -0,0 +1,7 @@
# -*- mode: conf-space -*-
# This file is managed by FreedomBox
# regexp sender canonical map
# Remove the domain part from email addresses
# Postfix will append @$myhostname
/^([^@]+)@/ $1