Speed up processing by loading folders and categories on 1st run
This commit will also - Update package requirements - Update filters
This commit is contained in:
@@ -62,6 +62,7 @@ BLOCK_DOMAINS = [
|
||||
'denodo.com',
|
||||
'exacttarget.com',
|
||||
'freshsales.io',
|
||||
'hrciconnect.com',
|
||||
'ikigailabs.io',
|
||||
'impetus.com',
|
||||
'informareachmedia.com',
|
||||
@@ -127,7 +128,7 @@ ALLOW = [
|
||||
'heliocampus.atlassian.net',
|
||||
'ctptravelservices.com',
|
||||
'Travel@concursolutions.com',
|
||||
'substack.com',
|
||||
'ghost.io',
|
||||
'nytdirect@nytimes.com'
|
||||
]
|
||||
|
||||
@@ -293,13 +294,10 @@ def filter_message(self, message):
|
||||
move_message(message, 'Junk Email')
|
||||
return
|
||||
|
||||
# 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')
|
||||
# add 'HelioCampus' category to messages from HC
|
||||
if '@heliocampus' in normalized_from:
|
||||
self._log_result(message, "adding category 'HelioCampus'")
|
||||
add_category(message, 'HelioCampus')
|
||||
return
|
||||
|
||||
# keep messages from allowed emails and domains
|
||||
@@ -343,6 +341,15 @@ def filter_message(self, message):
|
||||
move_message(message, 'Junk Email')
|
||||
return
|
||||
|
||||
# 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 MESSAGE
|
||||
self._log_result(message, 'keeping message, passed all filter checks')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user