@@ -54,7 +54,13 @@ function Invoke-AddEditTransportRule {
5454 $FromAddressMatchesPatterns = $Request.Body.FromAddressMatchesPatterns
5555 $AttachmentContainsWords = $Request.Body.AttachmentContainsWords
5656 $AttachmentMatchesPatterns = $Request.Body.AttachmentMatchesPatterns
57+ $AttachmentNameMatchesPatterns = $Request.Body.AttachmentNameMatchesPatterns
58+ $AttachmentPropertyContainsWords = $Request.Body.AttachmentPropertyContainsWords
5759 $AttachmentExtensionMatchesWords = $Request.Body.AttachmentExtensionMatchesWords
60+ $AttachmentHasExecutableContent = $Request.Body.AttachmentHasExecutableContent
61+ $AttachmentIsPasswordProtected = $Request.Body.AttachmentIsPasswordProtected
62+ $AttachmentIsUnsupported = $Request.Body.AttachmentIsUnsupported
63+ $AttachmentProcessingLimitExceeded = $Request.Body.AttachmentProcessingLimitExceeded
5864 $AttachmentSizeOver = $Request.Body.AttachmentSizeOver
5965 $MessageSizeOver = $Request.Body.MessageSizeOver
6066 $SCLOver = $Request.Body.SCLOver
@@ -99,6 +105,7 @@ function Invoke-AddEditTransportRule {
99105 $ApplyHtmlDisclaimerLocation = $Request.Body.ApplyHtmlDisclaimerLocation
100106 $ApplyHtmlDisclaimerFallbackAction = $Request.Body.ApplyHtmlDisclaimerFallbackAction
101107 $GenerateIncidentReport = $Request.Body.GenerateIncidentReport
108+ $IncidentReportContent = $Request.Body.IncidentReportContent
102109 $GenerateNotification = $Request.Body.GenerateNotification
103110 $ApplyOME = $Request.Body.ApplyOME
104111
@@ -117,7 +124,13 @@ function Invoke-AddEditTransportRule {
117124 $ExceptIfFromAddressMatchesPatterns = $Request.Body.ExceptIfFromAddressMatchesPatterns
118125 $ExceptIfAttachmentContainsWords = $Request.Body.ExceptIfAttachmentContainsWords
119126 $ExceptIfAttachmentMatchesPatterns = $Request.Body.ExceptIfAttachmentMatchesPatterns
127+ $ExceptIfAttachmentNameMatchesPatterns = $Request.Body.ExceptIfAttachmentNameMatchesPatterns
128+ $ExceptIfAttachmentPropertyContainsWords = $Request.Body.ExceptIfAttachmentPropertyContainsWords
120129 $ExceptIfAttachmentExtensionMatchesWords = $Request.Body.ExceptIfAttachmentExtensionMatchesWords
130+ $ExceptIfAttachmentHasExecutableContent = $Request.Body.ExceptIfAttachmentHasExecutableContent
131+ $ExceptIfAttachmentIsPasswordProtected = $Request.Body.ExceptIfAttachmentIsPasswordProtected
132+ $ExceptIfAttachmentIsUnsupported = $Request.Body.ExceptIfAttachmentIsUnsupported
133+ $ExceptIfAttachmentProcessingLimitExceeded = $Request.Body.ExceptIfAttachmentProcessingLimitExceeded
121134 $ExceptIfAttachmentSizeOver = $Request.Body.ExceptIfAttachmentSizeOver
122135 $ExceptIfMessageSizeOver = $Request.Body.ExceptIfMessageSizeOver
123136 $ExceptIfSCLOver = $Request.Body.ExceptIfSCLOver
@@ -266,13 +279,16 @@ function Invoke-AddEditTransportRule {
266279 $FromAddressMatchesPatterns = Process - TextArrayField - Field $FromAddressMatchesPatterns
267280 $AttachmentContainsWords = Process - TextArrayField - Field $AttachmentContainsWords
268281 $AttachmentMatchesPatterns = Process - TextArrayField - Field $AttachmentMatchesPatterns
282+ $AttachmentNameMatchesPatterns = Process - TextArrayField - Field $AttachmentNameMatchesPatterns
283+ $AttachmentPropertyContainsWords = Process - TextArrayField - Field $AttachmentPropertyContainsWords
269284 $AttachmentExtensionMatchesWords = Process - TextArrayField - Field $AttachmentExtensionMatchesWords
270285 $RecipientAddressContainsWords = Process - TextArrayField - Field $RecipientAddressContainsWords
271286 $RecipientAddressMatchesPatterns = Process - TextArrayField - Field $RecipientAddressMatchesPatterns
272287 $AnyOfRecipientAddressContainsWords = Process - TextArrayField - Field $AnyOfRecipientAddressContainsWords
273288 $AnyOfRecipientAddressMatchesPatterns = Process - TextArrayField - Field $AnyOfRecipientAddressMatchesPatterns
274289 $HeaderContainsWords = Process - TextArrayField - Field $HeaderContainsWords
275290 $HeaderMatchesPatterns = Process - TextArrayField - Field $HeaderMatchesPatterns
291+ $IncidentReportContent = Process - TextArrayField - Field $IncidentReportContent
276292
277293 # Process exception text array fields
278294 $ExceptIfSubjectContainsWords = Process - TextArrayField - Field $ExceptIfSubjectContainsWords
@@ -283,6 +299,8 @@ function Invoke-AddEditTransportRule {
283299 $ExceptIfFromAddressMatchesPatterns = Process - TextArrayField - Field $ExceptIfFromAddressMatchesPatterns
284300 $ExceptIfAttachmentContainsWords = Process - TextArrayField - Field $ExceptIfAttachmentContainsWords
285301 $ExceptIfAttachmentMatchesPatterns = Process - TextArrayField - Field $ExceptIfAttachmentMatchesPatterns
302+ $ExceptIfAttachmentNameMatchesPatterns = Process - TextArrayField - Field $ExceptIfAttachmentNameMatchesPatterns
303+ $ExceptIfAttachmentPropertyContainsWords = Process - TextArrayField - Field $ExceptIfAttachmentPropertyContainsWords
286304 $ExceptIfAttachmentExtensionMatchesWords = Process - TextArrayField - Field $ExceptIfAttachmentExtensionMatchesWords
287305 $ExceptIfRecipientAddressContainsWords = Process - TextArrayField - Field $ExceptIfRecipientAddressContainsWords
288306 $ExceptIfRecipientAddressMatchesPatterns = Process - TextArrayField - Field $ExceptIfRecipientAddressMatchesPatterns
@@ -366,9 +384,27 @@ function Invoke-AddEditTransportRule {
366384 if ($null -ne $AttachmentMatchesPatterns -and $AttachmentMatchesPatterns.Count -gt 0 ) {
367385 $ruleParams.Add (' AttachmentMatchesPatterns' , $AttachmentMatchesPatterns )
368386 }
387+ if ($null -ne $AttachmentNameMatchesPatterns -and $AttachmentNameMatchesPatterns.Count -gt 0 ) {
388+ $ruleParams.Add (' AttachmentNameMatchesPatterns' , $AttachmentNameMatchesPatterns )
389+ }
390+ if ($null -ne $AttachmentPropertyContainsWords -and $AttachmentPropertyContainsWords.Count -gt 0 ) {
391+ $ruleParams.Add (' AttachmentPropertyContainsWords' , $AttachmentPropertyContainsWords )
392+ }
369393 if ($null -ne $AttachmentExtensionMatchesWords -and $AttachmentExtensionMatchesWords.Count -gt 0 ) {
370394 $ruleParams.Add (' AttachmentExtensionMatchesWords' , $AttachmentExtensionMatchesWords )
371395 }
396+ if ($null -ne $AttachmentHasExecutableContent ) {
397+ $ruleParams.Add (' AttachmentHasExecutableContent' , $AttachmentHasExecutableContent )
398+ }
399+ if ($null -ne $AttachmentIsPasswordProtected ) {
400+ $ruleParams.Add (' AttachmentIsPasswordProtected' , $AttachmentIsPasswordProtected )
401+ }
402+ if ($null -ne $AttachmentIsUnsupported ) {
403+ $ruleParams.Add (' AttachmentIsUnsupported' , $AttachmentIsUnsupported )
404+ }
405+ if ($null -ne $AttachmentProcessingLimitExceeded ) {
406+ $ruleParams.Add (' AttachmentProcessingLimitExceeded' , $AttachmentProcessingLimitExceeded )
407+ }
372408 if ($null -ne $AttachmentSizeOver ) { $ruleParams.Add (' AttachmentSizeOver' , $AttachmentSizeOver ) }
373409 if ($null -ne $MessageSizeOver ) { $ruleParams.Add (' MessageSizeOver' , $MessageSizeOver ) }
374410 if ($null -ne $SCLOver ) {
@@ -476,6 +512,9 @@ function Invoke-AddEditTransportRule {
476512 }
477513 if ($null -ne $GenerateIncidentReport -and $GenerateIncidentReport.Count -gt 0 ) {
478514 $ruleParams.Add (' GenerateIncidentReport' , $GenerateIncidentReport )
515+ if ($null -ne $IncidentReportContent -and $IncidentReportContent.Count -gt 0 ) {
516+ $ruleParams.Add (' IncidentReportContent' , $IncidentReportContent )
517+ }
479518 }
480519 if ($null -ne $GenerateNotification -and $GenerateNotification -ne ' ' ) {
481520 $ruleParams.Add (' GenerateNotification' , $GenerateNotification )
@@ -519,9 +558,27 @@ function Invoke-AddEditTransportRule {
519558 if ($null -ne $ExceptIfAttachmentMatchesPatterns -and $ExceptIfAttachmentMatchesPatterns.Count -gt 0 ) {
520559 $ruleParams.Add (' ExceptIfAttachmentMatchesPatterns' , $ExceptIfAttachmentMatchesPatterns )
521560 }
561+ if ($null -ne $ExceptIfAttachmentNameMatchesPatterns -and $ExceptIfAttachmentNameMatchesPatterns.Count -gt 0 ) {
562+ $ruleParams.Add (' ExceptIfAttachmentNameMatchesPatterns' , $ExceptIfAttachmentNameMatchesPatterns )
563+ }
564+ if ($null -ne $ExceptIfAttachmentPropertyContainsWords -and $ExceptIfAttachmentPropertyContainsWords.Count -gt 0 ) {
565+ $ruleParams.Add (' ExceptIfAttachmentPropertyContainsWords' , $ExceptIfAttachmentPropertyContainsWords )
566+ }
522567 if ($null -ne $ExceptIfAttachmentExtensionMatchesWords -and $ExceptIfAttachmentExtensionMatchesWords.Count -gt 0 ) {
523568 $ruleParams.Add (' ExceptIfAttachmentExtensionMatchesWords' , $ExceptIfAttachmentExtensionMatchesWords )
524569 }
570+ if ($null -ne $ExceptIfAttachmentHasExecutableContent ) {
571+ $ruleParams.Add (' ExceptIfAttachmentHasExecutableContent' , $ExceptIfAttachmentHasExecutableContent )
572+ }
573+ if ($null -ne $ExceptIfAttachmentIsPasswordProtected ) {
574+ $ruleParams.Add (' ExceptIfAttachmentIsPasswordProtected' , $ExceptIfAttachmentIsPasswordProtected )
575+ }
576+ if ($null -ne $ExceptIfAttachmentIsUnsupported ) {
577+ $ruleParams.Add (' ExceptIfAttachmentIsUnsupported' , $ExceptIfAttachmentIsUnsupported )
578+ }
579+ if ($null -ne $ExceptIfAttachmentProcessingLimitExceeded ) {
580+ $ruleParams.Add (' ExceptIfAttachmentProcessingLimitExceeded' , $ExceptIfAttachmentProcessingLimitExceeded )
581+ }
525582 if ($null -ne $ExceptIfAttachmentSizeOver ) {
526583 $ruleParams.Add (' ExceptIfAttachmentSizeOver' , $ExceptIfAttachmentSizeOver )
527584 }
0 commit comments