all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: pbs-devel@lists.proxmox.com, Shannon Sterz <s.sterz@proxmox.com>
Subject: applied: [PATCH proxmox v3] fix #7814: send-mail: normalize LF line endings to CRLF endings
Date: Sat,  7 Nov 2026 21:44:09 +0100	[thread overview]
Message-ID: <179408380156.2556107.14174123446457945969.b4-ty@b4> (raw)
In-Reply-To: <20261020143437.333073-1-s.sterz@proxmox.com>

On Tue, 20 Oct 2026 16:34:35 +0200, Shannon Sterz wrote:
> RFC5321 Section 2.3.8 requires that mails do not contain bare CR or LF
> bytes. this patch normalizes unix style LF line endings to CRLF line
> endings. it also removes bare CR bytes.
> 
> when text would be base64 encoded, CR bytes will be dropped, to keep
> the behavior for encoded and non-encoded text aligned. to comply with
> rfc 2045 section 6.8 and rfc 2047 section 4.1 line endings are also
> normalized before encoding them in headers and body text [1,2].
> 
> [...]

Applied, thanks!

[1/1] fix #7814: send-mail: normalize LF line endings to CRLF endings
      commit: 21bb4956bdbc6ebd4d2bd0ec020f4ff5835d28fc

FYI, I folded in a few changes and reworded the commit message:

- Moved both line ending loops to a shared helper normalize_line_endings().
- Filenames use char::is_control() to strip C1 control chars too.
- Custom headers get CR stripped together with LF again, so the injection
  guard does not rely on later normalization.
- I dropped the RFC 2047 reference, as that section does not require
  normalized line endings.

Note that #7814 itself is acutally about SMTP targets, which do not use
sendmail. There, lettre sends the forwarded message as is and dot-stuffs
only lines that follow a CRLF. So bare LFs reached the relay, and a line
with just a dot was not escaped. I added a follow-up that normalizes the
message with the new helper, which keeps its MIME encodings intact. See
7668648f ("fix #7814: notify: smtp: normalize forwarded mail line endings")




      parent reply	other threads:[~2026-11-07 20:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-20 14:34 [PATCH proxmox v3] fix #7814: send-mail: normalize LF line endings to CRLF endings Shannon Sterz
2026-10-21  9:38 ` Samuel Rufinatscha
2026-11-06 10:10 ` Shannon Sterz
2026-11-07 20:44 ` Thomas Lamprecht [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179408380156.2556107.14174123446457945969.b4-ty@b4 \
    --to=t.lamprecht@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    --cc=s.sterz@proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal