Email errors
MTA-STS Policy Is Missing: What STSFetchResult.NONE Means
MTA-STS policy is missing: STSFetchResult.NONE means no usable _mta-sts TXT record was found. See why Mail-in-a-Box shows it and how to fix it.
What this means
MTA-STS policy is missing: STSFetchResult.NONE means a lookup of the TXT record _mta-sts.example.com found nothing usable. That exact line comes from System > Status Checks in Mail-in-a-Box, a self-hosted mail server. MTA-STS (RFC 8461) lets a domain tell sending servers to expect an encrypted, certificate-checked connection.
A missing MTA-STS policy does not bounce mail by itself: senders deliver without that protection (RFC 8461). An unexpired cached policy still applies.
STSFetchResult.NONE versus FETCH_ERROR
STSFetchResult.NONEconcerns DNS. The name has no TXT data, no record begins withv=STSv1, more than one does, or the record has noid.STSFetchResult.FETCH_ERRORmeans the DNS lookup timed out or failed, or the record is fine and the policy file could not be fetched or is invalid.
Why it happens
Mail-in-a-Box writes the record itself, and only when the domain has email addresses and the certificates for the box hostname and mta-sts.example.com are signed and valid.
- The
mta-stscertificate was never issued. A self-signed one does not count. - A certificate is close to expiry. The test fails at 10 days or fewer, so the record leaves the zone at the next DNS rebuild.
- DNS has not been rebuilt. Provisioning a certificate does not do it. A daily job or a setup run does.
- DNS is hosted elsewhere. Mail-in-a-Box cannot edit your zone.
On other mail servers, the record may never have been published.
How to fix it
On Mail-in-a-Box
-
Check DNS from outside. Run
nslookup -type=TXT _mta-sts.example.com 1.1.1.1with your domain. You want exactly one answer beginning withv=STSv1. Remove any extras. -
Check both certificates. In System > TLS (SSL) Certificates, click Provision if the list beside the button includes
mta-sts.example.comor the box hostname. The name must resolve to the box. With DNS hosted elsewhere, first add themta-stsA record shown on System > External DNS, and its AAAA record too if that page lists one. -
Choose the mode. The default is
enforce. Caution: underenforce, senders that apply MTA-STS will not deliver to a host that fails certificate or MX checks. To observe first, setMTA_STS_MODE=testingin/etc/mailinabox.conf.testingshows failures only if the domain publishes TLS-RPT, so add this TXT record at_smtp._tls.example.com, in System > Custom DNS or at your external DNS host:v=TLSRPTv1; rua=mailto:dmarc@example.com -
Rebuild DNS. If you changed the mode in step 3, run
sudo mailinaboxover SSH, even with external DNS: the daily job rebuilds DNS but does not rewrite the policy file. If you kept the mode, you can wait for the daily job instead. With external DNS, copy the_mta-stsTXT record from External DNS once the certificates are valid.
On any other mail server
-
Publish the policy file first. Serve it at
https://mta-sts.example.com/.well-known/mta-sts.txtastext/plain, with status 200, no redirect and a valid certificate for that name. Put each host from your MX lookup on its ownmxline.version: STSv1 mode: testing mx: mail.example.com max_age: 604800 -
Publish the TXT record second, at
_mta-sts.example.com. Use your ownidof 1 to 32 letters and digits, and change it whenever the file changes.v=STSv1; id=20160831085700Z; -
Stay in
testinguntil TLS-RPT reports show no failures for any MX host. To receive them, publish a TXT record at_smtp._tls.example.com:v=TLSRPTv1; rua=mailto:dmarc@example.comCaution: under
enforce, a real server with nomxline, or an expired certificate, can stop mail from senders that apply MTA-STS.
Confirm the fix
- Repeat the
nslookupcheck. Public DNS can take several hours to update. - Open the policy URL. It should load with no redirect or certificate warning.
- Run the MTA-STS checker. It validates the record and the file, then compares the
mxlines with your real MX hosts. - On Mail-in-a-Box, reopen System > Status Checks. With
enforce, the passing line isMTA-STS policy is present.Withtesting, expect the errorMTA-STS policy is present but has unexpected settings, which is normal until you switch toenforce.