From 01deecb684676d4e14fe42e36794c7e35c3c9bd0 Mon Sep 17 00:00:00 2001 From: Mechiel Lukkien Date: Mon, 25 Nov 2024 13:25:12 +0100 Subject: [PATCH] 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. --- smtpserver/server.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/smtpserver/server.go b/smtpserver/server.go index 43ff2ca..dd87ec7 100644 --- a/smtpserver/server.go +++ b/smtpserver/server.go @@ -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)) }