Skip to main content

New

Test your email deliverability

Send a test email and get a complete diagnosis of your SPF, DKIM and DMARC authentication in seconds.

  • Real send test
  • Instant diagnosis
  • No signup required

Free MTA-STS Validator

Validate MTA-STS syntax offline before deployment—RFC 8461 compliant

Free MTA-STS validator to check your DNS TXT record and policy file syntax offline. Validate against RFC 8461 specifications—check version, mode, MX patterns, and max_age directives before deploying to production.

The TXT record value for _mta-sts.yourdomain.com

The content of the mta-sts.txt file

Optionally enter the domain to validate MX patterns against actual MX records

DNS TXT record validation

Validate the _mta-sts TXT record format. Checks version (STSv1) and ID fields for RFC 8461 compliance.

Policy file validation

Validate mta-sts.txt content. Checks version, mode (enforce/testing/none), MX patterns, and max_age directives.

Offline syntax check

No DNS lookups required. Validate your configuration before publishing to DNS and deploying the policy file.

Detailed error detection

Get precise error messages and warnings. Identify missing directives, invalid values, or syntax issues.

RFC 8461 compliance

Validates against the official MTA-STS specification. Ensures your configuration follows best practices.

What This Tool Validates

The MTA-STS syntax checker performs comprehensive validation of both MTA-STS components:

DNS TXT Record Validation

The _mta-sts.yourdomain.com TXT record is validated for:

FieldRequirement
vMust be STSv1 (case-sensitive)
idRequired, alphanumeric, 1-32 characters
FormatSemicolon-separated key=value pairs

Valid example:

v=STSv1; id=20240115120000

Invalid examples:

v=sts1; id=123              (wrong version)
v=STSv1                     (missing id)
v=STSv1; id=my policy id    (id has spaces)

Policy File Validation

The mta-sts.txt file is validated for:

FieldRequirement
versionMust be STSv1 (case-sensitive)
modeMust be testing, enforce, or none
mxAt least one valid MX pattern required
max_ageRequired, 0-31557600 seconds

Valid example:

version: STSv1
mode: enforce
mx: mail.example.com
mx: *.backup.example.com
max_age: 604800

Common Validation Errors

DNS Record Errors

ErrorCauseFix
Missing versionNo v=STSv1Add v=STSv1; at the start
Invalid versionTypo or wrong caseUse exactly STSv1
Missing idNo id fieldAdd id= with unique value
Invalid idSpaces or special charsUse only alphanumeric characters

Policy File Errors

ErrorCauseFix
Missing versionNo version: lineAdd version: STSv1
Invalid modeTypo or wrong valueUse testing, enforce, or none
No MX patternsMissing mx: linesAdd at least one mx: hostname
Invalid max_ageOut of range or not numericUse 0-31557600
Invalid MX patternMalformed wildcardUse *.subdomain.example.com format

MX Pattern Rules

MTA-STS supports two types of MX patterns:

Exact Hostname

mx: mail.example.com
mx: smtp.example.com

Matches only the exact hostname specified.

Wildcard Pattern

mx: *.mail.example.com
  • Wildcard (*) must be the leftmost label
  • Matches any single label (e.g., server1.mail.example.com)
  • Does NOT match multiple labels (e.g., a.b.mail.example.com)

Invalid Patterns

mx: *                        (bare wildcard)
mx: mail.*.example.com       (wildcard not leftmost)
mx: **.example.com           (double wildcard)
mx: mail.example.*           (wildcard on TLD)

Validation vs. Live Check

FeatureSyntax CheckerRecord Checker
DNS lookupNoYes
Policy fetchNoYes
TLS verificationNoYes
Offline validationYesNo
Pre-deployment checkYesNo
Real-time statusNoYes

Use the syntax checker before deploying to catch errors early.

Use the record checker after deployment to verify live configuration.


FAQ - Frequently asked questions

Q: What does the MTA-STS syntax checker validate?

A: The syntax checker validates both the DNS TXT record (version and id fields) and the policy file content (version, mode, mx patterns, and max_age). It checks for required fields, valid values, and proper formatting according to RFC 8461.


Q: Why validate MTA-STS syntax offline?

A: Validating syntax offline lets you catch errors before deployment. This prevents misconfigurations that could cause email delivery failures or leave your domain unprotected.


Q: What are common MTA-STS syntax errors?

A: Common errors include: missing required fields (version, mode, mx, max_age), invalid mode values (must be testing, enforce, or none), max_age out of range, malformed MX patterns, and incorrect TXT record format.


Q: What MX pattern formats are valid?

A: MX patterns can be exact hostnames (mail.example.com) or wildcards (.mail.example.com). Wildcards only match at the leftmost label. Invalid patterns include bare wildcards () or wildcards in the middle.


Q: What max_age values are recommended?

A: RFC 8461 recommends at least 86400 (1 day). Common values: 86400 for testing, 604800 (1 week) for production, 31557600 (1 year) for stable configurations. Maximum is 31557600 seconds.


Q: How do I fix 'invalid version' errors?

A: The version must be exactly 'STSv1' (case-sensitive) for both the DNS record and policy file. Check for typos, extra spaces, or incorrect casing.


Q: How do I validate MTA-STS syntax for Microsoft 365 / Office 365?

A: Paste your MTA-STS DNS TXT record and policy file content into our validator. For Microsoft 365, ensure your MX patterns match Microsoft's mail servers (e.g., *.mail.protection.outlook.com). The validator checks RFC 8461 compliance before you publish to DNS.


Q: How do I check MTA-STS syntax for Google Workspace?

A: Use our offline validator to check your MTA-STS configuration for Google Workspace. Enter your DNS TXT record and policy content—ensure MX patterns include Google's servers (e.g., *.google.com, aspmx.l.google.com). Validate syntax before deploying to catch errors early.


Complementary tools

ToolDescription
MTA-STS GeneratorGenerate MTA-STS records and policy files
MTA-STS Record CheckerValidate live MTA-STS configuration
DNS Propagation CheckerCheck DNS record propagation

Useful resources