Implement REQUIRETLS, and say why the other four stay out
The five "niche extensions" were one bullet, which hid that they are two
different kinds of thing and that four of them were already answered
correctly.
MT-PRIORITY, DELIVERBY, FUTURERELEASE and ETRN are queue features: one
orders a queue, one bounces from it on a deadline, one holds in it until a
time, one flushes it on demand. This library has no queue, so their wire
syntax without their semantics would advertise something nothing here
could honour. They are already answered right -- 555 for a parameter
never advertised, per RFC 5321 §4.1.1.11, and 500 for a command from an
extension never offered -- and the README now says that rather than
listing them as an oversight. Ignoring them is the one answer that would
be wrong.
REQUIRETLS is different in kind, which is why it is implemented: it is a
security feature, not a queue feature, and the sender's meaning is
"bounce this rather than let it travel in the clear".
Advertising it is a promise, and the code says so out loud. RFC 8689
requires a server offering the keyword to honour the requirement, and a
client that does not see it must quit and try another MX, refusing the
domain outright if none offers it -- so the keyword is load-bearing in a
way most are not. This library can keep no part of that promise itself;
it does not relay. `Options.requiretls` is therefore the caller
undertaking to honour it, defaults false, and is advertised only while
the session employs TLS. A parameter arriving where it was never offered
gets 555 rather than being quietly disregarded: accepting and ignoring it
would turn a sender's refusal to be downgraded into a downgrade.
The client refuses to send it over a session it does not believe is
encrypted. The rest of §4.1's preconditions -- a certificate validated by
a trust chain or DANE, an MX vouched for by DNSSEC or MTA-STS -- are not
visible from a library that is handed a reader and a writer and resolves
nothing, so they are documented as the caller's. The demo CLI knows more
than the library does and refuses --requiretls beside --insecure.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SDrB41sGu5k1ubD1ufbxqC