Single-Call Email Security Posture Review
Collect a combined email authentication and transport-policy snapshot
Collect a combined email authentication and transport-policy snapshot. Use the API workflow below to collect dated findings, review their scope, and decide which follow-up checks your team needs.
Implementation example by the EdgeDNS team · Updated
The Challenge
Separate authentication and transport checks can produce fragmented evidence with different failure conditions.
The Solution
Use email-posture to collect SPF, DKIM, DMARC, BIMI, MTA-STS, and DANE analyzer results in one response. Review ranked recommendations and component availability before sharing the findings. The DNSSEC aggregate describes underlying lookup evidence, not complete cryptographic validation of every domain record.
Endpoints Used
Combine these EdgeDNS endpoints to build this solution.
/v1/security/email-postureAPI referenceEmail Posture (Composite): Single-call composite that fans out across SPF, DKIM, DMARC, and DMARCbis tree-walk
/v1/security/spfAPI referenceSPF Check: Validate SPF record syntax, DNS lookups, and policy
/v1/security/dkimAPI referenceDKIM Check: Discover and validate DKIM signing keys
/v1/security/dmarcAPI referenceDMARC Check: Analyze DMARC policy, alignment, and reporting
What this workflow helps you do
Collect six analyzer results
Review component details alongside the composite score.
Prioritize recommendations
Use severity and endpoint references to plan follow-up checks.
Inspect degraded responses
Treat failed or unavailable components as incomplete evidence.
Code Example
Collect a combined email authentication and transport-policy snapshot
const headers = { Authorization: 'Bearer YOUR_API_KEY' };
const checks = [
{
"path": "/v1/security/email-posture",
"params": {
"domain": "cloudflare.com"
}
},
{
"path": "/v1/security/spf",
"params": {
"domain": "google.com"
}
},
{
"path": "/v1/security/dkim",
"params": {
"domain": "google.com"
}
}
];
// Run sequentially to keep concurrency bounded. API tier restrictions apply.
for (const { path, params } of checks) {
const url = new URL(path, 'https://api.edgedns.dev');
url.search = new URLSearchParams(params).toString();
const response = await fetch(url, { headers });
const result = await response.json();
if (!response.ok) {
throw new Error(`${path}: ${response.status} ${result.error?.message ?? 'Request failed'}`);
}
// Keep the response metadata and any partial/unknown findings for review.
console.log(path, result);
}Learn More
Explore industry standards and best practices related to this use case.
RFC 7489 — DMARC Specification
IETF DMARC specification — the source of the organisational-domain semantics being replaced by DMARCbis Tree Walk
DMARCbis Internet Draft
IETF document status and specification text for DMARC development.
Google Email Sender Guidelines
Mailbox-provider guidance for email authentication and sender practices.
Ready to build Single-Call Email Security Posture Review?
Get started with 200 free API requests per month. No credit card required.
Other Use Cases
Email Deliverability Monitoring
Check published sender authentication before a campaign
Email Security Specialist / Security ArchitectAdvanced Email Security Audit
Review BIMI, MTA-STS, and SMTP configuration with email authentication
Cloud Security Engineer / Platform EngineerSubdomain Takeover Checks for Service Offboarding
Review dangling DNS before retiring a cloud resource or SaaS service