From 6e942d329ff90d0b087c5a01a55a18dd720ceba5 Mon Sep 17 00:00:00 2001 From: Stacy Brock Date: Thu, 14 Dec 2023 09:27:09 -0800 Subject: [PATCH] Update filters --- filter-rules.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/filter-rules.py b/filter-rules.py index 22e79ac..e99503f 100644 --- a/filter-rules.py +++ b/filter-rules.py @@ -63,6 +63,7 @@ BLOCK_DOMAINS = [ 'exacttarget.com', 'freshsales.io', 'ikigailabs.io', + 'impetus.com', 'informareachmedia.com', 'javentechnologies.com', 'kuusakoski.com', @@ -184,7 +185,7 @@ def filter_message(self, message): 'Changes via Tableau REST API at OSU', 'DSDBTEST', 'has been assigned to you or your queue', - 'VMock CSV S3 Upload Failed', + 'VMock CSV S3 Upload', 'Your Daily Digest for Oregon State University' ]] if is_in_message(unactionable, message): @@ -292,9 +293,14 @@ def filter_message(self, message): move_message(message, 'Junk Email') return - # add category to internal messages sent to DLs - if '@oregonstate.edu' in normalized_from and not get_header('To', headers): + # add 'OSU Inform' category to internal messages sent to DLs + if ('@oregonstate.edu' in normalized_from + and ((not get_header('To', headers) + and not get_header('List-Id', headers)) + or ('inform-c' in ' '.join(normalized_to)))): + self._log_result(message, "adding category 'OSU Inform'") add_category(message, 'OSU Inform') + return # keep messages from allowed emails and domains for good in ALLOW: