From 57df5e254ce25d5c8e1149a4cfb61ab064b62cce Mon Sep 17 00:00:00 2001 From: link2xt Date: Sun, 15 Oct 2023 19:04:30 +0000 Subject: [PATCH] Require that encrypted messages have "..." as a Subject --- chatmaild/src/chatmaild/filtermail.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/chatmaild/src/chatmaild/filtermail.py b/chatmaild/src/chatmaild/filtermail.py index 90169bf6..b8388b43 100644 --- a/chatmaild/src/chatmaild/filtermail.py +++ b/chatmaild/src/chatmaild/filtermail.py @@ -14,6 +14,8 @@ def check_encrypted(content): message = BytesParser(policy=policy.default).parsebytes(content) if not message.is_multipart(): return False + if message.get("subject") != "...": + return False if message.get_content_type() != "multipart/encrypted": return False parts_count = 0