2
0
mirror of https://github.com/vdukhovni/postfix synced 2025-08-30 21:55:20 +00:00

postfix-3.9-20231222

This commit is contained in:
Wietse Venema
2023-12-22 00:00:00 -05:00
committed by Viktor Dukhovni
parent dd0f14446a
commit f7f63b0b66
4 changed files with 14 additions and 15 deletions

View File

@@ -995,7 +995,7 @@ SMTPD(8) SMTPD(8)
Disconnect remote SMTP clients that violate <a href="https://tools.ietf.org/html/rfc2920">RFC 2920</a> (or 5321) Disconnect remote SMTP clients that violate <a href="https://tools.ietf.org/html/rfc2920">RFC 2920</a> (or 5321)
command pipelining constraints. command pipelining constraints.
Available in Postfix 3.9, 3.8.3, 3.7.9, 3.6.13, 3.5.23 and later: Available in Postfix 3.9, 3.8.4, 3.7.9, 3.6.13, 3.5.23 and later:
<b><a href="postconf.5.html#smtpd_forbid_bare_newline">smtpd_forbid_bare_newline</a> (Postfix</b> &gt;<b>= 3.9: yes)</b> <b><a href="postconf.5.html#smtpd_forbid_bare_newline">smtpd_forbid_bare_newline</a> (Postfix</b> &gt;<b>= 3.9: yes)</b>
Reply with "Error: bare &lt;LF&gt; received" and disconnect when a Reply with "Error: bare &lt;LF&gt; received" and disconnect when a

View File

@@ -869,7 +869,7 @@ Available in Postfix 3.9, 3.8.1, 3.7.6, 3.6.10, 3.5.20 and later:
Disconnect remote SMTP clients that violate RFC 2920 (or 5321) Disconnect remote SMTP clients that violate RFC 2920 (or 5321)
command pipelining constraints. command pipelining constraints.
.PP .PP
Available in Postfix 3.9, 3.8.3, 3.7.9, 3.6.13, 3.5.23 and later: Available in Postfix 3.9, 3.8.4, 3.7.9, 3.6.13, 3.5.23 and later:
.IP "\fBsmtpd_forbid_bare_newline (Postfix >= 3.9: yes)\fR" .IP "\fBsmtpd_forbid_bare_newline (Postfix >= 3.9: yes)\fR"
Reply with "Error: bare <LF> received" and disconnect Reply with "Error: bare <LF> received" and disconnect
when a remote SMTP client sends a line ending in <LF>, violating when a remote SMTP client sends a line ending in <LF>, violating

View File

@@ -20,7 +20,7 @@
* Patches change both the patchlevel and the release date. Snapshots have no * Patches change both the patchlevel and the release date. Snapshots have no
* patchlevel; they change the release date only. * patchlevel; they change the release date only.
*/ */
#define MAIL_RELEASE_DATE "20231221" #define MAIL_RELEASE_DATE "20231222"
#define MAIL_VERSION_NUMBER "3.9" #define MAIL_VERSION_NUMBER "3.9"
#ifdef SNAPSHOT #ifdef SNAPSHOT

View File

@@ -823,7 +823,7 @@
/* Disconnect remote SMTP clients that violate RFC 2920 (or 5321) /* Disconnect remote SMTP clients that violate RFC 2920 (or 5321)
/* command pipelining constraints. /* command pipelining constraints.
/* .PP /* .PP
/* Available in Postfix 3.9, 3.8.3, 3.7.9, 3.6.13, 3.5.23 and later: /* Available in Postfix 3.9, 3.8.4, 3.7.9, 3.6.13, 3.5.23 and later:
/* .IP "\fBsmtpd_forbid_bare_newline (Postfix >= 3.9: yes)\fR" /* .IP "\fBsmtpd_forbid_bare_newline (Postfix >= 3.9: yes)\fR"
/* Reply with "Error: bare <LF> received" and disconnect /* Reply with "Error: bare <LF> received" and disconnect
/* when a remote SMTP client sends a line ending in <LF>, violating /* when a remote SMTP client sends a line ending in <LF>, violating
@@ -4079,7 +4079,7 @@ static int bdat_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
*/ */
done = 0; done = 0;
do { do {
int payload_err; int saved_forbid_bare_lf, last;
/* /*
* Do not skip the smtp_fread_buf() call if read_len == 0. We still * Do not skip the smtp_fread_buf() call if read_len == 0. We still
@@ -4093,21 +4093,20 @@ static int bdat_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
smtp_fread_buf(state->buffer, read_len, state->client); smtp_fread_buf(state->buffer, read_len, state->client);
state->bdat_get_stream = vstream_memreopen( state->bdat_get_stream = vstream_memreopen(
state->bdat_get_stream, state->buffer, O_RDONLY); state->bdat_get_stream, state->buffer, O_RDONLY);
vstream_control(state->bdat_get_stream, CA_VSTREAM_CTL_EXCEPT,
CA_VSTREAM_CTL_END);
if ((payload_err = vstream_setjmp(state->bdat_get_stream))
!= SMTP_ERR_NONE)
vstream_longjmp(state->client, payload_err);
/* /*
* Read lines from the fragment. The last line may continue in the * Read lines from the fragment. The last line may continue in the
* next fragment, or in the next chunk. * next fragment, or in the next chunk. TODO(wietse) find out why a
* memory stream can't have vstream exceptions.
*/ */
do { do {
if (smtp_get_noexcept(state->bdat_get_buffer, saved_forbid_bare_lf = smtp_forbid_bare_lf;
last = smtp_get_noexcept(state->bdat_get_buffer,
state->bdat_get_stream, state->bdat_get_stream,
var_line_limit, var_line_limit,
SMTP_GET_FLAG_APPEND) == '\n') { SMTP_GET_FLAG_APPEND);
smtp_forbid_bare_lf = saved_forbid_bare_lf;
if (last == '\n') {
/* Stopped at end-of-line. */ /* Stopped at end-of-line. */
curr_rec_type = REC_TYPE_NORM; curr_rec_type = REC_TYPE_NORM;
} else if (!vstream_feof(state->bdat_get_stream)) { } else if (!vstream_feof(state->bdat_get_stream)) {