Skip to content

Commit

Permalink
check Reply-To header for known spammers too
Browse files Browse the repository at this point in the history
  • Loading branch information
thestinger committed Sep 1, 2024
1 parent 5c4d81b commit 04de28b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions generate-blocklist
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ with (open("postfix/sender_access", "w") as sender_access,
open("blocklist/strings.txt") as strings):
for domain in domains.read().splitlines():
print(f"{domain} REJECT", file=sender_access)
print(f"/^From:.*<.*@{domain}>.*/ REJECT", file=header_checks)
print(f"/^(From|Reply-To):.*<.*@(.*\\.)?{domain}>.*/ REJECT", file=header_checks)

print(file=sender_access)
print(file=header_checks)

for address in addresses.read().splitlines():
print(f"{address} REJECT", file=sender_access)
print(f"/^From:.*<{address}>.*/ REJECT", file=header_checks)
print(f"/^(From|Reply-To):.*<{address}>.*/ REJECT", file=header_checks)

for string in strings.read().splitlines():
print(f"/{string}/ REJECT", file=body_checks)

0 comments on commit 04de28b

Please sign in to comment.