Skip to content
Snippets Groups Projects
Commit eb1fa146 authored by Jan Philipp Timme's avatar Jan Philipp Timme
Browse files

Do not be case sensitive when comparing domains

parent 436c7db7
Branches
No related tags found
No related merge requests found
......@@ -83,6 +83,7 @@ class SuspiciousFrom(Milter.Base):
decoded_from = normalizeRawFromHeader(decoded_from)
logger.info(f"({self.id}) \"From:\" decoded cleaned: '{decoded_from}'")
all_domains = address_domain_regex.findall(decoded_from)
all_domains = [a.lower() for a in all_domains]
if len(all_domains) == 0:
logger.warning(f"({self.id}) No domain in decoded \"From:\" - WTF! OK, though")
self.set_suspicious_headers(False, "No domains in decoded FROM")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment