Update filters
This commit is contained in:
@@ -17,7 +17,9 @@ BLOCK_KEYWORDS = [
|
||||
'email preferences',
|
||||
'end these email updates',
|
||||
'manage your preferences',
|
||||
'megacast',
|
||||
'modify your preferences',
|
||||
'newsletter',
|
||||
'opt-out',
|
||||
'opt out',
|
||||
'prefer not to receive',
|
||||
@@ -44,14 +46,18 @@ BLOCK_DOMAINS = [
|
||||
'customeriomail.com',
|
||||
'exacttarget.com',
|
||||
'freshsales.io',
|
||||
'ikigailabs.io',
|
||||
'informareachmedia.com',
|
||||
'javentechnologies.com',
|
||||
'mailgun.net',
|
||||
'malwarebytes.com',
|
||||
'mktomail.com',
|
||||
'norstar.net',
|
||||
'pphosted.com',
|
||||
'radware.com',
|
||||
'sendgrid.net',
|
||||
'sparkpostmail.com',
|
||||
'techmate.com',
|
||||
'thesourcery.com',
|
||||
'trustedmailservers.com',
|
||||
'znsrc.com'
|
||||
@@ -60,6 +66,7 @@ BLOCK_DOMAINS = [
|
||||
BLOCK_ANNOYING = [
|
||||
'charitable fund drive',
|
||||
'election reminder',
|
||||
'faculty senate',
|
||||
'food drive',
|
||||
'food share',
|
||||
'general election',
|
||||
@@ -104,7 +111,8 @@ def filter_message(self, message):
|
||||
automated_sources = [
|
||||
'coresys@lists.oregonstate.edu',
|
||||
'iar.ref@oregonstate.edu',
|
||||
'iar.systems-team@oregonstate.edu'
|
||||
'iar.systems-team@oregonstate.edu',
|
||||
'changes_osu@heliocampus.com'
|
||||
]
|
||||
if bool([x for x in automated_sources if(x in normalized_from)]):
|
||||
unactionable = [x.lower() for x in [
|
||||
@@ -128,7 +136,8 @@ def filter_message(self, message):
|
||||
'Direct Payment Request',
|
||||
'Status Change in your Detail Code Request',
|
||||
'loaded into the Index Reimbursement System',
|
||||
'JV required for'
|
||||
'JV required for',
|
||||
'Changes via Tableau REST API at OSU'
|
||||
]]
|
||||
if is_in_message(unactionable, message):
|
||||
self._log_result(message, 'moving to unactionable')
|
||||
@@ -154,6 +163,18 @@ def filter_message(self, message):
|
||||
move_message(message, 'unactionable')
|
||||
return
|
||||
|
||||
# filter ACTWON
|
||||
if 'actwon_administration@lists.oregonstate.edu' in normalized_from:
|
||||
self._log_result(message, 'moving to ACTWON')
|
||||
move_message(message, 'lists/ACTWON')
|
||||
return
|
||||
|
||||
# filter ACUG
|
||||
if 'isacug@oregonstate.edu' in normalized_to:
|
||||
self._log_result(message, 'moving to ACUG')
|
||||
move_message(message, 'lists/ACUG')
|
||||
return
|
||||
|
||||
# filter alerts-sig
|
||||
if (normalized_from in ['mcc-b11-stor1@oregonstate.edu',
|
||||
'mcc-b12-stor1@oregonstate.edu',
|
||||
@@ -162,13 +183,13 @@ def filter_message(self, message):
|
||||
'me4012@sig.oregonstate.edu']
|
||||
or 'alarm.DatastoreDiskUsageAlarm' in message.subject):
|
||||
self._log_result(message, 'moving to alerts-sig')
|
||||
move_message(message, 'alerts-sig')
|
||||
move_message(message, 'lists/alerts-sig')
|
||||
return
|
||||
|
||||
# filter backup-nightly
|
||||
if 'backup-nightly@lists.oregonstate.edu' in message.to:
|
||||
self._log_result(message, 'moving to backup-nightly')
|
||||
move_message(message, 'backup-nightly')
|
||||
move_message(message, 'lists/backup-nightly')
|
||||
return
|
||||
|
||||
# delete conference spam
|
||||
@@ -261,6 +282,7 @@ def init_filters(self):
|
||||
for k,v in self._folders.items():
|
||||
folder_cache[k] = v
|
||||
|
||||
# normalize filter keyword lists
|
||||
normalized['BLOCK_KEYWORDS'] = [x.lower() for x in BLOCK_KEYWORDS]
|
||||
normalized['BLOCK_ANNOYING'] = [x.lower() for x in BLOCK_ANNOYING]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user