From 54981fbc9392ecfb4ae67ba6f1597c3760aed8f8 Mon Sep 17 00:00:00 2001 From: Mechiel Lukkien Date: Wed, 22 Feb 2023 10:43:21 +0100 Subject: [PATCH] add a todo for preventing message content from being logged on common imap append to Sent --- imapserver/server.go | 1 + 1 file changed, 1 insertion(+) diff --git a/imapserver/server.go b/imapserver/server.go index 3178fdf..72a3d64 100644 --- a/imapserver/server.go +++ b/imapserver/server.go @@ -605,6 +605,7 @@ func serve(listenerName string, cid int64, tlsConfig *tls.Config, nc net.Conn, x }) c.tr = moxio.NewTraceReader(c.log, "C: ", c.conn) c.tw = moxio.NewTraceWriter(c.log, "S: ", c) + // todo: tracing should be done on whatever comes out of c.br. the remote connection write a command plus data, and bufio can read it in one read, causing a command parser that sets the tracing level to data to have no effect. we are now typically logging sent messages, when mail clients append to the Sent mailbox. c.br = bufio.NewReader(c.tr) c.bw = bufio.NewWriter(c.tw)