2
0
mirror of https://github.com/vdukhovni/postfix synced 2025-08-30 05:38:06 +00:00

postfix-3.9-20240228

This commit is contained in:
Wietse Z Venema 2024-02-28 00:00:00 -05:00 committed by Viktor Dukhovni
parent f38f9d82f3
commit 3cb9a575a0
7 changed files with 68 additions and 58 deletions

View File

@ -27934,3 +27934,11 @@ Apologies for any names omitted.
Documentation: document the need to disable regular expression Documentation: document the need to disable regular expression
special characters when using $name inside an inlined special characters when using $name inside an inlined
pattern. Files: proto/pcre_table, proto/regexp_table. pattern. Files: proto/pcre_table, proto/regexp_table.
20240228
Cleanups. Fixed some dns_rr_create() calls in test code,
and reverted a workaround in the DNS record formatter;
files: dns/dns_rr_test.c, dns/dns_strrecord.c. Code formatting;
file: global/nail_addr_find.c. Added missing test reference;
file: postconf/test76.ref.

View File

@ -1,13 +1,15 @@
Wish list: Wish list:
The postconf command needs more mongodb tests.
Things to do before the stable release: Things to do before the stable release:
make pre-release-check, HTML validator check. make pre-release-check, HTML validator check.
Disable -DSNAPSHOT and -DNONPROD in makedefs. Disable -DSNAPSHOT and -DNONPROD in makedefs.
The postconf command needs more mongodb tests.
The mongodb client needs tests.
Remove .printfck directories, and remove printfck targets Remove .printfck directories, and remove printfck targets
from Makefiles. from Makefiles.
@ -23,11 +25,6 @@ Wish list:
Update DKIM examples for signing with the benefits of forced Update DKIM examples for signing with the benefits of forced
MIME converison with "force_mime_input_conversion = yes" MIME converison with "force_mime_input_conversion = yes"
Deprecate permit_mx_backup. It is fundamentally incompatible
with recipient address validation. There is no way to fix that:
reject_unverified_recipient requires that the domain is reachable,
and in that case, permit_mx_backup is not needed.
Scan Postfix code with github.com/googleprojectzero/weggli Scan Postfix code with github.com/googleprojectzero/weggli
(depends on "rust"). (depends on "rust").
@ -46,9 +43,6 @@ Wish list:
Multi-recipient support in sender/recipient_bcc_maps and Multi-recipient support in sender/recipient_bcc_maps and
always_bcc. always_bcc.
Test for dns_rr_copy() + dns_rr_free().
mail_conf_xxx supprt for non-negative numbers (i.e. mail_conf_xxx supprt for non-negative numbers (i.e.
numbers with a lower bound of zero). numbers with a lower bound of zero).

View File

@ -101,7 +101,7 @@ typedef struct TEST_CASE {
static int eq_dns_rr_qname_differ(void) static int eq_dns_rr_qname_differ(void)
{ {
DNS_RR *got = dns_rr_create("qa", "ra", T_SRV, C_IN, 3600, 1, 25, 1, "mxa", 3); DNS_RR *got = dns_rr_create("qa", "ra", T_SRV, C_IN, 3600, 1, 25, 1, "mxa", 4);
DNS_RR *want = dns_rr_copy(got); DNS_RR *want = dns_rr_copy(got);
myfree(want->qname); myfree(want->qname);
@ -111,7 +111,7 @@ static int eq_dns_rr_qname_differ(void)
static int eq_dns_rr_reply_differ(void) static int eq_dns_rr_reply_differ(void)
{ {
DNS_RR *got = dns_rr_create("qa", "ra", T_SRV, C_IN, 3600, 1, 25, 1, "mxa", 3); DNS_RR *got = dns_rr_create("qa", "ra", T_SRV, C_IN, 3600, 1, 25, 1, "mxa", 4);
DNS_RR *want = dns_rr_copy(got); DNS_RR *want = dns_rr_copy(got);
want->port += 1; want->port += 1;
@ -128,7 +128,7 @@ static int eq_dns_rr_reply_differ(void)
static int eq_dns_rr_flags_differ(void) static int eq_dns_rr_flags_differ(void)
{ {
DNS_RR *got = dns_rr_create_noport("qa", "ra", T_MX, C_IN, 3600, 1, "mxa", 3); DNS_RR *got = dns_rr_create_noport("qa", "ra", T_MX, C_IN, 3600, 1, "mxa", 4);
DNS_RR *want = dns_rr_copy(got); DNS_RR *want = dns_rr_copy(got);
want->flags |= DNS_RR_FLAG_TRUNCATED; want->flags |= DNS_RR_FLAG_TRUNCATED;
@ -145,7 +145,7 @@ static int append_to_null_from_null(void)
static int append_to_elem_from_null(void) static int append_to_elem_from_null(void)
{ {
DNS_RR *a = dns_rr_create_noport("qa", "ra", T_MX, C_IN, 3600, 1, "mxa", 3); DNS_RR *a = dns_rr_create_noport("qa", "ra", T_MX, C_IN, 3600, 1, "mxa", 4);
DNS_RR *got, *want; DNS_RR *got, *want;
got = dns_rr_append(dns_rr_copy(a), (DNS_RR *) 0); got = dns_rr_append(dns_rr_copy(a), (DNS_RR *) 0);
@ -157,7 +157,7 @@ static int append_to_elem_from_null(void)
static int appent_to_null_from_elem(void) static int appent_to_null_from_elem(void)
{ {
DNS_RR *a = dns_rr_create_noport("qa", "ra", T_MX, C_IN, 3600, 1, "mxa", 3); DNS_RR *a = dns_rr_create_noport("qa", "ra", T_MX, C_IN, 3600, 1, "mxa", 4);
DNS_RR *got, *want; DNS_RR *got, *want;
got = dns_rr_append((DNS_RR *) 0, dns_rr_copy(a)); got = dns_rr_append((DNS_RR *) 0, dns_rr_copy(a));
@ -169,8 +169,8 @@ static int appent_to_null_from_elem(void)
static int append_to_elem_from_elem(void) static int append_to_elem_from_elem(void)
{ {
DNS_RR *a = dns_rr_create_noport("qa", "ra", T_MX, C_IN, 3600, 1, "mxa", 3); DNS_RR *a = dns_rr_create_noport("qa", "ra", T_MX, C_IN, 3600, 1, "mxa", 4);
DNS_RR *b = dns_rr_create_noport("qb", "rb", T_MX, C_IN, 3600, 1, "mxb", 3); DNS_RR *b = dns_rr_create_noport("qb", "rb", T_MX, C_IN, 3600, 1, "mxb", 4);
DNS_RR *got, *want; DNS_RR *got, *want;
got = dns_rr_append(dns_rr_copy(a), dns_rr_copy(b)); got = dns_rr_append(dns_rr_copy(a), dns_rr_copy(b));
@ -182,9 +182,9 @@ static int append_to_elem_from_elem(void)
static int append_to_elem_from_list(void) static int append_to_elem_from_list(void)
{ {
DNS_RR *a = dns_rr_create_noport("qa", "ra", T_MX, C_IN, 3600, 1, "mxa", 3); DNS_RR *a = dns_rr_create_noport("qa", "ra", T_MX, C_IN, 3600, 1, "mxa", 4);
DNS_RR *b = dns_rr_create_noport("qb", "rb", T_MX, C_IN, 3600, 1, "mxb", 3); DNS_RR *b = dns_rr_create_noport("qb", "rb", T_MX, C_IN, 3600, 1, "mxb", 4);
DNS_RR *c = dns_rr_create_noport("qc", "rc", T_MX, C_IN, 3600, 1, "mxc", 3); DNS_RR *c = dns_rr_create_noport("qc", "rc", T_MX, C_IN, 3600, 1, "mxc", 4);
DNS_RR *got, *want; DNS_RR *got, *want;
got = dns_rr_append(dns_rr_copy(a), got = dns_rr_append(dns_rr_copy(a),
@ -198,9 +198,9 @@ static int append_to_elem_from_list(void)
static int append_to_list_from_elem(void) static int append_to_list_from_elem(void)
{ {
DNS_RR *a = dns_rr_create_noport("qa", "ra", T_MX, C_IN, 3600, 1, "mxa", 3); DNS_RR *a = dns_rr_create_noport("qa", "ra", T_MX, C_IN, 3600, 1, "mxa", 4);
DNS_RR *b = dns_rr_create_noport("qb", "rb", T_MX, C_IN, 3600, 1, "mxb", 3); DNS_RR *b = dns_rr_create_noport("qb", "rb", T_MX, C_IN, 3600, 1, "mxb", 4);
DNS_RR *c = dns_rr_create_noport("qc", "rc", T_MX, C_IN, 3600, 1, "mxc", 3); DNS_RR *c = dns_rr_create_noport("qc", "rc", T_MX, C_IN, 3600, 1, "mxc", 4);
DNS_RR *got, *want; DNS_RR *got, *want;
got = dns_rr_append(dns_rr_append(dns_rr_copy(a), got = dns_rr_append(dns_rr_append(dns_rr_copy(a),
@ -214,10 +214,10 @@ static int append_to_list_from_elem(void)
static int append_to_list_from_list(void) static int append_to_list_from_list(void)
{ {
DNS_RR *a = dns_rr_create_noport("qa", "ra", T_MX, C_IN, 3600, 1, "mxa", 3); DNS_RR *a = dns_rr_create_noport("qa", "ra", T_MX, C_IN, 3600, 1, "mxa", 4);
DNS_RR *b = dns_rr_create_noport("qb", "rb", T_MX, C_IN, 3600, 1, "mxb", 3); DNS_RR *b = dns_rr_create_noport("qb", "rb", T_MX, C_IN, 3600, 1, "mxb", 4);
DNS_RR *c = dns_rr_create_noport("qc", "rc", T_MX, C_IN, 3600, 1, "mxc", 3); DNS_RR *c = dns_rr_create_noport("qc", "rc", T_MX, C_IN, 3600, 1, "mxc", 4);
DNS_RR *d = dns_rr_create_noport("qd", "rd", T_MX, C_IN, 3600, 1, "mxd", 3); DNS_RR *d = dns_rr_create_noport("qd", "rd", T_MX, C_IN, 3600, 1, "mxd", 4);
DNS_RR *got, *want; DNS_RR *got, *want;
got = dns_rr_append(dns_rr_append(dns_rr_copy(a), got = dns_rr_append(dns_rr_append(dns_rr_copy(a),
@ -232,10 +232,10 @@ static int append_to_list_from_list(void)
static int append_propagates_flags(void) static int append_propagates_flags(void)
{ {
DNS_RR *a = dns_rr_create_noport("qa", "ra", T_MX, C_IN, 3600, 1, "mxa", 3); DNS_RR *a = dns_rr_create_noport("qa", "ra", T_MX, C_IN, 3600, 1, "mxa", 4);
DNS_RR *b = dns_rr_create_noport("qb", "rb", T_MX, C_IN, 3600, 1, "mxb", 3); DNS_RR *b = dns_rr_create_noport("qb", "rb", T_MX, C_IN, 3600, 1, "mxb", 4);
DNS_RR *c = dns_rr_create_noport("qc", "rc", T_MX, C_IN, 3600, 1, "mxc", 3); DNS_RR *c = dns_rr_create_noport("qc", "rc", T_MX, C_IN, 3600, 1, "mxc", 4);
DNS_RR *d = dns_rr_create_noport("qd", "rd", T_MX, C_IN, 3600, 1, "mxd", 3); DNS_RR *d = dns_rr_create_noport("qd", "rd", T_MX, C_IN, 3600, 1, "mxd", 4);
DNS_RR *left = dns_rr_append(dns_rr_copy(a), dns_rr_copy(b)); DNS_RR *left = dns_rr_append(dns_rr_copy(a), dns_rr_copy(b));
DNS_RR *rite = dns_rr_append(dns_rr_copy(c), dns_rr_copy(d)); DNS_RR *rite = dns_rr_append(dns_rr_copy(c), dns_rr_copy(d));
DNS_RR *got, *want, *rr; DNS_RR *got, *want, *rr;
@ -254,10 +254,10 @@ static int append_propagates_flags(void)
static int append_to_list_from_list_truncate(void) static int append_to_list_from_list_truncate(void)
{ {
DNS_RR *a = dns_rr_create_noport("qa", "ra", T_MX, C_IN, 3600, 1, "mxa", 3); DNS_RR *a = dns_rr_create_noport("qa", "ra", T_MX, C_IN, 3600, 1, "mxa", 4);
DNS_RR *b = dns_rr_create_noport("qb", "rb", T_MX, C_IN, 3600, 1, "mxb", 3); DNS_RR *b = dns_rr_create_noport("qb", "rb", T_MX, C_IN, 3600, 1, "mxb", 4);
DNS_RR *c = dns_rr_create_noport("qc", "rc", T_MX, C_IN, 3600, 1, "mxc", 3); DNS_RR *c = dns_rr_create_noport("qc", "rc", T_MX, C_IN, 3600, 1, "mxc", 4);
DNS_RR *d = dns_rr_create_noport("qd", "rd", T_MX, C_IN, 3600, 1, "mxd", 3); DNS_RR *d = dns_rr_create_noport("qd", "rd", T_MX, C_IN, 3600, 1, "mxd", 4);
DNS_RR *got, *want, *rr; DNS_RR *got, *want, *rr;
var_dns_rr_list_limit = 3; var_dns_rr_list_limit = 3;
@ -274,10 +274,10 @@ static int append_to_list_from_list_truncate(void)
static int append_to_list_from_elem_elem_truncate(void) static int append_to_list_from_elem_elem_truncate(void)
{ {
DNS_RR *a = dns_rr_create_noport("qa", "ra", T_MX, C_IN, 3600, 1, "mxa", 3); DNS_RR *a = dns_rr_create_noport("qa", "ra", T_MX, C_IN, 3600, 1, "mxa", 4);
DNS_RR *b = dns_rr_create_noport("qb", "rb", T_MX, C_IN, 3600, 1, "mxb", 3); DNS_RR *b = dns_rr_create_noport("qb", "rb", T_MX, C_IN, 3600, 1, "mxb", 4);
DNS_RR *c = dns_rr_create_noport("qc", "rc", T_MX, C_IN, 3600, 1, "mxc", 3); DNS_RR *c = dns_rr_create_noport("qc", "rc", T_MX, C_IN, 3600, 1, "mxc", 4);
DNS_RR *d = dns_rr_create_noport("qd", "rd", T_MX, C_IN, 3600, 1, "mxd", 3); DNS_RR *d = dns_rr_create_noport("qd", "rd", T_MX, C_IN, 3600, 1, "mxd", 4);
DNS_RR *got, *want, *rr; DNS_RR *got, *want, *rr;
var_dns_rr_list_limit = 2; var_dns_rr_list_limit = 2;
@ -295,9 +295,9 @@ static int append_to_list_from_elem_elem_truncate(void)
static int append_to_list_from_elem_truncate(void) static int append_to_list_from_elem_truncate(void)
{ {
DNS_RR *a = dns_rr_create_noport("qa", "ra", T_MX, C_IN, 3600, 1, "mxa", 3); DNS_RR *a = dns_rr_create_noport("qa", "ra", T_MX, C_IN, 3600, 1, "mxa", 4);
DNS_RR *b = dns_rr_create_noport("qb", "rb", T_MX, C_IN, 3600, 1, "mxb", 3); DNS_RR *b = dns_rr_create_noport("qb", "rb", T_MX, C_IN, 3600, 1, "mxb", 4);
DNS_RR *c = dns_rr_create_noport("qc", "rc", T_MX, C_IN, 3600, 1, "mxc", 3); DNS_RR *c = dns_rr_create_noport("qc", "rc", T_MX, C_IN, 3600, 1, "mxc", 4);
DNS_RR *got, *want, *rr; DNS_RR *got, *want, *rr;
var_dns_rr_list_limit = 2; var_dns_rr_list_limit = 2;
@ -313,9 +313,9 @@ static int append_to_list_from_elem_truncate(void)
static int append_to_elem_from_list_truncate(void) static int append_to_elem_from_list_truncate(void)
{ {
DNS_RR *a = dns_rr_create_noport("qa", "ra", T_MX, C_IN, 3600, 1, "mxa", 3); DNS_RR *a = dns_rr_create_noport("qa", "ra", T_MX, C_IN, 3600, 1, "mxa", 4);
DNS_RR *b = dns_rr_create_noport("qb", "rb", T_MX, C_IN, 3600, 1, "mxb", 3); DNS_RR *b = dns_rr_create_noport("qb", "rb", T_MX, C_IN, 3600, 1, "mxb", 4);
DNS_RR *c = dns_rr_create_noport("qc", "rc", T_MX, C_IN, 3600, 1, "mxc", 3); DNS_RR *c = dns_rr_create_noport("qc", "rc", T_MX, C_IN, 3600, 1, "mxc", 4);
DNS_RR *got, *want, *rr; DNS_RR *got, *want, *rr;
var_dns_rr_list_limit = 2; var_dns_rr_list_limit = 2;
@ -331,9 +331,9 @@ static int append_to_elem_from_list_truncate(void)
static int append_to_list_from_elem_exact_fit(void) static int append_to_list_from_elem_exact_fit(void)
{ {
DNS_RR *a = dns_rr_create_noport("qa", "ra", T_MX, C_IN, 3600, 1, "mxa", 3); DNS_RR *a = dns_rr_create_noport("qa", "ra", T_MX, C_IN, 3600, 1, "mxa", 4);
DNS_RR *b = dns_rr_create_noport("qb", "rb", T_MX, C_IN, 3600, 1, "mxb", 3); DNS_RR *b = dns_rr_create_noport("qb", "rb", T_MX, C_IN, 3600, 1, "mxb", 4);
DNS_RR *c = dns_rr_create_noport("qc", "rc", T_MX, C_IN, 3600, 1, "mxc", 3); DNS_RR *c = dns_rr_create_noport("qc", "rc", T_MX, C_IN, 3600, 1, "mxc", 4);
DNS_RR *got, *want; DNS_RR *got, *want;
var_dns_rr_list_limit = 3; var_dns_rr_list_limit = 3;
@ -347,9 +347,9 @@ static int append_to_list_from_elem_exact_fit(void)
static int append_to_elem_from_list_exact_fit(void) static int append_to_elem_from_list_exact_fit(void)
{ {
DNS_RR *a = dns_rr_create_noport("qa", "ra", T_MX, C_IN, 3600, 1, "mxa", 3); DNS_RR *a = dns_rr_create_noport("qa", "ra", T_MX, C_IN, 3600, 1, "mxa", 4);
DNS_RR *b = dns_rr_create_noport("qb", "rb", T_MX, C_IN, 3600, 1, "mxb", 3); DNS_RR *b = dns_rr_create_noport("qb", "rb", T_MX, C_IN, 3600, 1, "mxb", 4);
DNS_RR *c = dns_rr_create_noport("qc", "rc", T_MX, C_IN, 3600, 1, "mxc", 3); DNS_RR *c = dns_rr_create_noport("qc", "rc", T_MX, C_IN, 3600, 1, "mxc", 4);
DNS_RR *got, *want; DNS_RR *got, *want;
var_dns_rr_list_limit = 3; var_dns_rr_list_limit = 3;

View File

@ -78,12 +78,11 @@ char *dns_strrecord(VSTRING *buf, DNS_RR *rr)
vstring_sprintf_append(buf, "%s", rr->data); vstring_sprintf_append(buf, "%s", rr->data);
break; break;
case T_MX: case T_MX:
vstring_sprintf_append(buf, "%u %.*s.", rr->pref, vstring_sprintf_append(buf, "%u %s.", rr->pref, rr->data);
(int) rr->data_len, rr->data);
break; break;
case T_SRV: case T_SRV:
vstring_sprintf_append(buf, "%u %u %u %.*s.", rr->pref, rr->weight, vstring_sprintf_append(buf, "%u %u %u %s.", rr->pref, rr->weight,
rr->port, (int) rr->data_len, rr->data); rr->port, rr->data);
break; break;
case T_TLSA: case T_TLSA:
if (rr->data_len >= 3) { if (rr->data_len >= 3) {

View File

@ -442,8 +442,8 @@ const char *mail_addr_find_opt(MAPS *path, const char *address, char **extp,
/* /*
* Try localpart@ even if the domain is not local. * Try localpart@ even if the domain is not local.
*/ */
if ((strategy & MA_FIND_LOCALPART_AT) != 0 \ if ((strategy & MA_FIND_LOCALPART_AT) != 0
&&result == 0 && path->error == 0) && result == 0 && path->error == 0)
result = find_local(path, ratsign, 1, int_full_key, result = find_local(path, ratsign, 1, int_full_key,
int_bare_key, query_form, extp, &saved_ext, int_bare_key, query_form, extp, &saved_ext,
ext_addr_buf); ext_addr_buf);

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 "20240227" #define MAIL_RELEASE_DATE "20240228"
#define MAIL_VERSION_NUMBER "3.9" #define MAIL_VERSION_NUMBER "3.9"
#ifdef SNAPSHOT #ifdef SNAPSHOT

View File

@ -0,0 +1,9 @@
config_directory = .
disable_dns_lookups = no
lmtp_use_tls = no
smtpd_tls_dh1024_param_file = auto
./postconf: warning: ./main.cf: support for parameter disable_dns_lookups will be removed; instead, specify smtp_dns_support_level
./postconf: warning: ./main.cf: support for parameter lmtp_use_tls will be removed; instead, specify lmtp_tls_security_level
./postconf: warning: ./main.cf: support for parameter smtpd_tls_dh1024_param_file will be removed; instead, do not specify (leave at default)
./postconf: warning: ./main.cf: support for parameter deleted-test-only has been removed; instead, do not specify
./postconf: warning: ./master.cf: support for parameter smtp_enforce_tls will be removed; instead, specify smtp_tls_security_level