@well-known-js/mta-sts
v1.0.1
Published
Generate RFC 8461 MTA-STS policies.
Maintainers
Readme
@well-known-js/mta-sts
Generate an RFC 8461 SMTP MTA-STS policy at
/.well-known/mta-sts.txt.
Installation
pnpm add @well-known-js/core @well-known-js/mta-stsUsage
import { defineConfig } from "@well-known-js/core";
import { mtaSts } from "@well-known-js/mta-sts";
export default defineConfig({
providers: [
mtaSts({
version: "STSv1",
mode: "enforce",
mx: ["mail.example.com", "*.example.net"],
maxAge: 604_800,
}),
],
});The generated policy uses the RFC-required CRLF line endings. mx is required in enforce and
testing modes and optional in none mode. maxAge is expressed in seconds and capped at the RFC
limit of 31,557,600. Internationalized MX names must be supplied as Punycode A-labels.
