mirror of
https://github.com/mjl-/mox.git
synced 2025-07-14 14:54:36 +03:00
write base64 message parts with 76 data bytes on a line instead of 78
As required by RFC 2045 (MIME). The 78 byte lines work in practice, except that SpamAssassin has rules that give messages with 78-byte lines spam points. Mentioned by kjetilho on irc.
This commit is contained in:
@ -831,7 +831,7 @@ func (w Webmail) MessageSubmit(ctx context.Context, m SubmitMessage) {
|
||||
|
||||
for len(base64Data) > 0 {
|
||||
line := base64Data
|
||||
n := min(len(line), 78)
|
||||
n := min(len(line), 76) // ../rfc/2045:1372
|
||||
line, base64Data = base64Data[:n], base64Data[n:]
|
||||
_, err := ap.Write(line)
|
||||
xcheckf(ctx, err, "writing attachment")
|
||||
|
Reference in New Issue
Block a user