From 013af62116cc617cb90ac2a9f35aa05888e19149 Mon Sep 17 00:00:00 2001 From: xrstf Date: Mon, 6 Apr 2026 17:39:51 +0200 Subject: [PATCH] maillog: Fix empty lines in the authentication log entries In maillog.Auth, we currently have a newline in the log entry args. The blitiri.com.ar/go/log package handles trailing newlines, but only in the format parameter, not in the args. Because of this, the authentication log entries in the maillog currently end with an extra newline. This patch fixes the problem by removing the unnecessary newline from the message. https://github.com/albertito/chasquid/pull/82 Amended-by: Alberto Bertogli Adjusted commit message. --- internal/maillog/maillog.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/maillog/maillog.go b/internal/maillog/maillog.go index b117ff2..6e2b8f3 100644 --- a/internal/maillog/maillog.go +++ b/internal/maillog/maillog.go @@ -96,7 +96,7 @@ func (l *Logger) Auth(netAddr net.Addr, user string, successful bool) { if !successful { res = "failed" } - msg := fmt.Sprintf("%s auth %s for %s\n", netAddr, res, user) + msg := fmt.Sprintf("%s auth %s for %s", netAddr, res, user) l.printf("%s", msg) authLog.Debugf("%s", msg) }