Skip to content

Commit 6261a8b

Browse files
committed
2 parents 0a7d1a6 + 96f760e commit 6261a8b

29 files changed

Lines changed: 3213 additions & 249 deletions

.github/.testcoverage.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ threshold:
77
exclude:
88
paths:
99
- cmd/inboundparse/main.go
10+
- internal/auth/test_utils.go

README.md

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ A SMTP server that receives emails from any domain without authentication and fo
1919
### Email Authentication (RFC Compliant)
2020
- 🧐 **SPF Validation (RFC 7208)**: Validates Sender Policy Framework with HELO and envelope sender
2121
- 🖊️ **DKIM Validation (RFC 6376)**: Verifies DomainKeys Identified Mail signatures with multi-signature support
22-
- 🕵️‍♂️ **DMARC Validation (RFC 7489)**: Evaluates DMARC policy with identifier alignment checking
22+
- 🕵️‍♂️ **DMARC Validation (RFC 7489)**: Evaluates DMARC policy with hierarchical domain lookup and subdomain policy inheritance
2323
- 📝 **Comprehensive Results**: Detailed authentication results with domain, mechanism, and alignment data
24+
- 🔍 **Domain Hierarchy Tracking**: Tracks all attempted DMARC lookups with detailed per-domain results
2425

2526
### Observability & Monitoring
2627
- 📋 **Structured Logging**: JSON-formatted logs with configurable levels
@@ -236,16 +237,34 @@ The service sends a JSON payload to your webhook with comprehensive email data:
236237
"dmarc": {
237238
"result": "pass",
238239
"policy": "reject",
239-
"subdomain_policy": "reject",
240+
"subdomain_policy": "quarantine",
240241
"percentage": 100,
241-
"spf_alignment": "pass (relaxed)",
242-
"dkim_alignment": "pass (relaxed)"
242+
"spf_aligned": true,
243+
"dkim_aligned": true,
244+
"spf_domain": "example.com",
245+
"dkim_domain": "example.com",
246+
"details": [
247+
{
248+
"domain": "sub.example.com",
249+
"record_found": false,
250+
"error": "dmarc: no policy found for domain"
251+
},
252+
{
253+
"domain": "example.com",
254+
"record_found": true,
255+
"policy_used": "sp"
256+
}
257+
],
258+
"spf_alignment": "relaxed",
259+
"dkim_alignment": "relaxed",
260+
"failure_options": "0",
261+
"report_uris": ["mailto:dmarc@example.com"],
262+
"failure_uris": ["mailto:dmarc-fail@example.com"]
243263
}
244264
}
245265
}
246266
```
247267

248-
---
249268

250269
## 🤝 Contributing
251270

0 commit comments

Comments
 (0)