mirror of
https://github.com/mjl-/mox.git
synced 2024-12-26 08:23:48 +03:00
in imapserver, do not advertise STARTTLS if TLS isn't configured
This commit is contained in:
parent
0639c396b9
commit
44a3f9b1bc
1 changed files with 2 additions and 1 deletions
|
@ -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…
Reference in a new issue