Hi,
Is it possible to add a Mail Flow rule for an AD Synced mail-enabled security group?
This is my general layout:
If the message...
'To' header matches the following patterns: 'AllEmployees'
and Is received from 'Outside the organization'
Do the following...
reject the message and include the explanation 'Non-Coprate domain detected - Contact xyz@domain.com if you believe this is wrong.' with the status code: '5.7.1'
Except if...
sender's address domain portion belongs to any of these domains: 'customdomain1.com'
This rule doesn't work.
I have also tried the "To box contains" (it dosen't work either) according to https://docs.microsoft.com/en-us/exchange/security-and-compliance/mail-flow-rules/conditions-and-exceptions#recipients that one should be used as the "The recipient is" don't match distribution groups.
Any advice?
BR
Johannes