2
0
mirror of https://github.com/vdukhovni/postfix synced 2025-08-31 14:17:41 +00:00

postfix-3.9-20231224

This commit is contained in:
Wietse Venema
2023-12-24 00:00:00 -05:00
committed by Viktor Dukhovni
parent f743309c6d
commit 27a36cbeed
3 changed files with 26 additions and 11 deletions

View File

@@ -27643,3 +27643,18 @@ Apologies for any names omitted.
"smtpd_forbid_bare_newline_exclusions = $mynetworks". Files:
mantools/postlink, proto/postconf.proto, global/mail_params.h,
global/smtp_stream.c, global/smtp_stream.h, smtpd/smtpd.c.
20231222
Workaround: smtpd_forbid_bare_newline broke the BDAT command.
File: smtpd/smtpd.c.
20231123
Bugfix: smtpd_forbid_bare_newline_exclusions should respect
XCLIENT overrides. File: smtpd/smtpd.c.
20231224
Reverted change 20231221 and adopted a fix by Viktor. File:
smtpd/smtpd.c.

View File

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

View File

@@ -4079,7 +4079,7 @@ static int bdat_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
*/
done = 0;
do {
int saved_forbid_bare_lf, last;
int payload_err;
/*
* Do not skip the smtp_fread_buf() call if read_len == 0. We still
@@ -4093,20 +4093,20 @@ static int bdat_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
smtp_fread_buf(state->buffer, read_len, state->client);
state->bdat_get_stream = vstream_memreopen(
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)) != 0)
vstream_longjmp(state->client, payload_err);
/*
* Read lines from the fragment. The last line may continue in the
* next fragment, or in the next chunk. TODO(wietse) find out why a
* memory stream can't have vstream exceptions.
* next fragment, or in the next chunk.
*/
do {
saved_forbid_bare_lf = smtp_forbid_bare_lf;
last = smtp_get_noexcept(state->bdat_get_buffer,
state->bdat_get_stream,
var_line_limit,
SMTP_GET_FLAG_APPEND);
smtp_forbid_bare_lf = saved_forbid_bare_lf;
if (last == '\n') {
if (smtp_get_noexcept(state->bdat_get_buffer,
state->bdat_get_stream,
var_line_limit,
SMTP_GET_FLAG_APPEND) == '\n') {
/* Stopped at end-of-line. */
curr_rec_type = REC_TYPE_NORM;
} else if (!vstream_feof(state->bdat_get_stream)) {