mirror of
https://github.com/vdukhovni/postfix
synced 2025-08-28 12:48:01 +00:00
postfix-3.7-20211023
This commit is contained in:
parent
6b8941f03e
commit
a677a91e79
@ -25815,3 +25815,14 @@ Apologies for any names omitted.
|
||||
config_known_tcp_ports.c, mail_params.c,
|
||||
posttls-finger/posttls-finger.c, smtp/smtp_connect.c,
|
||||
util/find_inet.c, util/myaddrinfo.c.
|
||||
|
||||
20211023
|
||||
|
||||
Documentation: fixed a jq example in the postsuper manpage, to
|
||||
delete the quotes around a queue ID. File: postsuper/postsuper.c.
|
||||
|
||||
Cleanup: with "smtputf8_nable = yes" (the default), the
|
||||
postscreen(8) dummy SMTP engine will no longer log a "non-UTF-8
|
||||
key" warning when a remote SMTP client sends garbage. Instead,
|
||||
postscreen(8) will reject the command with the same server
|
||||
repsonse as smtpd(8). File: postscreen/p[ostscreen_smtpd.c.
|
||||
|
@ -49,7 +49,7 @@ POSTSUPER(1) POSTSUPER(1)
|
||||
select(.recipients[0].address == "user@example.com")
|
||||
| select(.recipients[1].address == null)
|
||||
| .queue_id
|
||||
' | postsuper -d -
|
||||
' | tr -d '"' | postsuper -d -
|
||||
|
||||
Or the historical form:
|
||||
|
||||
|
@ -51,7 +51,7 @@ postqueue \-j | jq '
|
||||
select(.recipients[0].address == "user@example.com")
|
||||
| select(.recipients[1].address == null)
|
||||
| .queue_id
|
||||
' | postsuper \-d \-
|
||||
' | tr \-d '"' | postsuper \-d \-
|
||||
.fi
|
||||
.sp
|
||||
Or the historical form:
|
||||
|
@ -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 "20211022"
|
||||
#define MAIL_RELEASE_DATE "20211023"
|
||||
#define MAIL_VERSION_NUMBER "3.7"
|
||||
|
||||
#ifdef SNAPSHOT
|
||||
|
@ -794,6 +794,7 @@ 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",
|
||||
@ -929,8 +930,22 @@ static void psc_smtpd_read_event(int event, void *context)
|
||||
}
|
||||
|
||||
/*
|
||||
* Terminate the command buffer, and apply the last-resort command
|
||||
* editing workaround.
|
||||
* 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.
|
||||
*/
|
||||
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 {
|
||||
|
||||
/*
|
||||
* Terminate the command buffer, and apply the last-resort
|
||||
* command editing workaround.
|
||||
*/
|
||||
VSTRING_TERMINATE(state->cmd_buffer);
|
||||
if (psc_cmd_filter != 0) {
|
||||
@ -949,6 +964,7 @@ static void psc_smtpd_read_event(int event, void *context)
|
||||
STR(state->cmd_buffer));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Reset the command buffer write pointer and state machine in
|
||||
@ -959,12 +975,14 @@ 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)
|
||||
@ -1078,9 +1096,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)
|
||||
@ -1088,21 +1106,24 @@ 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. */
|
||||
@ -1128,6 +1149,7 @@ 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.
|
||||
|
@ -45,7 +45,7 @@
|
||||
/* select(.recipients[0].address == "user@example.com")
|
||||
/* | select(.recipients[1].address == null)
|
||||
/* | .queue_id
|
||||
/* ' | postsuper -d -
|
||||
/* ' | tr -d '"' | postsuper -d -
|
||||
/* .fi
|
||||
/* .sp
|
||||
/* Or the historical form:
|
||||
|
Loading…
x
Reference in New Issue
Block a user