mirror of
https://blitiri.com.ar/repos/chasquid
synced 2025-12-17 14:37:02 +00:00
chasquid: Add an expvar to count incoming TLS status
This commit is contained in:
@@ -52,6 +52,7 @@ var (
|
|||||||
responseCodeCount = expvar.NewMap("chasquid/smtpIn/responseCodeCount")
|
responseCodeCount = expvar.NewMap("chasquid/smtpIn/responseCodeCount")
|
||||||
spfResultCount = expvar.NewMap("chasquid/smtpIn/spfResultCount")
|
spfResultCount = expvar.NewMap("chasquid/smtpIn/spfResultCount")
|
||||||
loopsDetected = expvar.NewInt("chasquid/smtpIn/loopsDetected")
|
loopsDetected = expvar.NewInt("chasquid/smtpIn/loopsDetected")
|
||||||
|
tlsCount = expvar.NewMap("chasquid/smtpIn/tlsCount")
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
@@ -798,6 +799,11 @@ func (c *Conn) DATA(params string) (code int, msg string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
c.tr.Debugf("<- 354 You experience a strange sense of peace")
|
c.tr.Debugf("<- 354 You experience a strange sense of peace")
|
||||||
|
if c.onTLS {
|
||||||
|
tlsCount.Add("tls", 1)
|
||||||
|
} else {
|
||||||
|
tlsCount.Add("plain", 1)
|
||||||
|
}
|
||||||
|
|
||||||
// Increase the deadline for the data transfer to the connection-level
|
// Increase the deadline for the data transfer to the connection-level
|
||||||
// one, we don't want the command timeout to interfere.
|
// one, we don't want the command timeout to interfere.
|
||||||
|
|||||||
Reference in New Issue
Block a user