From f4f81e32706b4e84d8236bbd944b09545c66d69c Mon Sep 17 00:00:00 2001 From: Stacy Brock Date: Wed, 1 Sep 2021 10:04:10 -0700 Subject: [PATCH] Update filters --- filter-rules.py | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/filter-rules.py b/filter-rules.py index 9f246c9..9e8afd7 100644 --- a/filter-rules.py +++ b/filter-rules.py @@ -100,6 +100,7 @@ def filter_message(self, message): 'DWPRODRAW Verification', 'Job Monitor', 'Operating Ledger - OK', + 'Oracle ODprod Sessions Older Than Today', 'ScholarUniverse to GRRS load', 'OACIS Pending Actions Notice', 'You Have OSUF Disapproved Reimbursements', @@ -110,7 +111,7 @@ def filter_message(self, message): 'You Have Disapproved Scholarship Payment Plans', 'OSUF Reimbursements Needing Your Prompt Attention', 'Redistribution Verification Error', - 'Please print your Direct Payment Request', + 'Direct Payment Request', 'Status Change in your Detail Code Request', 'loaded into the Index Reimbursement System', 'UserBase.Users users deactivated due to ORG changes and termination', @@ -121,6 +122,25 @@ def filter_message(self, message): move_message(message, 'unactionable') return + # filter unactionable InCommon SSL cert emails + if 'support@cert-manager.com' in normalized_from: + actionable = [ + 'iar', + 'sig', + 'analytics', + 'cwp-access', + 'dsdb', + 'tableau' + ] + if is_in_message(actionable, message): + self._log_result(message, + f"keeping message for actionable SSL notification") + return + else: + self._log_result(message, 'moving to unactionable') + move_message(message, 'unactionable') + return + # filter alerts-sig if (normalized_from in ['mcc-b11-stor1@oregonstate.edu', 'mcc-b12-stor1@oregonstate.edu', @@ -173,7 +193,6 @@ def filter_message(self, message): if is_in_message(normalized['BLOCK_KEYWORDS'], message): self._log_result(message, 'junking spam containing blocked keyword') move_message(message, 'Junk Email') - return # process message headers into a sane data structure