Skip to content

Commit 99ff31f

Browse files
committed
feat: Added AllowedSenderDomains to SpamFilter
1 parent 43c22f5 commit 99ff31f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Modules/CIPPCore/Public/Standards/Invoke-CIPPStandardSpamFilterPolicy.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ function Invoke-CIPPStandardSpamFilterPolicy {
100100
($CurrentState.EnableLanguageBlockList -eq $Settings.EnableLanguageBlockList) -and
101101
((-not $CurrentState.LanguageBlockList -and -not $Settings.LanguageBlockList.value) -or (!(Compare-Object -ReferenceObject $CurrentState.LanguageBlockList -DifferenceObject $Settings.LanguageBlockList.value))) -and
102102
($CurrentState.EnableRegionBlockList -eq $Settings.EnableRegionBlockList) -and
103-
((-not $CurrentState.RegionBlockList -and -not $Settings.RegionBlockList.value) -or (!(Compare-Object -ReferenceObject $CurrentState.RegionBlockList -DifferenceObject $Settings.RegionBlockList.value)))
103+
((-not $CurrentState.RegionBlockList -and -not $Settings.RegionBlockList.value) -or (!(Compare-Object -ReferenceObject $CurrentState.RegionBlockList -DifferenceObject $Settings.RegionBlockList.value))) -and
104+
(!(Compare-Object -ReferenceObject $CurrentState.AllowedSenderDomains -DifferenceObject ($Settings.AllowedSenderDomains.value ?? $Settings.AllowedSenderDomains)))
104105

105106
$AcceptedDomains = New-ExoRequest -TenantId $Tenant -cmdlet 'Get-AcceptedDomain'
106107

@@ -153,6 +154,7 @@ function Invoke-CIPPStandardSpamFilterPolicy {
153154
LanguageBlockList = $Settings.LanguageBlockList.value
154155
EnableRegionBlockList = $Settings.EnableRegionBlockList
155156
RegionBlockList = $Settings.RegionBlockList.value
157+
AllowedSenderDomains = $Settings.AllowedSenderDomains.value ?? @{"@odata.type" = "#Exchange.GenericHashTable"}
156158
}
157159

158160
if ($CurrentState.Name -eq $PolicyName) {

0 commit comments

Comments
 (0)