Improve unactionable IAR email logic

This commit is contained in:
Stacy Brock
2021-09-02 14:48:47 -07:00
parent f4f81e3270
commit e3bf97e0e7

View File

@@ -92,10 +92,13 @@ def filter_message(self, message):
normalized_to = [x.address.lower() for x in message.to]
normalized_from = message.sender.address.lower()
# 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):
# filter unactionable IAR emails
automated_sources = [
'coresys@lists.oregonstate.edu',
'iar.ref@oregonstate.edu',
'Scholarship System'
]
if bool([x for x in automated_sources if(x in normalized_from)]):
unactionable = [x.lower() for x in [
'DWPRODRAW Verification',
'Job Monitor',