I am trying to create a Transport rule to automatically add the shared email address when received after hours (8am-5pm).
The current idea is to use the "when the message header matches text patterns" condition on the "Received" header to detect if the email was received using hour values.
Received Header example:
from mail.test.com (0.0.0.0) by
mail.local.host.com (0.0.0.0) with Microsoft SMTP Server (TLS) id
14.1.438.0; Thu, 11 Apr 2019 05:07:44 -0500
After Hour Patterns:
; (Mon|Tue|Wed|Thu|Fri), (\d|\d\d) \w\w\w 20\d\d (00|01|02|03|04|05|06|07|17|18|19|20|21|22|23):\d\d:\d\d -05
; (Sat|Sun), (\d|\d\d) \w\w\w 20\d\d \d\d:\d\d:\d\d -05
RegExr Link-Received After Hours
I thought the above patterns were working, but the next morning the shared email address was still being added to the emails and I am not sure why. I do know it seems that certain patterns don't seem to be supported. I did limit myself to this documentation:Regular Expressions in Transport Rules. There also seems to be a 128 character limit for the pattern.
Any help would be appreciated.