Skip to content

Publish TLS-RPT

TLS-RPT publishes the destination for aggregate SMTP transport failure reports. The mailbox must actually receive mail and handle large compressed JSON reports.

Setup

Prepare your values and Debian packages. Replace the example domain and IP.

Provide a receiving REPORT_MAILBOX. Publish the DNS TXT value printed by this block at your provider:

. /root/mailserver.env
printf '_smtp._tls.%s. IN TXT "v=TLSRPTv1; rua=mailto:%s"\n' "$DOMAIN" "$REPORT_MAILBOX"

Test

set -euo pipefail
. /root/mailserver.env
dig "_smtp._tls.$DOMAIN" TXT +short
python3 - <<'PY'
import dns.resolver, os
values = ["".join(p.decode() for p in r.strings) for r in dns.resolver.resolve("_smtp._tls." + os.environ["DOMAIN"], "TXT")]
records = [r for r in values if r.startswith("v=TLSRPTv1;")]
assert len(records) == 1
assert "rua=mailto:" + os.environ["REPORT_MAILBOX"] in records[0]
print("PASS: a single TLS-RPT policy with the expected mailbox is published.")
PY

This test confirms DNS and the report destination. It does not prove mailbox delivery or processing of a real report. Check these separately with an external test message and an actual received TLS-RPT report.