Service checks if a domain is within another's SPF record chain.
2.3K
A high-performance web service that checks if a target domain is included (directly or indirectly) in another domain's SPF (Sender Policy Framework) record chain.
Checks if a target domain is included in another domain's SPF record chain.
GET /api/v1/check-spf?domain={domain}&target={target}
domain: The domain to check the SPF record for (e.g., example.com)target: The domain to look for in the SPF include chain (e.g., _spf.example.com){
"found": true,
"checked_domains": 3,
"domain": "example.com",
"target": "spf.protection.outlook.com",
"elapsed_ms": 42,
"has_spf_record": true,
"spf_record": "v=spf1 include:spf.protection.outlook.com -all",
"included_domains": ["spf.protection.outlook.com"],
"fallback_check": false
}
found: Boolean indicating if the target was found in the SPF chainchecked_domains: Number of domains checked in the processdomain: The original domain that was checkedtarget: The domain that was searched forelapsed_ms: Time taken for the check in millisecondshas_spf_record: Boolean indicating if the domain has an SPF recordspf_record: The complete SPF record of the main domain (if exists, otherwise null)included_domains: List of domains included in the main SPF record (if exists, otherwise null)fallback_check: Boolean indicating if a fallback check was performed (if the target was not found in the SPF record){
"error": "DNS_LOOKUP_FAILED"
}
Common error codes:
DNS_LOOKUP_FAILED: Unable to perform DNS lookup or TXT record does not existSPF_PARSE_FAILED: Invalid SPF record formatGET /health
Returns 200 OK if the service is running.
http://localhost:8080/ui
Returns a simple HTML UI for checking SPF records.
Check if outlook.com's SPF is included in example.com's SPF chain:
curl "http://localhost:8080/api/v1/check-spf?domain=example.com&target=spf.protection.outlook.com"
cargo build --release
./target/release/spf-check
The service will listen on 0.0.0.0:8080 by default.
Content type
Image
Digest
sha256:60e666904…
Size
1.8 MB
Last updated
about 1 year ago
docker pull easybill/spf-check