# MTA-STS policy fetch failed / no valid TLS (mta-sts.txt not reachable or certificate invalid)

**Code:** `MTA-STS` · **Category:** Email / SMTP · **Seen on:** SMTP, DNS, Email

Senders can't retrieve or trust your MTA-STS policy, so TLS enforcement isn't applied (or mail is deferred in enforce mode).

## Meaning

Publish `_mta-sts.example.com TXT "v=STSv1; id=..."` and serve `https://mta-sts.example.com/.well-known/mta-sts.txt` with a valid certificate, correct `mx:` entries matching your MX hosts, `mode` (testing/enforce) and `max_age`. Add `_smtp._tls` TLS-RPT for reports. In enforce mode, an invalid MX certificate causes deferrals.

## Common causes

- Policy file not reachable or wrong host
- Invalid/expired certificate on mta-sts host
- `mx:` entries don't match real MX hosts
- id not updated after changes
- MX certificates invalid in enforce mode

## Quick fix

1. Serve the policy over HTTPS with a valid certificate
2. Match `mx:` lines to the MX records
3. Start in `testing` mode and use TLS-RPT

## Detailed fix by platform

### Text

1. 

```bash
version: STSv1
mode: testing
mx: mail.example.com
max_age: 86400
```


## How to diagnose

1. **Policy URL** — Reachable?
2. **MX list** — Matches?
3. **Mode** — Testing first?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/email/mta-sts-policy-fetch-failed-tls-rpt)
