mirror of
https://blitiri.com.ar/repos/chasquid
synced 2025-12-18 14:47:03 +00:00
smtpsrv: Include the mode in the Received header
Including the mode (SMTP/submission) in the Received header can be useful for troubleshooting transport issues.
This commit is contained in:
@@ -50,7 +50,7 @@ type SocketMode string
|
|||||||
// Valid socket modes.
|
// Valid socket modes.
|
||||||
const (
|
const (
|
||||||
ModeSMTP SocketMode = "SMTP"
|
ModeSMTP SocketMode = "SMTP"
|
||||||
ModeSubmission SocketMode = "Submission"
|
ModeSubmission SocketMode = "submission"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Incoming SMTP connection.
|
// Incoming SMTP connection.
|
||||||
@@ -550,7 +550,7 @@ func (c *Conn) addReceivedHeader() {
|
|||||||
|
|
||||||
v += fmt.Sprintf("by %s (chasquid)\n", c.hostname)
|
v += fmt.Sprintf("by %s (chasquid)\n", c.hostname)
|
||||||
|
|
||||||
v += "(over "
|
v += fmt.Sprintf("(over %s ", c.mode)
|
||||||
if c.tlsConnState != nil {
|
if c.tlsConnState != nil {
|
||||||
v += fmt.Sprintf("%s-%s)\n",
|
v += fmt.Sprintf("%s-%s)\n",
|
||||||
tlsconst.VersionName(c.tlsConnState.Version),
|
tlsconst.VersionName(c.tlsConnState.Version),
|
||||||
|
|||||||
Reference in New Issue
Block a user