smtpserver: log an error message at debug level when we cannot parse 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.
This commit is contained in:
Mechiel Lukkien
2024-11-25 13:25:12 +01:00
parent 7f5e1087d4
commit 01deecb684

View File

@ -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))
}