mirror of
https://github.com/mjl-/mox.git
synced 2025-07-10 07:54:40 +03:00
more logging around smtp and mtasts tls connections
i wondered why self-signed mtasts certs didn't result in delivery failure. it's because it was a first-time request of the mtasts policy (clean test container). and for that case it means mtasts should be ignored.
This commit is contained in:
@ -509,7 +509,7 @@ func (c *Client) hello(ctx context.Context, tlsMode TLSMode, remoteHostname, aut
|
||||
|
||||
// Attempt TLS if remote understands STARTTLS or if caller requires it.
|
||||
if c.extStartTLS && tlsMode != TLSSkip || tlsMode == TLSStrict {
|
||||
c.log.Debug("starting tls client")
|
||||
c.log.Debug("starting tls client", mlog.Field("tlsmode", tlsMode), mlog.Field("servername", remoteHostname))
|
||||
c.cmds[0] = "starttls"
|
||||
c.cmdStart = time.Now()
|
||||
c.xwritelinef("STARTTLS")
|
||||
@ -556,7 +556,7 @@ func (c *Client) hello(ctx context.Context, tlsMode TLSMode, remoteHostname, aut
|
||||
c.w = bufio.NewWriter(c.tw)
|
||||
|
||||
tlsversion, ciphersuite := mox.TLSInfo(nconn)
|
||||
c.log.Debug("tls client handshake done", mlog.Field("tls", tlsversion), mlog.Field("ciphersuite", ciphersuite))
|
||||
c.log.Debug("tls client handshake done", mlog.Field("tls", tlsversion), mlog.Field("ciphersuite", ciphersuite), mlog.Field("servername", remoteHostname), mlog.Field("insecureskipverify", tlsConfig.InsecureSkipVerify))
|
||||
|
||||
hello(false)
|
||||
}
|
||||
|
Reference in New Issue
Block a user