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/ContentView.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/ContentView.swift')
| -rw-r--r-- | DomainDig/ContentView.swift | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/DomainDig/ContentView.swift b/DomainDig/ContentView.swift index c44f871..bb93789 100644 --- a/DomainDig/ContentView.swift +++ b/DomainDig/ContentView.swift @@ -381,6 +381,8 @@ struct ContentView: View { emailSecurityRow("SPF", record: email.spf) emailSecurityRow("DMARC", record: email.dmarc) emailSecurityRow("DKIM", record: email.dkim) + emailSecurityRow("MTA-STS", mtaSts: email.mtaSts) + emailSecurityRow("BIMI", record: email.bimi) } } } @@ -394,7 +396,7 @@ struct ContentView: View { Text(label) .font(.system(.caption, design: .monospaced)) .fontWeight(.semibold) - .frame(width: 52, alignment: .leading) + .frame(width: 72, alignment: .leading) Text(record.found ? "✓" : "✗") .font(.system(.caption, design: .monospaced)) .foregroundStyle(record.found ? .green : .red) @@ -411,6 +413,11 @@ struct ContentView: View { expandedEmailField = isExpanded ? nil : label } } + if let selector = record.matchedSelector { + Text("(selector: \(selector))") + .font(.system(.caption2, design: .monospaced)) + .foregroundStyle(.secondary) + } } else { Text("No record found") .font(.system(.caption2, design: .monospaced)) @@ -420,6 +427,30 @@ struct ContentView: View { } } + private func emailSecurityRow(_ label: String, mtaSts: MTASTSResult?) -> some View { + VStack(alignment: .leading, spacing: 2) { + HStack(spacing: 8) { + Text(label) + .font(.system(.caption, design: .monospaced)) + .fontWeight(.semibold) + .frame(width: 72, alignment: .leading) + Text(mtaSts?.txtFound == true ? "✓" : "✗") + .font(.system(.caption, design: .monospaced)) + .foregroundStyle(mtaSts?.txtFound == true ? .green : .red) + if let policyMode = mtaSts?.policyMode { + Text(policyMode) + .font(.system(.caption2, design: .monospaced)) + .foregroundStyle(.primary) + .textSelection(.enabled) + } else { + Text(mtaSts?.txtFound == true ? "Policy unavailable" : "No record found") + .font(.system(.caption2, design: .monospaced)) + .foregroundStyle(.secondary) + } + } + } + } + // MARK: - SSL Results private var sslResultsSection: some View { |
