Skip to main content

MTA-STS Check API

free
GET/v1/security/mta-sts

Separates MTA-STS DNS publication, strict RFC8461 HTTPS policy validity, MX pattern coverage, usable RFC8460 reporting destinations and optional sampled relay STARTTLS evidence. A valid published policy does not prove live mail delivery or every endpoint address is compliant.

What It Does

Shares the canonical policy and DNS parsers with Email Score. Requires an HTTP200, nonredirected, bounded policy with required version/mode/max_age and MX patterns except mode:none. Policy field ordering is unrestricted and first singleton values win; DNS records require exact first version and usable id. TLS-RPT requires one candidate record and supported usable destinations. Reports unavailable dependencies separately and bounds caches by source/policy/native evidence.

Why It's Useful

MTA-STS prevents email interception by requiring TLS encryption between mail servers (RFC 8461). Without MTA-STS, even domains with HTTPS everywhere can have their emails intercepted via SMTP downgrade attacks — attackers can strip STARTTLS from the initial negotiation. MTA-STS is the email equivalent of HSTS and is complementary to DANE (RFC 7672, which requires DNSSEC). Combined with TLS-RPT, it provides visibility into delivery failures. Adopted by Google (exclusively uses MTA-STS) and Microsoft (supports both DANE and MTA-STS). Required for SOC 2, HIPAA, and GDPR compliance for encrypted email transmission.

Use Cases

Security Engineer

Email Encryption Enforcement

Verify MTA-STS is properly configured to enforce encrypted email delivery to your domain. Check that the policy mode is "enforce" and max_age is sufficient.

Protect sensitive email communications from man-in-the-middle and downgrade attacks.

Compliance Officer

Compliance Documentation

Document MTA-STS configuration as evidence of email encryption controls for SOC 2, HIPAA, or GDPR audits.

Meet compliance requirements for encrypted email transmission.

Security Analyst

Partner Email Security Assessment

Evaluate partner or vendor email security by checking their MTA-STS enforcement level before sharing sensitive information via email.

Ensure sensitive communications with partners are encrypted in transit.

Parameters

NameLocationTypeRequiredDescription
domainquerystringRequiredThe domain to check MTA-STS configuration forExample: google.com

Response Fields

Result fields below are inside the JSON data object. Any row named meta describes the sibling response metadata object. See response and error handling for status codes and error responses. Optional observations may be absent or null; inspect warnings and partial-failure fields before treating a missing result as a negative finding.

FieldTypeDescription
mta_sts_validbooleanValid DNS discovery plus a valid retrieved policy; separate from live relay compliance.
policy_validbooleanStrict shared RFC8461 policy parser result, including mode:none without MX patterns.
policy_mx_coveragebooleanWhether every discovered explicit MX is covered; null when the relevant scope is unresolved.
partialFailurebooleanUnavailable DNS, retrieval or relay evidence; ordinary result caching is suppressed.
domainstringThe queried domain
has_mta_stsbooleanWhether MTA-STS is configured (DNS record exists)
dns_recordobjectMTA-STS DNS record details (version, id)
policyobjectParsed policy file: version, mode (none/testing/enforce), mx patterns, max_age
modestringPolicy mode: none, testing, or enforce
policy_urlstringURL of the MTA-STS policy file
tls_rptobjectTLS-RPT (RFC 8460) reporting configuration if present
issuesarrayConfiguration issues found
recommendationsarrayImprovement recommendations
mx_starttlsarrayPer-MX port-25 relay handshake, certificate and validation outcomes.
mx_starttls_compliantboolean | nullObserved relay TLS compliance; null for unavailable or incomplete evidence.
mx_starttls_truncatedbooleanWhether the five-MX probe cap truncated coverage.
limitationsstring[]Coverage and measurement limitations, including unavailable SMTP evidence.

Code Examples

Replace YOUR_API_KEY with your API key. This endpoint requires the free plan or higher; see plans and usage limits.

cURL
curl --request GET 'https://api.edgedns.dev/v1/security/mta-sts?domain=google.com' \
  --header "Authorization: Bearer YOUR_API_KEY"
JavaScript
const response = await fetch(
  "https://api.edgedns.dev/v1/security/mta-sts?domain=google.com",
  {
    "method": "GET",
    "headers": {
      "Authorization": "Bearer YOUR_API_KEY"
    }
  }
);

if (!response.ok) {
  throw new Error(`EdgeDNS returned HTTP ${response.status}`);
}
const data = await response.json();
console.log(data);
Python
import requests

response = requests.request(
    'GET',
    "https://api.edgedns.dev/v1/security/mta-sts?domain=google.com",
    headers={'Authorization': 'Bearer YOUR_API_KEY'},
    timeout=60,
)
response.raise_for_status()
data = response.json()
print(data)

Read the full MTA-STS Check guide

Learn the concepts, choose a practical workflow, and interpret the observations from MTA-STS Check before acting on them. Run supported checks via MCP or through REST.

Read the guide →

    Related Endpoints

    External References

    Learn more about the standards and protocols behind this endpoint.

    Try This Endpoint

    Test the MTA-STS Check endpoint live in the playground.

    MTA-STS Check API Reference | EdgeDNS