Skip to content

Commit

Permalink
smtpserver: log an error message at debug level when we cannot parse …
Browse files Browse the repository at this point in the history
…a message for the smtputf8 check

instead of not logging any message. this should make it easier to debug.

based on delivery issue due to smtputf8 seen by wneessen.
  • Loading branch information
mjl- committed Nov 25, 2024
1 parent 7f5e108 commit 01deecb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions smtpserver/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -1853,6 +1853,9 @@ func (c *conn) cmdData(p *parser) {
c.msgsmtputf8 = c.isSMTPUTF8Required(part)
}
}
if err != nil {
c.log.Debugx("parsing message for smtputf8 check", err)
}
if c.smtputf8 != c.msgsmtputf8 {
c.log.Debug("smtputf8 flag changed", slog.Bool("smtputf8", c.smtputf8), slog.Bool("msgsmtputf8", c.msgsmtputf8))
}
Expand Down

0 comments on commit 01deecb

Please sign in to comment.