Forum Discussion
Mail Flow Rules Syntax
You can use the "common attachment types filter" functionality for Malware policies as detailed here: https://docs.microsoft.com/en-us/office365/SecurityCompliance/configure-anti-malware-policies
The corresponding PowerShell cmdlets allow you to bulk add/remove file types, including custom ones.
I am strictly speaking about the mail flow rules. Is there a way to upload bulk words or phrases for the rules to look for? I am trying to create a rule that rejects a message if the attachment extension contains "words or phrases" in it, and I have a 90+ extension list to upload for these words or phrases. Is there a proper way of formatting when inputting these words or phrases? I feel as though manually copying and pasting each one will result in missing some.
- VasilMichevAug 01, 2018MVP
You can use the Set-TransportRule cmdlet, add the extensions to a list like the example below:
Set-TransportRule -AttachmentExtensionMatchesWords @('bbbb','aaaa')