From eb1fa14665ddbae7dd5437c7bce4e3f6f6cfaa41 Mon Sep 17 00:00:00 2001 From: Jan Philipp Timme Date: Fri, 20 Dec 2019 12:45:04 +0100 Subject: [PATCH] Do not be case sensitive when comparing domains --- main.py | 1 + 1 file changed, 1 insertion(+) diff --git a/main.py b/main.py index 52222c7..d51952b 100644 --- a/main.py +++ b/main.py @@ -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")