mirror of
https://github.com/mjl-/mox.git
synced 2025-06-28 02:28:15 +03:00
in imapserver, do not advertise STARTTLS if TLS isn't configured
This commit is contained in:
parent
0639c396b9
commit
44a3f9b1bc
@ -1291,7 +1291,8 @@ func (c *conn) cmdCapability(tag, cmd string, p *parser) {
|
||||
func (c *conn) capabilities() string {
|
||||
caps := serverCapabilities
|
||||
// ../rfc/9051:1238
|
||||
if !c.tls {
|
||||
// We only allow starting without TLS when explicitly configured, in violation of RFC.
|
||||
if !c.tls && c.tlsConfig != nil {
|
||||
caps += " STARTTLS"
|
||||
}
|
||||
if c.tls || c.noRequireSTARTTLS {
|
||||
|
Loading…
x
Reference in New Issue
Block a user