update--
This commit is contained in:
@@ -1,43 +1,52 @@
|
||||
# *** [ Ansible managed: DO NOT EDIT DIRECTLY ] ***
|
||||
|
||||
# ---
|
||||
# - Replace headers
|
||||
|
||||
# - Replace recieved from IPv4 / IPv6 header - hide senders IP address and also 'Authenticated sender'
|
||||
# - Header Checks - /etc/postfix/header_checks
|
||||
# ---
|
||||
#
|
||||
#/^Received: from (.* \([-._[:alnum:]]+ \[[.[:digit:]]{7,15}\]\))(.*)\(Authenticated sender: ([^)]+)\)(.*)/ REPLACE Received: from anonymized.ipv4 (localhost [127.0.0.1])$2(Authenticated sender: hidden)$4
|
||||
#
|
||||
#/^Received: from (.*IP[vV]6:(([0-9a-f]{0,4}:){1,7}[0-9a-f]{1,4})\]\){0,1})(.*)\(Authenticated sender: ([^)]+)\)(.*)/ REPLACE Received: from anonymized.ipv6 (localhost [::1])$4(Authenticated sender: hidden)$6
|
||||
# Ziel: offensichtlich kaputte RFC-Header ablehnen (wenig False Positives)
|
||||
|
||||
# - Replace recieved from IPv4 / IPv6 header - hide only sender IP address
|
||||
#
|
||||
#/^Received: from (.* \([-._[:alnum:]]+ \[[.[:digit:]]{7,15}\]\))(.*)\(Authenticated sender: (.*) / REPLACE Received: from anonymized.ipv4 (localhost [127.0.0.1])$2(Authenticated sender: $3
|
||||
########################################
|
||||
# A) Kaputter From:-Header
|
||||
########################################
|
||||
|
||||
#/^Received: from (.*IP[vV]6:(([0-9a-f]{0,4}:){1,7}[0-9a-f]{1,4})\]\){0,1})(.*)\(Authenticated sender: (.*) / REPLACE Received: from anonymized.ipv6 (localhost [::1])$4(Authenticated sender: $5
|
||||
# 1) From: ist leer
|
||||
/^From:\s*$/ REJECT Invalid From header (empty) - Spamschutzregel FROM-1001
|
||||
|
||||
# ---
|
||||
# - Ignore Headers
|
||||
# ---
|
||||
|
||||
#/^\s*User-Agent/ IGNORE
|
||||
#/^\s*X-Enigmail/ IGNORE
|
||||
#/^\s*X-Mailer/ IGNORE
|
||||
#/^\s*X-Originating-IP/ IGNORE
|
||||
# 2) Mehr als ein '@' im From:-Header -> syntaktisch kaputt
|
||||
/^From:.*@.*@/ REJECT Invalid From header (multiple @) - Spamschutzregel FROM-1002
|
||||
|
||||
|
||||
# ---
|
||||
# - Reject / Discard headers
|
||||
# ---
|
||||
# 3) Mehrere Mailboxen durch Komma getrennt (wie: Die@..., Lions@..., ...)
|
||||
# (Legitime Fälle nutzen i.d.R. Display-Namen/Group-Syntax; dieses Muster ist in Spam sehr häufig)
|
||||
/^From:\s*[^<>,]+@[^,]+,\s*[^<>,]+@/ REJECT Invalid From header (multiple mailboxes) - Spamschutzregel FROM-1003
|
||||
|
||||
/^To:.*<>/ REJECT Possible SPAM Blank email address To: header - Header-Spamschutzregel T0-1001
|
||||
# 4) Typische kaputte UTF-8-Fragmente
|
||||
/^From:.*\xC3\xA2/ REJECT Invalid UTF-8 in From header - Spamschutzregel FROM-1004
|
||||
|
||||
/\(envelope-from <>\)/ REJECT Possible SPAM - Header-Spamschutzregel RECIEV-1001
|
||||
|
||||
/^Reply-To: .+\@inx1and1\..+/ REJECT Possible SPAM - Header-Spamschutzregel REPLY-1001
|
||||
########################################
|
||||
# B) Optional: sehr spezifische lokale Blacklist
|
||||
########################################
|
||||
|
||||
/^From:.*<>/ REJECT Possible SPAM - Header-Spamschutzregel FROM-1001
|
||||
#/^Reply-To: .+\@inx1and1\..+/ REJECT Possible spam (local pattern)
|
||||
|
||||
/^Date: .* 19[0-9][0-9]/ REJECT Date from the past. Fix your system clock. - Header-Spamschutzregel DATE-1001
|
||||
/^Date: .* 200[0-9]/ REJECT Date from the past. Fix your system clock. - Header-Spamschutzregel DATE-1002
|
||||
/^Date: .* 201[0-9]/ REJECT Date from the past. Fix your system clock. - Header-Spamschutzregel DATE-1003
|
||||
/^Date: .* 2020/ REJECT Date from the past. Fix your system clock. - Header-Spamschutzregel DATE-1004
|
||||
|
||||
########################################
|
||||
# C) Warn
|
||||
########################################
|
||||
|
||||
# Date-Rejects sind oft zu aggressiv -> wenn nötig: lieber taggen oder loggen statt reject
|
||||
/^Date: .* 19[0-9][0-9]/ WARN Date far in the past Header-Spamschutzregel DATE-1001
|
||||
/^Date: .* 200[0-9]/ WARN Date far in the past Header-Spamschutzregel DATE-1002
|
||||
/^Date: .* 201[0-9]/ WARN Date far in the past Header-Spamschutzregel DATE-1003
|
||||
|
||||
|
||||
|
||||
########################################
|
||||
# Bemerkungen
|
||||
########################################
|
||||
|
||||
# (envelope-from <>) nicht pauschal rejecten:
|
||||
# echte DSNs/Bounces haben legitimerweise MAIL FROM: <>
|
||||
#/\(envelope-from <>\)/ REJECT Null envelope-from
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
# *** [ Ansible managed: DO NOT EDIT DIRECTLY ] ***
|
||||
|
||||
# ---
|
||||
# - Replace headers
|
||||
|
||||
# - Replace recieved from IPv4 / IPv6 header - hide senders IP address and also 'Authenticated sender'
|
||||
#
|
||||
#/^Received: from (.* \([-._[:alnum:]]+ \[[.[:digit:]]{7,15}\]\))(.*)\(Authenticated sender: ([^)]+)\)(.*)/ REPLACE Received: from anonymized.ipv4 (localhost [127.0.0.1])$2(Authenticated sender: hidden)$4
|
||||
#
|
||||
#/^Received: from (.*IP[vV]6:(([0-9a-f]{0,4}:){1,7}[0-9a-f]{1,4})\]\){0,1})(.*)\(Authenticated sender: ([^)]+)\)(.*)/ REPLACE Received: from anonymized.ipv6 (localhost [::1])$4(Authenticated sender: hidden)$6
|
||||
|
||||
# - Replace recieved from IPv4 / IPv6 header - hide only sender IP address
|
||||
#
|
||||
#/^Received: from (.* \([-._[:alnum:]]+ \[[.[:digit:]]{7,15}\]\))(.*)\(Authenticated sender: (.*) / REPLACE Received: from anonymized.ipv4 (localhost [127.0.0.1])$2(Authenticated sender: $3
|
||||
|
||||
#/^Received: from (.*IP[vV]6:(([0-9a-f]{0,4}:){1,7}[0-9a-f]{1,4})\]\){0,1})(.*)\(Authenticated sender: (.*) / REPLACE Received: from anonymized.ipv6 (localhost [::1])$4(Authenticated sender: $5
|
||||
|
||||
# ---
|
||||
# - Ignore Headers
|
||||
# ---
|
||||
|
||||
#/^\s*User-Agent/ IGNORE
|
||||
#/^\s*X-Enigmail/ IGNORE
|
||||
#/^\s*X-Mailer/ IGNORE
|
||||
#/^\s*X-Originating-IP/ IGNORE
|
||||
|
||||
|
||||
# ---
|
||||
# - Reject / Discard headers
|
||||
# ---
|
||||
|
||||
/^To:.*<>/ REJECT Possible SPAM Blank email address To: header - Header-Spamschutzregel T0-1001
|
||||
|
||||
/\(envelope-from <>\)/ REJECT Possible SPAM - Header-Spamschutzregel RECIEV-1001
|
||||
|
||||
/^Reply-To: .+\@inx1and1\..+/ REJECT Possible SPAM - Header-Spamschutzregel REPLY-1001
|
||||
|
||||
/^From:.*<>/ REJECT Possible SPAM - Header-Spamschutzregel FROM-1001
|
||||
|
||||
/^Date: .* 19[0-9][0-9]/ REJECT Date from the past. Fix your system clock. - Header-Spamschutzregel DATE-1001
|
||||
/^Date: .* 200[0-9]/ REJECT Date from the past. Fix your system clock. - Header-Spamschutzregel DATE-1002
|
||||
/^Date: .* 201[0-9]/ REJECT Date from the past. Fix your system clock. - Header-Spamschutzregel DATE-1003
|
||||
/^Date: .* 2020/ REJECT Date from the past. Fix your system clock. - Header-Spamschutzregel DATE-1004
|
||||
Reference in New Issue
Block a user