You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add-CippTestResult-TenantFilter $Tenant-TestId 'ORCA235'-TestType 'Identity'-Status 'Skipped'-ResultMarkdown 'No accepted domains found in database.'-Risk 'High'-Name 'SPF records setup for custom domains'-UserImpact 'High'-ImplementationEffort 'Medium'-Category 'Configuration'
11
+
if (-not$Results) {
12
+
Add-CippTestResult-TenantFilter $Tenant-TestId 'ORCA235'-TestType 'Identity'-Status 'Skipped'-ResultMarkdown 'No Domain Analyser results found for this tenant. Run the CIPP Domain Analyser to populate domain health data.'-Risk 'High'-Name 'SPF records setup for custom domains'-UserImpact 'High'-ImplementationEffort 'Medium'-Category 'Configuration'
13
13
return
14
14
}
15
15
16
-
#Note: This test would ideally check DNS SPF records
17
-
# Since we don't have DNS query capability here, we'll provide informational guidance
16
+
#ORCA scopes this to custom domains; onmicrosoft.com is handled by Microsoft.
$Result= [System.Text.StringBuilder]::new("All $($PassedDomains.Count) custom domains have a valid SPF record ending in -all.")
25
47
} else {
26
-
$Status='Informational'
27
-
$Result= [System.Text.StringBuilder]::new("Found $($CustomDomains.Count) custom domains that should have SPF records configured.`n`n")
28
-
$null=$Result.Append("**Custom Domains:**`n`n")
29
-
foreach ($Domainin$CustomDomains) {
30
-
$null=$Result.Append("- $($Domain.DomainName)`n")
48
+
$Status='Failed'
49
+
$Result= [System.Text.StringBuilder]::new("$($FailedDomains.Count) of $($CustomDomains.Count) custom domains are missing a valid SPF record or do not end in -all (hard fail).`n`n")
50
+
$null=$Result.Append("| Domain | SPF Record |`n| :----- | :--------- |`n")
$null=$Result.Append("`n**Remediation:** Publish an SPF TXT record ending in `-all` (hard fail). For Microsoft 365 only: `v=spf1 include:spf.protection.outlook.com -all`. If routing through a third-party gateway, include that provider alongside (e.g. Mimecast, Proofpoint, marketing services), but keep `-all` at the end. Avoid `~all`, `?all`, and especially `+all`.")
34
56
}
35
57
36
58
Add-CippTestResult-TenantFilter $Tenant-TestId 'ORCA235'-TestType 'Identity'-Status $Status-ResultMarkdown $Result-Risk 'High'-Name 'SPF records setup for custom domains'-UserImpact 'High'-ImplementationEffort 'Medium'-Category 'Configuration'
0 commit comments