Update filters
This commit is contained in:
@@ -12,11 +12,11 @@ BLOCK_EMAIL = [
|
||||
|
||||
BLOCK_KEYWORDS = [
|
||||
'advertising services',
|
||||
'closeml.com',
|
||||
'email campaign',
|
||||
'email preferences',
|
||||
'end these email updates',
|
||||
'hs-sales-engage.com',
|
||||
'long term care',
|
||||
'marketing',
|
||||
'megacast',
|
||||
'my subscription',
|
||||
@@ -191,7 +191,7 @@ def filter_message(self, message):
|
||||
]]
|
||||
if is_in_message(unactionable, message):
|
||||
self._log_result(message, 'moving to unactionable')
|
||||
move_message(message, 'unactionable')
|
||||
move_message(message, 'zzz-unactionable')
|
||||
return
|
||||
|
||||
# filter unactionable InCommon SSL cert emails
|
||||
@@ -210,7 +210,7 @@ def filter_message(self, message):
|
||||
return
|
||||
else:
|
||||
self._log_result(message, 'moving to unactionable')
|
||||
move_message(message, 'unactionable')
|
||||
move_message(message, 'zzz-unactionable')
|
||||
return
|
||||
|
||||
# filter Student CRM
|
||||
@@ -220,21 +220,21 @@ def filter_message(self, message):
|
||||
]
|
||||
if is_in_message(unactionable, message):
|
||||
self._log_result(message, 'moving to unactionable')
|
||||
move_message(message, 'unactionable')
|
||||
move_message(message, 'zzz-unactionable')
|
||||
return
|
||||
|
||||
# filter dependabot
|
||||
if 'dependabot[bot]' in str(message.sender):
|
||||
if ('dependabot[bot]' in str(message.sender)
|
||||
or is_in_message(['Your Dependabot alerts'], message)):
|
||||
self._log_result(message, 'moving to dependabot')
|
||||
move_message(message, 'zzz-dependabot')
|
||||
return
|
||||
|
||||
# filter ACTWON
|
||||
if 'actwon_administration@lists.oregonstate.edu' in normalized_from:
|
||||
if not is_in_message(['stacy brock', 'mist', 'integration'], message):
|
||||
self._log_result(message, 'moving to ACTWON')
|
||||
move_message(message, 'lists/ACTWON')
|
||||
return
|
||||
self._log_result(message, 'moving to ACTWON')
|
||||
move_message(message, 'lists/ACTWON')
|
||||
return
|
||||
|
||||
# filter ACUG
|
||||
if 'isacug@oregonstate.edu' in normalized_to:
|
||||
@@ -268,7 +268,7 @@ def filter_message(self, message):
|
||||
# filter quarantine spam
|
||||
if 'quarantine@messaging.microsoft.com' in normalized_from:
|
||||
self._log_result(message, 'moving to unactionable')
|
||||
move_message(message, 'unactionable')
|
||||
move_message(message, 'zzz-unactionable')
|
||||
return
|
||||
|
||||
# delete Atlassian spam
|
||||
@@ -379,7 +379,8 @@ def is_in_message(list_, message):
|
||||
message_subject = message.subject.lower()
|
||||
message_from = message.sender.address.lower()
|
||||
|
||||
for term in list_:
|
||||
for t in list_:
|
||||
term = t.lower()
|
||||
if (term in message_subject or term in message_from
|
||||
or term in message_body):
|
||||
is_found = True
|
||||
|
||||
Reference in New Issue
Block a user