mirror of
https://github.com/vdukhovni/postfix
synced 2025-08-31 22:25:24 +00:00
postfix-3.5.14
This commit is contained in:
committed by
Viktor Dukhovni
parent
638bd9a5b2
commit
162a905abb
@@ -25055,3 +25055,34 @@ Apologies for any names omitted.
|
|||||||
previously occupied by the original message body.
|
previously occupied by the original message body.
|
||||||
|
|
||||||
Problem report by Benoît Panizzon.
|
Problem report by Benoît Panizzon.
|
||||||
|
|
||||||
|
20211115
|
||||||
|
|
||||||
|
Bugfix (introduced: 20210708): duplicate bounce_notice_recipient
|
||||||
|
entries in postconf output. The fix to send SMTP session
|
||||||
|
transcripts to bounce_notice_recipient was incomplete.
|
||||||
|
Reported by Vincent Lefevre. File: smtpd/smtpd.c.
|
||||||
|
|
||||||
|
20211216
|
||||||
|
|
||||||
|
Bugfix (introduced: Postfix 3.0): the proxymap daemon did
|
||||||
|
not automatically authorize proxied maps inside pipemap
|
||||||
|
(example: pipemap:{proxy:maptype:mapname, ...}) or inside
|
||||||
|
unionmap. Problem reported by Mirko Vogt. Files:
|
||||||
|
proxymap/proxymap.c.
|
||||||
|
|
||||||
|
20211220
|
||||||
|
|
||||||
|
Bugfix (introduced: Postfix 2.5): off-by-one error while
|
||||||
|
writing a string terminator. This code had passed all memory
|
||||||
|
corruption tests, presumably because it wrote over an
|
||||||
|
alignment padding byte, or over an adjacent character byte
|
||||||
|
that was never read. Reported by Robert Siemer. Files:
|
||||||
|
*qmgr/qmgr_feedback.c.
|
||||||
|
|
||||||
|
20211223
|
||||||
|
|
||||||
|
Cleanup: added missing _maps parameter names to the
|
||||||
|
proxy_read_maps default value, based on output from the
|
||||||
|
mantools/missing-proxy-read-maps script. File:
|
||||||
|
global/mail_params.h.
|
||||||
|
@@ -2442,7 +2442,10 @@ extern int var_local_rcpt_code;
|
|||||||
" $" VAR_SMTPD_EHLO_DIS_MAPS \
|
" $" VAR_SMTPD_EHLO_DIS_MAPS \
|
||||||
" $" VAR_SMTPD_MILTER_MAPS \
|
" $" VAR_SMTPD_MILTER_MAPS \
|
||||||
" $" VAR_VIRT_GID_MAPS \
|
" $" VAR_VIRT_GID_MAPS \
|
||||||
" $" VAR_VIRT_UID_MAPS
|
" $" VAR_VIRT_UID_MAPS \
|
||||||
|
" $" VAR_PSC_REJ_FTR_MAPS \
|
||||||
|
" $" VAR_SMTPD_REJ_FTR_MAPS \
|
||||||
|
" $" VAR_TLS_SERVER_SNI_MAPS
|
||||||
extern char *var_proxy_read_maps;
|
extern char *var_proxy_read_maps;
|
||||||
|
|
||||||
#define VAR_PROXY_WRITE_MAPS "proxy_write_maps"
|
#define VAR_PROXY_WRITE_MAPS "proxy_write_maps"
|
||||||
|
@@ -20,8 +20,8 @@
|
|||||||
* 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 "20211107"
|
#define MAIL_RELEASE_DATE "20220114"
|
||||||
#define MAIL_VERSION_NUMBER "3.5.13"
|
#define MAIL_VERSION_NUMBER "3.5.14"
|
||||||
|
|
||||||
#ifdef SNAPSHOT
|
#ifdef SNAPSHOT
|
||||||
#define MAIL_VERSION_DATE "-" MAIL_RELEASE_DATE
|
#define MAIL_VERSION_DATE "-" MAIL_RELEASE_DATE
|
||||||
|
@@ -109,7 +109,7 @@ void qmgr_feedback_init(QMGR_FEEDBACK *fb,
|
|||||||
double enum_val;
|
double enum_val;
|
||||||
char denom_str[30 + 1];
|
char denom_str[30 + 1];
|
||||||
double denom_val;
|
double denom_val;
|
||||||
char slash;
|
char slash[1 + 1];
|
||||||
char junk;
|
char junk;
|
||||||
char *fbck_name;
|
char *fbck_name;
|
||||||
char *fbck_val;
|
char *fbck_val;
|
||||||
@@ -135,7 +135,7 @@ void qmgr_feedback_init(QMGR_FEEDBACK *fb,
|
|||||||
fb->base = -1; /* assume error */
|
fb->base = -1; /* assume error */
|
||||||
|
|
||||||
switch (sscanf(fbck_val, "%lf %1[/] %30s%c",
|
switch (sscanf(fbck_val, "%lf %1[/] %30s%c",
|
||||||
&enum_val, &slash, denom_str, &junk)) {
|
&enum_val, slash, denom_str, &junk)) {
|
||||||
case 1:
|
case 1:
|
||||||
fb->index = QMGR_FEEDBACK_IDX_NONE;
|
fb->index = QMGR_FEEDBACK_IDX_NONE;
|
||||||
fb->base = enum_val;
|
fb->base = enum_val;
|
||||||
|
@@ -232,6 +232,8 @@
|
|||||||
#include <htable.h>
|
#include <htable.h>
|
||||||
#include <stringops.h>
|
#include <stringops.h>
|
||||||
#include <dict.h>
|
#include <dict.h>
|
||||||
|
#include <dict_pipe.h>
|
||||||
|
#include <dict_union.h>
|
||||||
|
|
||||||
/* Global library. */
|
/* Global library. */
|
||||||
|
|
||||||
@@ -296,6 +298,27 @@ static int proxy_writer;
|
|||||||
#define STR(x) vstring_str(x)
|
#define STR(x) vstring_str(x)
|
||||||
#define VSTREQ(x,y) (strcmp(STR(x),y) == 0)
|
#define VSTREQ(x,y) (strcmp(STR(x),y) == 0)
|
||||||
|
|
||||||
|
/* get_nested_dict_name - return nested dictionary name pointer, or null */
|
||||||
|
|
||||||
|
static char *get_nested_dict_name(char *type_name)
|
||||||
|
{
|
||||||
|
const struct {
|
||||||
|
const char *type_col;
|
||||||
|
ssize_t type_col_len;
|
||||||
|
} *prefix, prefixes[] = {
|
||||||
|
DICT_TYPE_UNION ":", (sizeof(DICT_TYPE_UNION ":") - 1),
|
||||||
|
DICT_TYPE_PIPE ":", (sizeof(DICT_TYPE_PIPE ":") - 1),
|
||||||
|
};
|
||||||
|
|
||||||
|
#define COUNT_OF(x) (sizeof(x)/sizeof((x)[0]))
|
||||||
|
|
||||||
|
for (prefix = prefixes; prefix < prefixes + COUNT_OF(prefixes); prefix++) {
|
||||||
|
if (strncmp(type_name, prefix->type_col, prefix->type_col_len) == 0)
|
||||||
|
return (type_name + prefix->type_col_len);
|
||||||
|
}
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
|
|
||||||
/* proxy_map_find - look up or open table */
|
/* proxy_map_find - look up or open table */
|
||||||
|
|
||||||
static DICT *proxy_map_find(const char *map_type_name, int request_flags,
|
static DICT *proxy_map_find(const char *map_type_name, int request_flags,
|
||||||
@@ -661,15 +684,68 @@ DICT *dict_proxy_open(const char *map, int open_flags, int dict_flags)
|
|||||||
return (dict_open(map, open_flags, dict_flags));
|
return (dict_open(map, open_flags, dict_flags));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* authorize_proxied_maps - recursively authorize maps */
|
||||||
|
|
||||||
|
static void authorize_proxied_maps(char *bp)
|
||||||
|
{
|
||||||
|
const char *sep = CHARS_COMMA_SP;
|
||||||
|
const char *parens = CHARS_BRACE;
|
||||||
|
char *type_name;
|
||||||
|
|
||||||
|
while ((type_name = mystrtokq(&bp, sep, parens)) != 0) {
|
||||||
|
char *nested_info;
|
||||||
|
|
||||||
|
/* Maybe { maptype:mapname attr=value... } */
|
||||||
|
if (*type_name == parens[0]) {
|
||||||
|
char *err;
|
||||||
|
|
||||||
|
/* Warn about blatant syntax error. */
|
||||||
|
if ((err = extpar(&type_name, parens, EXTPAR_FLAG_NONE)) != 0) {
|
||||||
|
msg_warn("bad %s parameter value: %s",
|
||||||
|
PROXY_MAP_PARAM_NAME(proxy_writer), err);
|
||||||
|
myfree(err);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
/* Don't try to second-guess the semantics of { }. */
|
||||||
|
if ((type_name = mystrtokq(&type_name, sep, parens)) == 0)
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
/* Recurse into nested map (pipemap, unionmap). */
|
||||||
|
if ((nested_info = get_nested_dict_name(type_name)) != 0) {
|
||||||
|
char *err;
|
||||||
|
|
||||||
|
if (*nested_info != parens[0])
|
||||||
|
continue;
|
||||||
|
/* Warn about blatant syntax error. */
|
||||||
|
if ((err = extpar(&nested_info, parens, EXTPAR_FLAG_NONE)) != 0) {
|
||||||
|
msg_warn("bad %s parameter value: %s",
|
||||||
|
PROXY_MAP_PARAM_NAME(proxy_writer), err);
|
||||||
|
myfree(err);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
authorize_proxied_maps(nested_info);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (strncmp(type_name, PROXY_COLON, PROXY_COLON_LEN))
|
||||||
|
continue;
|
||||||
|
do {
|
||||||
|
type_name += PROXY_COLON_LEN;
|
||||||
|
} while (!strncmp(type_name, PROXY_COLON, PROXY_COLON_LEN));
|
||||||
|
if (strchr(type_name, ':') != 0
|
||||||
|
&& htable_locate(proxy_auth_maps, type_name) == 0) {
|
||||||
|
(void) htable_enter(proxy_auth_maps, type_name, (void *) 0);
|
||||||
|
if (msg_verbose)
|
||||||
|
msg_info("whitelisting %s from %s", type_name,
|
||||||
|
PROXY_MAP_PARAM_NAME(proxy_writer));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* post_jail_init - initialization after privilege drop */
|
/* post_jail_init - initialization after privilege drop */
|
||||||
|
|
||||||
static void post_jail_init(char *service_name, char **unused_argv)
|
static void post_jail_init(char *service_name, char **unused_argv)
|
||||||
{
|
{
|
||||||
const char *sep = CHARS_COMMA_SP;
|
|
||||||
const char *parens = CHARS_BRACE;
|
|
||||||
char *saved_filter;
|
char *saved_filter;
|
||||||
char *bp;
|
|
||||||
char *type_name;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Are we proxy writer?
|
* Are we proxy writer?
|
||||||
@@ -692,38 +768,10 @@ static void post_jail_init(char *service_name, char **unused_argv)
|
|||||||
/*
|
/*
|
||||||
* Prepare the pre-approved list of proxied tables.
|
* Prepare the pre-approved list of proxied tables.
|
||||||
*/
|
*/
|
||||||
saved_filter = bp = mystrdup(proxy_writer ? var_proxy_write_maps :
|
saved_filter = mystrdup(proxy_writer ? var_proxy_write_maps :
|
||||||
var_proxy_read_maps);
|
var_proxy_read_maps);
|
||||||
proxy_auth_maps = htable_create(13);
|
proxy_auth_maps = htable_create(13);
|
||||||
while ((type_name = mystrtokq(&bp, sep, parens)) != 0) {
|
authorize_proxied_maps(saved_filter);
|
||||||
/* Maybe { maptype:mapname attr=value... } */
|
|
||||||
if (*type_name == parens[0]) {
|
|
||||||
char *err;
|
|
||||||
|
|
||||||
/* Warn about blatant syntax error. */
|
|
||||||
if ((err = extpar(&type_name, parens, EXTPAR_FLAG_NONE)) != 0) {
|
|
||||||
msg_warn("bad %s parameter value: %s",
|
|
||||||
PROXY_MAP_PARAM_NAME(proxy_writer), err);
|
|
||||||
myfree(err);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
/* Don't try to second-guess the semantics of { }. */
|
|
||||||
if ((type_name = mystrtokq(&type_name, sep, parens)) == 0)
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (strncmp(type_name, PROXY_COLON, PROXY_COLON_LEN))
|
|
||||||
continue;
|
|
||||||
do {
|
|
||||||
type_name += PROXY_COLON_LEN;
|
|
||||||
} while (!strncmp(type_name, PROXY_COLON, PROXY_COLON_LEN));
|
|
||||||
if (strchr(type_name, ':') != 0
|
|
||||||
&& htable_locate(proxy_auth_maps, type_name) == 0) {
|
|
||||||
(void) htable_enter(proxy_auth_maps, type_name, (void *) 0);
|
|
||||||
if (msg_verbose)
|
|
||||||
msg_info("whitelisting %s from %s", type_name,
|
|
||||||
PROXY_MAP_PARAM_NAME(proxy_writer));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
myfree(saved_filter);
|
myfree(saved_filter);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@@ -109,7 +109,7 @@ void qmgr_feedback_init(QMGR_FEEDBACK *fb,
|
|||||||
double enum_val;
|
double enum_val;
|
||||||
char denom_str[30 + 1];
|
char denom_str[30 + 1];
|
||||||
double denom_val;
|
double denom_val;
|
||||||
char slash;
|
char slash[1 + 1];
|
||||||
char junk;
|
char junk;
|
||||||
char *fbck_name;
|
char *fbck_name;
|
||||||
char *fbck_val;
|
char *fbck_val;
|
||||||
@@ -135,7 +135,7 @@ void qmgr_feedback_init(QMGR_FEEDBACK *fb,
|
|||||||
fb->base = -1; /* assume error */
|
fb->base = -1; /* assume error */
|
||||||
|
|
||||||
switch (sscanf(fbck_val, "%lf %1[/] %30s%c",
|
switch (sscanf(fbck_val, "%lf %1[/] %30s%c",
|
||||||
&enum_val, &slash, denom_str, &junk)) {
|
&enum_val, slash, denom_str, &junk)) {
|
||||||
case 1:
|
case 1:
|
||||||
fb->index = QMGR_FEEDBACK_IDX_NONE;
|
fb->index = QMGR_FEEDBACK_IDX_NONE;
|
||||||
fb->base = enum_val;
|
fb->base = enum_val;
|
||||||
|
@@ -6419,7 +6419,7 @@ int main(int argc, char **argv)
|
|||||||
VAR_EOD_CHECKS, DEF_EOD_CHECKS, &var_eod_checks, 0, 0,
|
VAR_EOD_CHECKS, DEF_EOD_CHECKS, &var_eod_checks, 0, 0,
|
||||||
VAR_MAPS_RBL_DOMAINS, DEF_MAPS_RBL_DOMAINS, &var_maps_rbl_domains, 0, 0,
|
VAR_MAPS_RBL_DOMAINS, DEF_MAPS_RBL_DOMAINS, &var_maps_rbl_domains, 0, 0,
|
||||||
VAR_RBL_REPLY_MAPS, DEF_RBL_REPLY_MAPS, &var_rbl_reply_maps, 0, 0,
|
VAR_RBL_REPLY_MAPS, DEF_RBL_REPLY_MAPS, &var_rbl_reply_maps, 0, 0,
|
||||||
VAR_BOUNCE_RCPT, DEF_ERROR_RCPT, &var_bounce_rcpt, 1, 0,
|
VAR_BOUNCE_RCPT, DEF_BOUNCE_RCPT, &var_bounce_rcpt, 1, 0,
|
||||||
VAR_ERROR_RCPT, DEF_ERROR_RCPT, &var_error_rcpt, 1, 0,
|
VAR_ERROR_RCPT, DEF_ERROR_RCPT, &var_error_rcpt, 1, 0,
|
||||||
VAR_REST_CLASSES, DEF_REST_CLASSES, &var_rest_classes, 0, 0,
|
VAR_REST_CLASSES, DEF_REST_CLASSES, &var_rest_classes, 0, 0,
|
||||||
VAR_CANONICAL_MAPS, DEF_CANONICAL_MAPS, &var_canonical_maps, 0, 0,
|
VAR_CANONICAL_MAPS, DEF_CANONICAL_MAPS, &var_canonical_maps, 0, 0,
|
||||||
|
Reference in New Issue
Block a user