MTA-STS Check API
free/v1/security/mta-stsSeparates 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
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 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.
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
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
domain | query | string | Required | The 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.
| Field | Type | Description |
|---|---|---|
mta_sts_valid | boolean | Valid DNS discovery plus a valid retrieved policy; separate from live relay compliance. |
policy_valid | boolean | Strict shared RFC8461 policy parser result, including mode:none without MX patterns. |
policy_mx_coverage | boolean | Whether every discovered explicit MX is covered; null when the relevant scope is unresolved. |
partialFailure | boolean | Unavailable DNS, retrieval or relay evidence; ordinary result caching is suppressed. |
domain | string | The queried domain |
has_mta_sts | boolean | Whether MTA-STS is configured (DNS record exists) |
dns_record | object | MTA-STS DNS record details (version, id) |
policy | object | Parsed policy file: version, mode (none/testing/enforce), mx patterns, max_age |
mode | string | Policy mode: none, testing, or enforce |
policy_url | string | URL of the MTA-STS policy file |
tls_rpt | object | TLS-RPT (RFC 8460) reporting configuration if present |
issues | array | Configuration issues found |
recommendations | array | Improvement recommendations |
mx_starttls | array | Per-MX port-25 relay handshake, certificate and validation outcomes. |
mx_starttls_compliant | boolean | null | Observed relay TLS compliance; null for unavailable or incomplete evidence. |
mx_starttls_truncated | boolean | Whether the five-MX probe cap truncated coverage. |
limitations | string[] | 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 --request GET 'https://api.edgedns.dev/v1/security/mta-sts?domain=google.com' \
--header "Authorization: Bearer YOUR_API_KEY"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);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.