Update filters

This commit is contained in:
Stacy Brock
2021-08-14 09:58:30 -07:00
parent 27986cec22
commit 7326b3667d

View File

@@ -11,6 +11,7 @@ BLOCK_EMAIL = [
]
BLOCK_KEYWORDS = [
'email campaign',
'email preferences',
'end these email updates',
'manage your preferences',
@@ -23,6 +24,7 @@ BLOCK_KEYWORDS = [
'sidekickopen',
'subscription preferences',
'survey',
'this advertisement',
'unsubscribe',
'want to receive',
'webinar',
@@ -31,9 +33,15 @@ BLOCK_KEYWORDS = [
]
BLOCK_DOMAINS = [
'bytespeed.com',
'cmadvantage',
'customeriomail.com',
'freshsales.io',
'mailgun.net',
'norstar.net'
'mktomail.com',
'norstar.net',
'pphosted.com',
'sparkpostmail.com'
]
BLOCK_ANNOYING = [
@@ -66,7 +74,8 @@ ALLOW = [
'megan@pdxwit.org',
'busyconf.com',
'support@githubsupport.com',
'microsoft.com'
'microsoft.com',
'pmoxon@denodo.com'
]
normalized = {}
@@ -77,12 +86,29 @@ def filter_message(self, message):
normalized_to = [x.address.lower() for x in message.to]
normalized_from = message.sender.address.lower()
# filter unactionable coresys emails
if 'coresys@lists.oregonstate.edu' in normalized_from:
# filter unactionable coresys, IAR Systems emails
if ('coresys@lists.oregonstate.edu' in normalized_from
or 'iar.ref@oregonstate.edu' in normalized_from
or 'iar.systems-team@oregonstate.edu' in normalized_to):
unactionable = [x.lower() for x in [
'DWPRODRAW Verification',
'BFPDB Reimbursement Job Monitor - OK',
'DSDB Important Job Monitor - OK'
'Job Monitor',
'Operating Ledger - OK',
'ScholarUniverse to GRRS load',
'OACIS Pending Actions Notice',
'You Have OSUF Disapproved Reimbursements',
'Your GRRS to Banner scholarship load report',
'You Have OSUF Reimbursements to Review',
'You Have Scholarship Payment Plans to Review',
'You Have Direct Payment Requests to Review',
'You Have Disapproved Scholarship Payment Plans',
'OSUF Reimbursements Needing Your Prompt Attention',
'Redistribution Verification Error',
'Please print your 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',
'SEC_USERS Audit Update'
]]
if is_in_message(unactionable, message):
self._log_result(message, 'moving to unactionable')
@@ -93,7 +119,8 @@ def filter_message(self, message):
if (normalized_from in ['mcc-b11-stor1@oregonstate.edu',
'mcc-b12-stor1@oregonstate.edu',
'ousclus@oregonstate.edu',
'isilon@storage.sig.oregonstate.edu']
'isilon@storage.sig.oregonstate.edu',
'me4012@sig.oregonstate.edu']
or 'alarm.DatastoreDiskUsageAlarm' in message.subject):
self._log_result(message, 'moving to alerts-sig')
move_message(message, 'alerts-sig')