bugfix: imapserver "append" command: properly account for message size when bare newlines ("\n") are converted to crlf ("\r\n")

the original size, with bare newlines, was stored in the database, not the
actual adjusted file size. this caused failures when reading the message.

users may want to run "mox fixmsgsize <account>" if they imported messages from
another account over IMAP.

reported by daftaupe, thanks!
This commit is contained in:
Mechiel Lukkien
2023-12-11 15:13:57 +01:00
parent 7c1879da82
commit 02eb7b5033
2 changed files with 5 additions and 1 deletions

View File

@ -2732,7 +2732,7 @@ func (c *conn) cmdAppend(tag, cmd string, p *parser) {
Received: tm,
Flags: storeFlags,
Keywords: keywords,
Size: size,
Size: mw.Size,
}
mb.Add(m.MailboxCounts())