mirror of
https://github.com/vdukhovni/postfix
synced 2025-09-03 07:35:20 +00:00
postfix-3.8-20220421
This commit is contained in:
committed by
Viktor Dukhovni
parent
e3ead5dfac
commit
1b1cb925cd
@@ -26351,7 +26351,7 @@ Apologies for any names omitted.
|
||||
setting to be ignored. It is now a non-fatal error. The
|
||||
same client is used by many Postfix clients (smtpd_proxy,
|
||||
dovecot auth, tcp_table, memcache, socketmap, and so on).
|
||||
File: util/inet_connect.c.
|
||||
Problem reported by Christian Degenkolb. File: util/inet_connect.c.
|
||||
|
||||
20220407
|
||||
|
||||
@@ -26365,7 +26365,8 @@ Apologies for any names omitted.
|
||||
|
||||
Cleanup (problem introduced: Postfix 2.7): milter_header_checks
|
||||
maps are now opened before the cleanup server enters the
|
||||
chroot jail. Files: cleanup/cleanup.h, cleanup/cleanup_init.c,
|
||||
chroot jail. Problem reported by Jesper Dybdal. Files:
|
||||
cleanup/cleanup.h, cleanup/cleanup_init.c,
|
||||
cleanup/cleanup_milter.c, cleanup/cleanup_state.c.
|
||||
|
||||
20220407
|
||||
@@ -26384,7 +26385,8 @@ Apologies for any names omitted.
|
||||
postfix-regexp package installed?" instead of "unsupported
|
||||
map type for this operation". This happened with all built-in
|
||||
map types (static, cidr, etc.) that have no 'bulk create'
|
||||
support. File: global/dynamicmaps.c.
|
||||
support. Problem reported by Greg Klanderman. File:
|
||||
global/dynamicmaps.c.
|
||||
|
||||
20220417
|
||||
|
||||
@@ -26393,3 +26395,13 @@ Apologies for any names omitted.
|
||||
message will not be applied to a later email message that is
|
||||
handled by the same cleanup process. File:
|
||||
cleanup/cleanup_milter.c.
|
||||
|
||||
20220421
|
||||
|
||||
Bugfix (introduced: Postfix 3.7): reverted an overly complex
|
||||
change in the postscreen SMTP engine from 20211023, that
|
||||
was segfaulting on malformed input, where the Postfix 3.6
|
||||
implementation worked properly. The purpose of the change
|
||||
was to prevent complaints about "malformed UTF8" from Postfix
|
||||
lookup tables. Replaced the change with a trivial guard.
|
||||
File: postscreen/postscreen_smtpd.c.
|
||||
|
@@ -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 "20220417"
|
||||
#define MAIL_RELEASE_DATE "20220421"
|
||||
#define MAIL_VERSION_NUMBER "3.8"
|
||||
|
||||
#ifdef SNAPSHOT
|
||||
|
@@ -794,7 +794,6 @@ static void psc_smtpd_read_event(int event, void *context)
|
||||
char *command;
|
||||
const PSC_SMTPD_COMMAND *cmdp;
|
||||
int write_stat;
|
||||
int skip_command_processing;
|
||||
|
||||
if (msg_verbose > 1)
|
||||
msg_info("%s: sq=%d cq=%d event %d on smtp socket %d from [%s]:%s flags=%s",
|
||||
@@ -930,25 +929,18 @@ static void psc_smtpd_read_event(int event, void *context)
|
||||
}
|
||||
|
||||
/*
|
||||
* As in smtpd(8), reject malformed UTF-8 when "smtputf8_enable =
|
||||
* yes". This also avoids noisy "non-UTF-8 key" warnings from
|
||||
* dict_utf8 infrastructure.
|
||||
*
|
||||
* Caution: do not skip all code in the remainder of this loop.
|
||||
* Avoid complaints from Postfix maps about malformed content.
|
||||
*/
|
||||
if ((skip_command_processing = (var_smtputf8_enable
|
||||
&& !valid_utf8_string(STR(state->cmd_buffer),
|
||||
LEN(state->cmd_buffer))))) {
|
||||
write_stat = PSC_SEND_REPLY(state,
|
||||
"500 5.5.2 Error: bad UTF-8 syntax");
|
||||
} else {
|
||||
#define PSC_BAD_UTF8(str, len) \
|
||||
(var_smtputf8_enable && !valid_utf8_string((str), (len)))
|
||||
|
||||
/*
|
||||
* Terminate the command buffer, and apply the last-resort
|
||||
* command editing workaround.
|
||||
* Terminate the command buffer, and apply the last-resort command
|
||||
* editing workaround.
|
||||
*/
|
||||
VSTRING_TERMINATE(state->cmd_buffer);
|
||||
if (psc_cmd_filter != 0) {
|
||||
if (psc_cmd_filter != 0 && !PSC_BAD_UTF8(STR(state->cmd_buffer),
|
||||
LEN(state->cmd_buffer))) {
|
||||
const char *cp;
|
||||
|
||||
for (cp = STR(state->cmd_buffer); *cp && IS_SPACE_TAB(*cp); cp++)
|
||||
@@ -964,7 +956,6 @@ static void psc_smtpd_read_event(int event, void *context)
|
||||
STR(state->cmd_buffer));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Reset the command buffer write pointer and state machine in
|
||||
@@ -975,14 +966,12 @@ static void psc_smtpd_read_event(int event, void *context)
|
||||
state->read_state = PSC_SMTPD_CMD_ST_ANY;
|
||||
VSTRING_RESET(state->cmd_buffer);
|
||||
|
||||
if (skip_command_processing == 0) {
|
||||
|
||||
/*
|
||||
* Process the command line.
|
||||
*
|
||||
* Caution: some command handlers terminate the session and destroy
|
||||
* the session state structure. When this happens we must leave
|
||||
* the SMTP engine to avoid a dangling pointer problem.
|
||||
* Caution: some command handlers terminate the session and destroy the
|
||||
* session state structure. When this happens we must leave the SMTP
|
||||
* engine to avoid a dangling pointer problem.
|
||||
*/
|
||||
cmd_buffer_ptr = STR(state->cmd_buffer);
|
||||
if (msg_verbose)
|
||||
@@ -1018,6 +1007,7 @@ static void psc_smtpd_read_event(int event, void *context)
|
||||
if ((state->flags & PSC_STATE_MASK_NSMTP_TODO_SKIP)
|
||||
== PSC_STATE_FLAG_NSMTP_TODO && cmdp->name == 0
|
||||
&& (is_header(command)
|
||||
|| PSC_BAD_UTF8(command, strlen(command))
|
||||
/* Ignore forbid_cmds lookup errors. Non-critical feature. */
|
||||
|| (*var_psc_forbid_cmds
|
||||
&& string_list_match(psc_forbid_cmds, command)))) {
|
||||
@@ -1096,9 +1086,9 @@ static void psc_smtpd_read_event(int event, void *context)
|
||||
}
|
||||
|
||||
/*
|
||||
* The following tests don't pass until the client gets all the
|
||||
* way to the RCPT TO command. However, the client can still fail
|
||||
* these tests with some later command.
|
||||
* The following tests don't pass until the client gets all the way
|
||||
* to the RCPT TO command. However, the client can still fail these
|
||||
* tests with some later command.
|
||||
*/
|
||||
if (cmdp->action == psc_rcpt_cmd) {
|
||||
if ((state->flags & PSC_STATE_MASK_BARLF_TODO_PASS_FAIL)
|
||||
@@ -1106,24 +1096,21 @@ static void psc_smtpd_read_event(int event, void *context)
|
||||
PSC_PASS_SESSION_STATE(state, "bare newline test",
|
||||
PSC_STATE_FLAG_BARLF_PASS);
|
||||
/* XXX Reset to PSC_TIME_STAMP_DISABLED on failure. */
|
||||
expire_time[PSC_TINDX_BARLF] = event_time()
|
||||
+ var_psc_barlf_ttl;
|
||||
expire_time[PSC_TINDX_BARLF] = event_time() + var_psc_barlf_ttl;
|
||||
}
|
||||
if ((state->flags & PSC_STATE_MASK_NSMTP_TODO_PASS_FAIL)
|
||||
== PSC_STATE_FLAG_NSMTP_TODO) {
|
||||
PSC_PASS_SESSION_STATE(state, "non-smtp test",
|
||||
PSC_STATE_FLAG_NSMTP_PASS);
|
||||
/* XXX Reset to PSC_TIME_STAMP_DISABLED on failure. */
|
||||
expire_time[PSC_TINDX_NSMTP] = event_time()
|
||||
+ var_psc_nsmtp_ttl;
|
||||
expire_time[PSC_TINDX_NSMTP] = event_time() + var_psc_nsmtp_ttl;
|
||||
}
|
||||
if ((state->flags & PSC_STATE_MASK_PIPEL_TODO_PASS_FAIL)
|
||||
== PSC_STATE_FLAG_PIPEL_TODO) {
|
||||
PSC_PASS_SESSION_STATE(state, "pipelining test",
|
||||
PSC_STATE_FLAG_PIPEL_PASS);
|
||||
/* XXX Reset to PSC_TIME_STAMP_DISABLED on failure. */
|
||||
expire_time[PSC_TINDX_PIPEL] = event_time()
|
||||
+ var_psc_pipel_ttl;
|
||||
expire_time[PSC_TINDX_PIPEL] = event_time() + var_psc_pipel_ttl;
|
||||
}
|
||||
}
|
||||
/* Command COUNT limit test. */
|
||||
@@ -1149,7 +1136,6 @@ static void psc_smtpd_read_event(int event, void *context)
|
||||
if (cmdp->flags & PSC_SMTPD_CMD_FLAG_DESTROY)
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Terminate the session after a write error.
|
||||
|
Reference in New Issue
Block a user