{"id":2706,"date":"2026-05-09T16:52:23","date_gmt":"2026-05-09T09:52:23","guid":{"rendered":"https:\/\/daiilynews.cu.ma\/one-api-call-to-audit-any-domains-email-security\/"},"modified":"2026-05-09T16:52:23","modified_gmt":"2026-05-09T09:52:23","slug":"one-api-call-to-audit-any-domains-email-security","status":"publish","type":"post","link":"https:\/\/daiilynews.cu.ma\/?p=2706","title":{"rendered":"One API Call to Audit Any Domain&#8217;s Email Security"},"content":{"rendered":"<p> <br \/>\n<br \/>\n                You know the drill. A customer complains their transactional emails land in spam. Or a B2B trial signup uses a throwaway address. Or someone asks &#8220;do we have DMARC set up correctly?&#8221; and you open ten browser tabs to find out.<\/p>\n<p>I built MailSec to replace that entire workflow with one API call.<\/p>\n<p>  The problem<\/p>\n<p>Email infrastructure is deceptively complex:<\/p>\n<p>SPF has a hard 10-lookup limit that silently breaks when you add one too many include:<\/p>\n<p>DMARC with p=none does literally nothing \u2014 but most teams ship it and assume they&#8217;re protected<\/p>\n<p>DKIM selectors vary by provider (google, selector1, k1, s1) and you need to guess which one to check<\/p>\n<p>Spamhaus listings can tank your deliverability for days before anyone notices<\/p>\n<p>DNSSEC is either there or it isn&#8217;t, and most tools make you check separately<\/p>\n<p>The information is all in DNS, but it&#8217;s scattered across different record types, different query tools, and different mental models. You end up juggling dig, MXToolbox, Spamhaus lookup, and a DMARC analyzer \u2014 just to answer &#8220;is this domain&#8217;s email OK?&#8221;<\/p>\n<p>  One request, full picture<\/p>\n<p>curl https:\/\/prod.api.market\/api\/v1\/fivetag-systems\/mailsec\/v1\/audit\/cloudflare.com \\<br \/>\n  -H &#8220;x-api-market-key: YOUR_KEY&#8221;<\/p>\n<p>    Enter fullscreen mode<\/p>\n<p>    Exit fullscreen mode<\/p>\n<p>Response:<\/p>\n<p>{<br \/>\n  &#8220;domain&#8221;: &#8220;cloudflare.com&#8221;,<br \/>\n  &#8220;spf&#8221;: {<br \/>\n    &#8220;present&#8221;: true,<br \/>\n    &#8220;valid&#8221;: true,<br \/>\n    &#8220;record&#8221;: &#8220;v=spf1 ip4:199.15.212.0\/22 ip4:173.245.48.0\/20 include:_spf.google.com include:spf1.mcsv.net include:spf.mandrillapp.com include:mail.zendesk.com include:stspg-customer.com include:_spf.salesforce.com -all&#8221;,<br \/>\n    &#8220;lookupCount&#8221;: 7<br \/>\n  },<br \/>\n  &#8220;dmarc&#8221;: {<br \/>\n    &#8220;present&#8221;: true,<br \/>\n    &#8220;valid&#8221;: true,<br \/>\n    &#8220;record&#8221;: &#8220;v=DMARC1; p=reject; pct=100; rua=mailto:&#8230;@dmarc-reports.cloudflare.net,mailto:rua@cloudflare.com&#8221;,<br \/>\n    &#8220;policy&#8221;: &#8220;reject&#8221;,<br \/>\n    &#8220;subdomainPolicy&#8221;: &#8220;reject&#8221;,<br \/>\n    &#8220;pct&#8221;: 100,<br \/>\n    &#8220;rua&#8221;: (<br \/>\n      &#8220;mailto:&#8230;@dmarc-reports.cloudflare.net&#8221;,<br \/>\n      &#8220;mailto:rua@cloudflare.com&#8221;<br \/>\n    )<br \/>\n  },<br \/>\n  &#8220;dkim&#8221;: { &#8220;present&#8221;: true, &#8220;selector&#8221;: &#8220;k1&#8221;, &#8220;valid&#8221;: true },<br \/>\n  &#8220;dnssec&#8221;: { &#8220;enabled&#8221;: true, &#8220;valid&#8221;: true },<br \/>\n  &#8220;mx&#8221;: {<br \/>\n    &#8220;present&#8221;: true,<br \/>\n    &#8220;redundant&#8221;: true,<br \/>\n    &#8220;records&#8221;: (<br \/>\n      { &#8220;host&#8221;: &#8220;mxa-canary.global.inbound.cf-emailsecurity.net.&#8221;, &#8220;priority&#8221;: 5 },<br \/>\n      { &#8220;host&#8221;: &#8220;mxb-canary.global.inbound.cf-emailsecurity.net.&#8221;, &#8220;priority&#8221;: 5 },<br \/>\n      { &#8220;host&#8221;: &#8220;mxa.global.inbound.cf-emailsecurity.net.&#8221;, &#8220;priority&#8221;: 10 },<br \/>\n      { &#8220;host&#8221;: &#8220;mxb.global.inbound.cf-emailsecurity.net.&#8221;, &#8220;priority&#8221;: 10 }<br \/>\n    )<br \/>\n  },<br \/>\n  &#8220;score&#8221;: 100,<br \/>\n  &#8220;grade&#8221;: &#8220;A&#8221;,<br \/>\n  &#8220;blacklists&#8221;: { &#8220;dblListed&#8221;: false, &#8220;zenListed&#8221;: false },<br \/>\n  &#8220;verdict&#8221;: &#8220;READY&#8221;,<br \/>\n  &#8220;mtaSts&#8221;: {<br \/>\n    &#8220;present&#8221;: false,<br \/>\n    &#8220;issues&#8221;: (&#8220;mta-sts: no DNS record found&#8221;)<br \/>\n  },<br \/>\n  &#8220;tlsRpt&#8221;: {<br \/>\n    &#8220;present&#8221;: false,<br \/>\n    &#8220;issues&#8221;: (&#8220;tlsrpt: no record found&#8221;)<br \/>\n  }<br \/>\n}<\/p>\n<p>    Enter fullscreen mode<\/p>\n<p>    Exit fullscreen mode<\/p>\n<p>Cloudflare scores 100\/A. SPF with 7 lookups (under the limit of 10), DMARC at reject with full reporting, DKIM present, DNSSEC valid, redundant MX, clean blacklists. Verdict: READY.<\/p>\n<p>Now try a domain that doesn&#8217;t have its act together and you&#8217;ll see the score drop, issues appear, and the verdict shift to CAUTION or BLOCKED.<\/p>\n<p>  What&#8217;s behind the score<\/p>\n<p>The audit scores five components out of 100:<\/p>\n<p>Check<br \/>\nMax points<br \/>\nWhat it measures<\/p>\n<p>SPF<br \/>\n20<br \/>\nValid record, all mechanism present, lookup count under 10<\/p>\n<p>DMARC<br \/>\n30<br \/>\nPresent, enforced (quarantine\/reject), reporting configured<\/p>\n<p>DKIM<br \/>\n20<br \/>\nKey found at a known selector<\/p>\n<p>DNSSEC<br \/>\n20<br \/>\nDS record present, chain of trust valid<\/p>\n<p>MX<br \/>\n10<br \/>\nMX records exist, redundant hosts<\/p>\n<p>Grades: A (90+), B (70+), C (50+), D (30+), F (<\/p>\n<p>DMARC is weighted heaviest because it&#8217;s the single biggest factor in whether spoofed mail gets through. A domain with p=none is essentially unprotected \u2014 MailSec won&#8217;t call that &#8220;ready.&#8221;<\/p>\n<p>MTA-STS, TLS-RPT, and BIMI are included in the audit response for visibility but are informational only \u2014 they don&#8217;t affect the score. Adoption is still too low to penalize domains without them.<\/p>\n<p>  Beyond the full audit<\/p>\n<p>You don&#8217;t always need everything. Each check has its own endpoint:<\/p>\n<p># Just SPF<br \/>\nGET \/v1\/spf\/{domain}<\/p>\n<p># Just DMARC policy<br \/>\nGET \/v1\/dmarc\/{domain}<\/p>\n<p># DKIM \u2014 auto-probes common selectors, or pass ?selector=google<br \/>\nGET \/v1\/dkim\/{domain}<\/p>\n<p># MTA-STS \u2014 DNS record + HTTPS policy file (RFC 8461)<br \/>\nGET \/v1\/mta-sts\/{domain}<\/p>\n<p># TLS-RPT \u2014 reporting URIs for TLS failures (RFC 8460)<br \/>\nGET \/v1\/tlsrpt\/{domain}<\/p>\n<p># Is this a throwaway email domain?<br \/>\nGET \/v1\/email\/disposable\/{domain}<\/p>\n<p># Full email validation: syntax + DNS + disposable check<br \/>\nGET \/v1\/email\/validate?email=user@example.com<\/p>\n<p># Deliverability verdict without DNSSEC (focused on inbox placement)<br \/>\nGET \/v1\/deliverability\/{domain}<\/p>\n<p>    Enter fullscreen mode<\/p>\n<p>    Exit fullscreen mode<\/p>\n<p>  Real use cases<\/p>\n<p>  1. Validate B2B signups<\/p>\n<p>Before provisioning a trial, check if the domain is real, has working email, and isn&#8217;t disposable:<\/p>\n<p>curl &#8230;\/v1\/email\/validate?email=cto@acme-corp.com<\/p>\n<p>    Enter fullscreen mode<\/p>\n<p>    Exit fullscreen mode<\/p>\n<p>{<br \/>\n  &#8220;email&#8221;: &#8220;cto@acme-corp.com&#8221;,<br \/>\n  &#8220;syntaxValid&#8221;: true,<br \/>\n  &#8220;domainExists&#8221;: true,<br \/>\n  &#8220;mxPresent&#8221;: true,<br \/>\n  &#8220;disposable&#8221;: false,<br \/>\n  &#8220;deliverable&#8221;: true<br \/>\n}<\/p>\n<p>    Enter fullscreen mode<\/p>\n<p>    Exit fullscreen mode<\/p>\n<p>Block mailinator.com, guerrillamail.com, and 100k+ other throwaway domains automatically. The disposable check does suffix-walking, so anything.mailinator.com is caught too.<\/p>\n<p>  2. Pre-flight transactional sends<\/p>\n<p>About to send a welcome email, invoice, or password reset? Check the recipient&#8217;s domain first:<\/p>\n<p>curl &#8230;\/v1\/deliverability\/their-domain.com<\/p>\n<p>    Enter fullscreen mode<\/p>\n<p>    Exit fullscreen mode<\/p>\n<p>If verdict is BLOCKED, that domain is in Spamhaus \u2014 your email probably won&#8217;t arrive. If CAUTION, their SPF\/DMARC is misconfigured and replies\/bounces may behave unexpectedly. Only send with confidence when verdict is READY.<\/p>\n<p>  3. Customer onboarding \u2014 &#8220;Check my domain&#8221; button<\/p>\n<p>Building a SaaS that sends email on behalf of customers? Give them a one-click domain health check in your onboarding flow. Hit \/v1\/audit\/{domain} and render the results:<\/p>\n<p>&#8220;Your DMARC policy is set to none \u2014 this means spoofed emails from your domain won&#8217;t be blocked. Change it to quarantine or reject to protect your brand.&#8221;<\/p>\n<p>  4. Monitor your own domains<\/p>\n<p>Run a daily cron against \/v1\/audit\/bulk with your company&#8217;s domains. Alert when:<\/p>\n<p>Score drops below a threshold<br \/>\nDMARC policy changes from reject to none<\/p>\n<p>A new Spamhaus listing appears<br \/>\nSPF lookup count crosses 8 (getting close to the limit of 10)<\/p>\n<p>  5. Audit third-party vendors<\/p>\n<p>Before integrating with a partner who&#8217;ll send email on your behalf, check their domain. A vendor with p=none DMARC and no DKIM is a phishing risk to your customers.<\/p>\n<p>  Performance<\/p>\n<p>Live DNS lookups on every request (no stale scrapes)<br \/>\nIn-process cache respects each record&#8217;s TTL \u2014 repeat queries are<br \/>\nFull audit fans out all checks in parallel \u2014 cold lookups typically 200-800ms<br \/>\nBulk endpoint audits up to 10 domains in a single request<\/p>\n<p>  Get started<\/p>\n<p>MailSec is available on api.market. Sign up, grab your API key, and start auditing domains in minutes.<\/p>\n<p>Try it now \u2014 pick any domain you&#8217;re curious about and see what comes back. You might be surprised by your own.<\/p>\n<p><br \/>\n<br \/><a href=\"https:\/\/dev.to\/lgogolin\/one-api-call-to-audit-any-domains-email-security-2b6k\">Source link <\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>You know the drill. A customer complains their transactional emails land in spam. Or a B2B trial signup uses a throwaway address. Or someone asks &#8220;do we have DMARC set up correctly?&#8221; and you open ten browser tabs to find out. I built MailSec to replace that entire workflow with one API call. The problem [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2707,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[676],"tags":[1087,761,765,762,1088,763,764,1086,760,824],"class_list":["post-2706","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tech-ai","tag-api","tag-coding","tag-community","tag-development","tag-devops","tag-engineering","tag-inclusive","tag-security","tag-software","tag-webdev"],"_links":{"self":[{"href":"https:\/\/daiilynews.cu.ma\/index.php?rest_route=\/wp\/v2\/posts\/2706","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/daiilynews.cu.ma\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/daiilynews.cu.ma\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/daiilynews.cu.ma\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/daiilynews.cu.ma\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2706"}],"version-history":[{"count":0,"href":"https:\/\/daiilynews.cu.ma\/index.php?rest_route=\/wp\/v2\/posts\/2706\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/daiilynews.cu.ma\/index.php?rest_route=\/wp\/v2\/media\/2707"}],"wp:attachment":[{"href":"https:\/\/daiilynews.cu.ma\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2706"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/daiilynews.cu.ma\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2706"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/daiilynews.cu.ma\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2706"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}