No legacy listener can be added while the switch is off (LP-4)
While legacy mail protocols are off, x:NetworkListener/set refuses to create a listener the switch would close, and refuses an update that would turn an existing one into such a listener -- otherwise changing a listener's protocol would walk straight past the check. The refusal is invalidProperties on protocol (or on bind, for a submission listener once SMTP is unlocked, since its port is what makes it one), and its description names inbuxa:ProtocolPolicy and says to turn legacy protocols back on first. The rule is the switch's own, listeners::closes, so what can't be added is exactly what the switch would close: locked protocols (SMTP, LMTP, HTTP) and the inbound port are never refused. Putting saved listeners back (LP-5) writes through the registry, not /set, so it is unaffected. The e2e changes with it. LP-6's check that an IMAP listener "created by mistake" refuses sign-in can't be set up any more -- LP-4 is what stops that listener existing -- so that step now proves test 4 instead: creating an IMAP listener is refused, naming the policy; an SMTP listener can still be created; and updating it to IMAP is refused. LP-6 stays proven live over submission, and its IMAP wording by unit tests. All checks pass.
This commit is contained in:
@@ -502,6 +502,11 @@ impl RegistrySet for Server {
|
||||
)
|
||||
.await?
|
||||
}
|
||||
// inbuxa: legacy-protocols LP-4
|
||||
ObjectInner::NetworkListener(listener) => {
|
||||
crate::inbuxa::protocol_policy::validate_listener(&set, listener)
|
||||
.await?
|
||||
}
|
||||
// inbuxa: ME-12 to ME-17
|
||||
ObjectInner::MaskedEmail(mask) => {
|
||||
let old = match &modification {
|
||||
|
||||
Reference in New Issue
Block a user