mirror of
https://github.com/mjl-/mox.git
synced 2025-07-12 12:24:38 +03:00
in starttls command in smtp & imap server, add the cid in the "ok, go ahead with tls" response
so facilitate debugging. a remote client that logs details about failing connections can give the cid to the mox operator to find the relevant logging.
This commit is contained in:
@ -1435,7 +1435,8 @@ func (c *conn) cmdStarttls(tag, cmd string, p *parser) {
|
||||
xcheckf(err, "reading buffered data for tls handshake")
|
||||
conn = &prefixConn{buf, conn}
|
||||
}
|
||||
c.ok(tag, cmd)
|
||||
// We add the cid to facilitate debugging in case of TLS connection failure.
|
||||
c.ok(tag, cmd+" ("+mox.ReceivedID(c.cid)+")")
|
||||
|
||||
cidctx := context.WithValue(mox.Context, mlog.CidKey, c.cid)
|
||||
ctx, cancel := context.WithTimeout(cidctx, time.Minute)
|
||||
|
Reference in New Issue
Block a user