Last active
March 7, 2022 15:17
-
-
Save adamalbers/9e889e94e808f4bc5267d5c1bfea06b3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Quarantines any emails using $blockedCharsets | |
# Supported charsets: https://docs.microsoft.com/en-us/exchange/mail-flow-best-practices/remote-domains/supported-character-sets | |
$allowedCharsets = @('UTF-8','US-ASCII','ISO-8859-1','WINDOWS-1252') | |
$blockedCharsetWords = @('big5','euc','gb','iso','koi','ks','ns','sen','shift','windows') | |
New-TransportRule -Name "Block Abnormal Charsets" -ContentCharacterSetContainsWords $blockedCharsetWords -ExceptIfContentCharacterSetContainsWords $allowedCharsets -Quarantine $true -Priority 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment