You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This repository is configured to automatically fetch and maintain the latest [MTA-STS](https://datatracker.ietf.org/doc/html/rfc8461) (Mail Transfer Agent Strict Transport Security) policy file for my domain.
4
+
## What is MTA-STS?
5
+
6
+
MTA-STS is a protocol that helps ensure secure transmission of emails between mail servers. It:
7
+
1. Requires that sending mail servers validate the receiving server's identity via TLS certificates.
8
+
2. Enforces the use of TLS encryption for email delivery, preventing downgrade attacks or MITM (man-in-the-middle) attacks.
9
+
10
+
### Key Components of MTA-STS:
11
+
**DNS Records**
12
+
1. TXT Record (required) - `_mta-sts.<your-domain>` points to your domain's policy.
13
+
2. TXT Record (recommended) - `_smtp._tls.<your-domain>` to configure reporting through [TLS-RPT](https://datatracker.ietf.org/doc/html/rfc8460).
14
+
3. A/CNAME Record (if needed) - points `mta-sts.<your-domain>` to your policy file.
15
+
16
+
**HTTPS Policy File**: A text file hosted at `https://<your-domain>/.well-known/mta-sts.txt`, which defines the rules for your domain’s mail servers.
17
+
18
+
### Example MTA-STS Policy for Proton Mail:
19
+
```plaintext
20
+
version: STSv1
21
+
mode: enforce
22
+
mx: mail.protonmail.ch
23
+
mx: mailsec.protonmail.ch
24
+
max_age: 604800
25
+
```
26
+
This record indicates that a domain requires MTA-STS be enforced (cert validation and connection encryption) and that only certificates for the named MX systems should be accepted.
27
+
28
+
### Purpose of This Repository
29
+
30
+
This repository automates the fetching and management of Proton's MTA-STS policy file to update my own:
31
+
32
+
1. Fetches the latest MTA-STS policy daily using a GitHub Action.
33
+
2. Overwrites the policy file stored at .well-known/mta-sts.txt in the repository.
34
+
3. Commits and pushes changes back to the repository.
0 commit comments