diff options
| author | Christian Cleberg <[email protected]> | 2026-04-03 17:07:27 -0500 |
|---|---|---|
| committer | Christian Cleberg <[email protected]> | 2026-04-03 17:07:27 -0500 |
| commit | 8465ef359f88ddef7cad68a0c2e361bb0bfe58ff (patch) | |
| tree | 6b0c4dd9da3c50a617c4e5a6a99dd28ed50eaa80 /DomainDig/DomainViewModel.swift | |
| parent | 1e13dac952d8f6cce7964aef27e98fa2e9da1eb7 (diff) | |
| download | domain-dig-1.5.0.tar.gz domain-dig-1.5.0.tar.bz2 domain-dig-1.5.0.zip | |
Add BIMI and MTA-STS checks to email securityv1.5.0
Diffstat (limited to 'DomainDig/DomainViewModel.swift')
| -rw-r--r-- | DomainDig/DomainViewModel.swift | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/DomainDig/DomainViewModel.swift b/DomainDig/DomainViewModel.swift index 0ce2d8c..16eaabd 100644 --- a/DomainDig/DomainViewModel.swift +++ b/DomainDig/DomainViewModel.swift @@ -115,6 +115,7 @@ final class DomainViewModel { reachabilityResults: reachabilityResults, ipGeolocation: ipGeolocation, emailSecurity: emailSecurity, + mtaSts: emailSecurity?.mtaSts, ptrRecord: ptrRecord, redirectChain: redirectChain, portScanResults: portScanResults, @@ -482,7 +483,22 @@ final class DomainViewModel { lines.append("--------------") lines.append(" SPF: \(email.spf.found ? "✓" : "✗") \(email.spf.value ?? "No record found")") lines.append(" DMARC: \(email.dmarc.found ? "✓" : "✗") \(email.dmarc.value ?? "No record found")") - lines.append(" DKIM: \(email.dkim.found ? "✓" : "✗") \(email.dkim.value ?? "No record found")") + let dkimValue = if let selector = email.dkim.matchedSelector, + let value = email.dkim.value { + "\(value) (selector: \(selector))" + } else { + email.dkim.value ?? "No record found" + } + lines.append(" DKIM: \(email.dkim.found ? "✓" : "✗") \(dkimValue)") + let mtaDescription = if let mode = email.mtaSts?.policyMode { + "mode: \(mode)" + } else if email.mtaSts?.txtFound == true { + "Policy unavailable" + } else { + "No record found" + } + lines.append(" MTA-STS: \(email.mtaSts?.txtFound == true ? "✓" : "✗") \(mtaDescription)") + lines.append(" BIMI: \(email.bimi.found ? "✓" : "✗") \(email.bimi.value ?? "No record found")") } // SSL |
