From: Wietse Z Venema Date: Wed, 6 May 2026 05:00:00 +0000 (-0500) Subject: postfix-3.12-20260506 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=257b201a589eb93b0d2a396d261811252edddaef;p=thirdparty%2Fpostfix.git postfix-3.12-20260506 --- diff --git a/postfix/HISTORY b/postfix/HISTORY index c302bc772..b1a98282e 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -30838,7 +30838,7 @@ Apologies for any names omitted. util/attr_print_plain.c, util/attr_scan0.c, util/attr_scan0.ref, util/attr_scan64.c, util/attr_scan64.ref, util/attr_scan_plain.c, util/attr_scan_plain.ref. There is no code that uses this now, - but there are tests to make sure that it is works when needed. + but there are tests to make sure that it works when needed. 20260408 @@ -31043,11 +31043,41 @@ Apologies for any names omitted. Next up is replacing a large number of "[%s]:%s" format strings in postscreen code. -20240629 +20260429 Testing: portability. Files: postscreen/postscreen_dnsbl_test.c, testing/mock_myaddrinfo_test.c. +20260501 + + The Postfix 3.12 proxymap server missed one of the fixes + for Claude findings. File: proxymap/proxymap.c. + +20260506 + + Tech debt: make the $process_name initialization consistent + across Postfix command-line tools. Files: postalias/postalias.c, + postfix/postfix.c, postmap/postmap.c, postmulti/postmulti.c. + + Tech debt: consistent logging with "postfix" prefix across + Postfix command-line tools, but avoid "postfix/postfix" + stutter. File: postmulti/postmulti.c. + + Tech debt: make postlog logging initialization consistent + with other command-line tools. File: postlog/postlog.c. + + No change: don't add syslog/maillog_file logging to the + postcat and postkick command-line tools. + + Documentation: readability and typographical fixes. Files: + proto/REQUIRETLS_README.html, proto/postconf.proto, + postscreen/postscreen_tls_conf.c. + + Workaround for MacOS: rename a top-level temporary "testing" + directory to "test-conf". On MacOS, "rm -rf testing" deleted + the TESTING text file. Files: Makefile.in, postalias/Makefile.in, + postmap/Makefile.in, smtpd/Makefile.in, util/Makefile.in. + TODO Reorganize PTEST_LIB, PMOCK_LIB, TESTLIB, TESTLIBS, etc. diff --git a/postfix/Makefile.in b/postfix/Makefile.in index aa3713d04..bd611efdd 100644 --- a/postfix/Makefile.in +++ b/postfix/Makefile.in @@ -20,7 +20,7 @@ LIBEXEC = libexec/post-install libexec/postfix-script libexec/postfix-wrapper \ PLUGINS = meta/dynamicmaps.cf META = meta/main.cf.proto meta/master.cf.proto meta/postfix-files \ meta/makedefs.out $(PLUGINS) -TESTING = testing/main.cf +TESTING = test-conf/main.cf EXPAND = sed -e "s;\$${LIB_PREFIX};$(LIB_PREFIX);" \ -e "s;\$${LIB_SUFFIX};$(LIB_SUFFIX);" SHLIB_DIR_OVERRIDE = \ @@ -100,9 +100,9 @@ libexec/postfix-wrapper: conf/postfix-wrapper meta/main.cf.proto: conf/main.cf rm -f $@ && ln -f $? $@ -testing/main.cf: +test-conf/main.cf: rm -f $@ - mkdir -p testing + mkdir -p test-conf echo 'meta_directory = $(BUILD_ROOT)/meta' >> $@ echo 'shlib_directory = $(BUILD_ROOT)/lib' >> $@ @@ -254,7 +254,7 @@ tidy: clean make.err */make.err */*/make.err \ *.gmon */*.gmon */*/*.gmon \ conf/main.cf.default conf/bounce.cf.default meta/* - rm -rf testing + rm -rf test-conf find . -type s -print | xargs rm -f find . -type d -print | xargs chmod 755 find . -type f -print | xargs chmod a+r diff --git a/postfix/README_FILES/REQUIRETLS_README b/postfix/README_FILES/REQUIRETLS_README index 81e1452f7..10f7fecc2 100644 --- a/postfix/README_FILES/REQUIRETLS_README +++ b/postfix/README_FILES/REQUIRETLS_README @@ -30,8 +30,8 @@ future with REQUIRETLS. IInnttrroodduuccttiioonn The REQUIRETLS extension in ESMTP is defined in RFC 8689. When a sender -requests REQUIRETLS. the message must be sent only over strongly-authenticated -SMTP or LMTP connections. +requests REQUIRETLS. the message must be sent only over authenticated SMTP or +LMTP connections. Support for REQUIRETLS was added in Postfix 3.11. Specifically: diff --git a/postfix/html/REQUIRETLS_README.html b/postfix/html/REQUIRETLS_README.html index 9650470ab..a59cb9b7d 100644 --- a/postfix/html/REQUIRETLS_README.html +++ b/postfix/html/REQUIRETLS_README.html @@ -51,7 +51,8 @@ is still uncommon, with a path towards a future with REQUIRETLS.

The REQUIRETLS extension in ESMTP is defined in RFC 8689. When a sender requests REQUIRETLS. the message must be sent only over -strongly-authenticated SMTP or LMTP connections.

+authenticated SMTP or LMTP connections. Support for REQUIRETLS was +added in Postfix 3.11.

Specifically:

diff --git a/postfix/html/postconf.5.html b/postfix/html/postconf.5.html index b3cf3373c..7631a7cbc 100644 --- a/postfix/html/postconf.5.html +++ b/postfix/html/postconf.5.html @@ -15049,8 +15049,8 @@ in all specified lookup tables, and stop at the first match. If no match was found, this may be followed by substring lookups as described below.

-
  • If any lookup result returns "DUNNO", terminate the search -and pretend that no name match and no address match were found. +

  • If any lookup returns "DUNNO", terminate the search and +pretend that no name match and no address match were found.

    @@ -15069,8 +15069,8 @@ substrings have been tried.

  • To generate domain name substring queries without the leading '.' (examples: "example.com" and "com"), specify the -applicable configuration parameter name ("smtpd_tls_policy_maps", -"smtp_tls_policy_maps", or "postscreen_tls_policy_maps") in the +applicable configuration parameter name ("smtpd_tls_loglevel_maps", +"smtp_tls_loglevel_maps", or "postscreen_tls_loglevel_maps") in the parent_domain_matches_subdomains parameter value.

  • After all table queries with a full IP address produce diff --git a/postfix/man/man5/postconf.5 b/postfix/man/man5/postconf.5 index a4b25a0e6..fc5997b19 100644 --- a/postfix/man/man5/postconf.5 +++ b/postfix/man/man5/postconf.5 @@ -9927,8 +9927,8 @@ in all specified lookup tables, and stop at the first match. If no match was found, this may be followed by substring lookups as described below. .IP \(bu -If any lookup result returns "DUNNO", terminate the search -and pretend that no name match and no address match were found. +If any lookup returns "DUNNO", terminate the search and +pretend that no name match and no address match were found. .br .PP This feature may generate substring queries for a fixed\-string @@ -9943,8 +9943,8 @@ substrings have been tried. .IP \(bu To generate domain name substring queries without the leading '.' (examples: "example.com" and "com"), specify the -applicable configuration parameter name ("smtpd_tls_policy_maps", -"smtp_tls_policy_maps", or "postscreen_tls_policy_maps") in the +applicable configuration parameter name ("smtpd_tls_loglevel_maps", +"smtp_tls_loglevel_maps", or "postscreen_tls_loglevel_maps") in the parent_domain_matches_subdomains parameter value. .IP \(bu After all table queries with a full IP address produce diff --git a/postfix/proto/REQUIRETLS_README.html b/postfix/proto/REQUIRETLS_README.html index 189902f3a..bfd7d8ca4 100644 --- a/postfix/proto/REQUIRETLS_README.html +++ b/postfix/proto/REQUIRETLS_README.html @@ -51,7 +51,8 @@ is still uncommon, with a path towards a future with REQUIRETLS.

    The REQUIRETLS extension in ESMTP is defined in RFC 8689. When a sender requests REQUIRETLS. the message must be sent only over -strongly-authenticated SMTP or LMTP connections.

    +authenticated SMTP or LMTP connections. Support for REQUIRETLS was +added in Postfix 3.11.

    Specifically:

    diff --git a/postfix/proto/postconf.proto b/postfix/proto/postconf.proto index d18943fa8..77683ff39 100644 --- a/postfix/proto/postconf.proto +++ b/postfix/proto/postconf.proto @@ -20916,8 +20916,8 @@ in all specified lookup tables, and stop at the first match. If no match was found, this may be followed by substring lookups as described below.

    -
  • If any lookup result returns "DUNNO", terminate the search -and pretend that no name match and no address match were found. +

  • If any lookup returns "DUNNO", terminate the search and +pretend that no name match and no address match were found.

    @@ -20936,8 +20936,8 @@ substrings have been tried.

  • To generate domain name substring queries without the leading '.' (examples: "example.com" and "com"), specify the -applicable configuration parameter name ("smtpd_tls_policy_maps", -"smtp_tls_policy_maps", or "postscreen_tls_policy_maps") in the +applicable configuration parameter name ("smtpd_tls_loglevel_maps", +"smtp_tls_loglevel_maps", or "postscreen_tls_loglevel_maps") in the parent_domain_matches_subdomains parameter value.

  • After all table queries with a full IP address produce diff --git a/postfix/proto/stop.double-history b/postfix/proto/stop.double-history index 7a92b6f0d..7b282060f 100644 --- a/postfix/proto/stop.double-history +++ b/postfix/proto/stop.double-history @@ -248,3 +248,9 @@ proto proto stop proto stop double cc postscreen postscreen h postscreen postscreen_starttls c posttls finger posttls finger c smtp smtp c smtp smtp h smtp smtp_proto c smtpd smtpd c tls tls_client c tls tls h + across Postfix command line tools Files postalias postalias c + for Claude findings File proxymap proxymap c + Postfix command line tools but avoid postfix postfix + postfix postfix c postmap postmap c postmulti postmulti c + stutter File postmulti postmulti c + with other command line tools File postlog postlog c diff --git a/postfix/proto/stop.spell-history b/postfix/proto/stop.spell-history index b9ef6afd3..e30c9f947 100644 --- a/postfix/proto/stop.spell-history +++ b/postfix/proto/stop.spell-history @@ -138,3 +138,4 @@ MAXINT gmock sunos WebPKI +rf diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index 5bd42d3df..1a8451963 100644 --- a/postfix/src/global/mail_version.h +++ b/postfix/src/global/mail_version.h @@ -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 "20260429" +#define MAIL_RELEASE_DATE "20260506" #define MAIL_VERSION_NUMBER "3.12" #ifdef SNAPSHOT diff --git a/postfix/src/postalias/Makefile.in b/postfix/src/postalias/Makefile.in index c6ea1d0f8..87cd3c52a 100644 --- a/postfix/src/postalias/Makefile.in +++ b/postfix/src/postalias/Makefile.in @@ -31,7 +31,7 @@ root_tests: test1: $(PROG) map.in map-abc1.ref map-ghi1.ref map-uABC1.ref @echo ; echo RUN test1 rm -f main.cf - cp ../../testing/main.cf . + cp ../../test-conf/main.cf . touch -t 197101010000 main.cf ${SHLIB_ENV} ${VALGRIND} ./$(PROG) -c . map.in for key in abc ghi; \ @@ -49,7 +49,7 @@ test1: $(PROG) map.in map-abc1.ref map-ghi1.ref map-uABC1.ref test2: $(PROG) map.in map-abc2.ref map-ghi2.ref map-uABC2.ref @echo ; echo RUN test2 rm -f main.cf - cp ../../testing/main.cf . + cp ../../test-conf/main.cf . touch -t 197101010000 main.cf ${SHLIB_ENV} ${VALGRIND} ./$(PROG) -c . map.in for key in abc ghi; \ @@ -67,7 +67,7 @@ test2: $(PROG) map.in map-abc2.ref map-ghi2.ref map-uABC2.ref fail_test: $(PROG) aliases fail_test.in fail_test.ref @echo ; echo RUN fail_test rm -f main.cf - cp ../../testing/main.cf . + cp ../../test-conf/main.cf . touch -t 197101010000 main.cf -(${SHLIB_ENV} MAIL_CONFIG=. $(NOSLEEP) sh fail_test.in 2>&1 || exit 0) | sed \ -e 's/No error:/Unknown error:/' \ @@ -79,7 +79,7 @@ fail_test: $(PROG) aliases fail_test.in fail_test.ref mode_conflict_test: $(PROG) mode_conflict_test.in mode_conflict_test.ref @echo ; echo RUN mode_conflict_test rm -f main.cf - cp ../../testing/main.cf . + cp ../../test-conf/main.cf . touch -t 197101010000 main.cf $(SHLIB_ENV) MAIL_CONFIG=. $(NOSLEEP) sh -x mode_conflict_test.in >mode_conflict_test.tmp 2>&1 diff mode_conflict_test.ref mode_conflict_test.tmp @@ -92,7 +92,7 @@ json_query_test: $(PROG) # Exercise code in postalias_query(). @echo ; echo RUN json_query_test rm -f main.cf - cp ../../testing/main.cf . + cp ../../test-conf/main.cf . echo '{"postmaster": "root"}' >json_query.tmp $(SHLIB_ENV) ${VALGRIND} ./$(PROG) -jq postmaster \ 'inline:{{postmaster = root}}' | diff json_query.tmp - @@ -105,7 +105,7 @@ json_queries_test: $(PROG) # Exercise json formatting in postalias_queries(). @echo ; echo RUN json_queries_test rm -f main.cf - cp ../../testing/main.cf . + cp ../../test-conf/main.cf . echo '{"postmaster": "root"}' >json_queries.tmp (echo postmaster; echo other) | $(SHLIB_ENV) ${VALGRIND} \ ./$(PROG) -jq - 'inline:{{postmaster = root}}' | \ @@ -117,7 +117,7 @@ json_sequence_test: $(PROG) # Exercise json formatting in postalias_seq(). @echo ; echo RUN json_sequence_test rm -f main.cf - cp ../../testing/main.cf . + cp ../../test-conf/main.cf . rm -f json_sequence.tmp (echo '{"postmaster": "root"}'; echo '{"root": "real-user"}') |\ sort >json_sequence.tmp diff --git a/postfix/src/postalias/postalias.c b/postfix/src/postalias/postalias.c index ccbd61aac..19e187384 100644 --- a/postfix/src/postalias/postalias.c +++ b/postfix/src/postalias/postalias.c @@ -810,6 +810,7 @@ int main(int argc, char **argv) argv[0] = slash + 1; msg_vstream_init(argv[0], VSTREAM_ERR); maillog_client_init(mail_task(argv[0]), MAILLOG_CLIENT_FLAG_NONE); + set_mail_conf_str(VAR_PROCNAME, var_procname = mystrdup(argv[0])); /* * Check the Postfix library version as soon as we enable logging. diff --git a/postfix/src/postfix/postfix.c b/postfix/src/postfix/postfix.c index 0904c5be7..7fd34716a 100644 --- a/postfix/src/postfix/postfix.c +++ b/postfix/src/postfix/postfix.c @@ -440,6 +440,7 @@ #include #include +#include #include #include #include @@ -528,6 +529,7 @@ int main(int argc, char **argv) argv[0] = slash + 1; msg_vstream_init(argv[0], VSTREAM_ERR); maillog_client_init(argv[0], MAILLOG_CLIENT_FLAG_LOGWRITER_FALLBACK); + set_mail_conf_str(VAR_PROCNAME, var_procname = mystrdup(argv[0])); /* * Check the Postfix library version as soon as we enable logging. diff --git a/postfix/src/postlog/postlog.c b/postfix/src/postlog/postlog.c index 200a68ee7..4a40c7af8 100644 --- a/postfix/src/postlog/postlog.c +++ b/postfix/src/postlog/postlog.c @@ -283,9 +283,9 @@ int main(int argc, char **argv) * user. */ argv[0] = POSTLOG_CMD; - tag = mail_task(argv[0]); - msg_vstream_init(tag, VSTREAM_ERR); - maillog_client_init(tag, MAILLOG_CLIENT_FLAG_LOGWRITER_FALLBACK); + msg_vstream_init(argv[0], VSTREAM_ERR); + maillog_client_init(tag = mail_task(argv[0]), + MAILLOG_CLIENT_FLAG_LOGWRITER_FALLBACK); /* * Check the Postfix library version as soon as we enable logging. @@ -328,7 +328,8 @@ int main(int argc, char **argv) */ mail_conf_read(); /* Re-evaluate mail_task() after reading main.cf. */ - maillog_client_init(mail_task(POSTLOG_CMD), MAILLOG_CLIENT_FLAG_NONE); + maillog_client_init(mail_task(POSTLOG_CMD), + MAILLOG_CLIENT_FLAG_LOGWRITER_FALLBACK); #if 0 mail_dict_init(); /* proxy, sql, ldap */ get_mail_conf_str_table(str_table); diff --git a/postfix/src/postmap/Makefile.in b/postfix/src/postmap/Makefile.in index a4f5f7e8c..43f0c6ff2 100644 --- a/postfix/src/postmap/Makefile.in +++ b/postfix/src/postmap/Makefile.in @@ -36,7 +36,7 @@ root_tests: test1: $(PROG) map.in map-abc1.ref map-ghi1.ref map-uABC1.ref @echo ; echo RUN test1 rm -f main.cf - cp ../../testing/main.cf . + cp ../../test-conf/main.cf . touch -t 197101010000 main.cf $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -c . map.in for key in abc ghi; \ @@ -54,7 +54,7 @@ test1: $(PROG) map.in map-abc1.ref map-ghi1.ref map-uABC1.ref test2: $(PROG) map.in map-abc2.ref map-ghi2.ref map-uABC2.ref @echo ; echo RUN test2 rm -f main.cf - cp ../../testing/main.cf . + cp ../../test-conf/main.cf . touch -t 197101010000 main.cf $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -c . map.in for key in abc ghi; \ @@ -72,7 +72,7 @@ test2: $(PROG) map.in map-abc2.ref map-ghi2.ref map-uABC2.ref fail_test: $(PROG) aliases fail_test.in fail_test.ref @echo ; echo RUN fail_test rm -f main.cf - cp ../../testing/main.cf . + cp ../../test-conf/main.cf . touch -t 197101010000 main.cf -($(SHLIB_ENV) MAIL_CONFIG=. $(NOSLEEP) sh fail_test.in || exit 0) >fail_test.tmp 2>&1 diff fail_test.ref fail_test.tmp @@ -82,7 +82,7 @@ fail_test: $(PROG) aliases fail_test.in fail_test.ref quote_test: $(PROG) aliases quote_test.in quote_test.ref @echo ; echo RUN quote_test rm -f main.cf - cp ../../testing/main.cf . + cp ../../test-conf/main.cf . touch -t 197101010000 main.cf rm -f quote_test_map.* $(SHLIB_ENV) MAIL_CONFIG=. sh quote_test.in >quote_test.tmp 2>&1 @@ -93,7 +93,7 @@ quote_test: $(PROG) aliases quote_test.in quote_test.ref file_test: $(PROG) file_test.in file_test.ref @echo ; echo RUN file_test rm -f main.cf - cp ../../testing/main.cf . + cp ../../test-conf/main.cf . touch -t 197101010000 main.cf rm -f file_test_map.* postmap-file-1 postmap-file-2 $(SHLIB_ENV) MAIL_CONFIG=. $(NOSLEEP) sh file_test.in >file_test.tmp 2>&1 @@ -105,7 +105,7 @@ file_test: $(PROG) file_test.in file_test.ref mode_conflict_test: $(PROG) mode_conflict_test.in mode_conflict_test.ref @echo ; echo RUN mode_conflict_test rm -f main.cf - cp ../../testing/main.cf . + cp ../../test-conf/main.cf . touch -t 197101010000 main.cf $(SHLIB_ENV) MAIL_CONFIG=. $(NOSLEEP) sh -x mode_conflict_test.in >mode_conflict_test.tmp 2>&1 diff mode_conflict_test.ref mode_conflict_test.tmp @@ -115,7 +115,7 @@ mode_conflict_test: $(PROG) mode_conflict_test.in mode_conflict_test.ref cdb_bulk_test: $(PROG) @echo ; echo RUN cdb_bulk_test rm -f cdb_bulk.cdb main.cf - cp ../../testing/main.cf . + cp ../../test-conf/main.cf . tr A-Z a-z < /usr/share/dict/words| \ sed -e 's/.*/& &/' -e 10000q| LANG=C sort -u >cdb_bulk touch -t 197101010000 main.cf @@ -129,7 +129,7 @@ cdb_bulk_test: $(PROG) lmdb_abb_test: $(PROG) lmdb_abb lmdb_abb.ref @echo ; echo RUN lmdb_abb_test rm -f main.cf - cp ../../testing/main.cf . + cp ../../test-conf/main.cf . touch -t 197101010000 main.cf rm -f lmdb_abb.lmdb ($(SHLIB_ENV) $(VALGRIND) ./postmap -c . lmdb:lmdb_abb; \ @@ -141,7 +141,7 @@ lmdb_abb_test: $(PROG) lmdb_abb lmdb_abb.ref lmdb_bulk_test: $(PROG) @echo ; echo RUN lmdb_bulk_test rm -f lmdb_retry.lmdb main.cf - cp ../../testing/main.cf . + cp ../../test-conf/main.cf . tr A-Z a-z < /usr/share/dict/words| \ sed -e 's/.*/& &/' -e 10000q| LANG=C sort -u >lmdb_retry echo lmdb_map_size=10240 >>main.cf @@ -156,7 +156,7 @@ lmdb_bulk_test: $(PROG) lmdb_incr_test: $(PROG) @echo ; echo RUN lmdb_incr_test rm -f lmdb_retry.lmdb main.cf - cp ../../testing/main.cf . + cp ../../test-conf/main.cf . tr A-Z a-z < /usr/share/dict/words| \ sed -e 's/.*/& &/' -e 1000q| LANG=C sort -u >lmdb_retry echo lmdb_map_size=10240 >>main.cf @@ -174,7 +174,7 @@ json_tests: json_query_test json_queries_test json_sequence_test \ json_query_test: $(PROG) @echo ; echo RUN json_query_test rm -f main.cf - cp ../../testing/main.cf . + cp ../../test-conf/main.cf . touch -t 197101010000 main.cf # Exercise code in postmap_query(). echo '{"foo": "fooval"}' >json_query.tmp @@ -189,7 +189,7 @@ json_queries_test: $(PROG) @echo ; echo RUN json_queries_test # Exercise json formatting in postmap_queries() with non-message input. rm -f main.cf - cp ../../testing/main.cf . + cp ../../test-conf/main.cf . touch -t 197101010000 main.cf echo '{"foo": "fooval"}' >json_queries.tmp (echo foo; echo bar) | $(SHLIB_ENV) ${VALGRIND} \ @@ -202,7 +202,7 @@ json_sequence_test: $(PROG) # Exercise json formatting in postmap_seq(). @echo ; echo RUN json_sequence_test rm -f main.cf - cp ../../testing/main.cf . + cp ../../test-conf/main.cf . touch -t 197101010000 main.cf rm -f json_sequence.tmp (echo '{"bar": "barval"}'; echo '{"foo": "fooval"}') |\ @@ -217,7 +217,7 @@ json_header_test: $(PROG) # Exercise json formatting in postmap_queries() in 'header' mode. @echo ; echo RUN json_header_test rm -f main.cf - cp ../../testing/main.cf . + cp ../../test-conf/main.cf . touch -t 197101010000 main.cf echo '{"Subject: test": "got subject"}' > json_header.tmp (echo Subject: test; echo body) | $(SHLIB_ENV) ${VALGRIND} ./$(PROG) \ @@ -230,7 +230,7 @@ json_body_test: $(PROG) # Exercise json formatting in postmap_queries() in 'body' mode. @echo ; echo RUN json_body_test rm -f main.cf - cp ../../testing/main.cf . + cp ../../test-conf/main.cf . touch -t 197101010000 main.cf echo '{"body": "got other"}' > json_body.tmp (echo Subject: test; echo body) | $(SHLIB_ENV) ${VALGRIND} ./$(PROG) \ diff --git a/postfix/src/postmap/postmap.c b/postfix/src/postmap/postmap.c index c23b80b50..cf97313f4 100644 --- a/postfix/src/postmap/postmap.c +++ b/postfix/src/postmap/postmap.c @@ -1035,6 +1035,7 @@ int main(int argc, char **argv) argv[0] = slash + 1; msg_vstream_init(argv[0], VSTREAM_ERR); maillog_client_init(mail_task(argv[0]), MAILLOG_CLIENT_FLAG_NONE); + set_mail_conf_str(VAR_PROCNAME, var_procname = mystrdup(argv[0])); /* * Check the Postfix library version as soon as we enable logging. diff --git a/postfix/src/postmulti/Makefile.in b/postfix/src/postmulti/Makefile.in index a1b05c2d5..56ec3aa0a 100644 --- a/postfix/src/postmulti/Makefile.in +++ b/postfix/src/postmulti/Makefile.in @@ -113,6 +113,7 @@ postmulti.o: ../../include/htable.h postmulti.o: ../../include/mail_conf.h postmulti.o: ../../include/mail_params.h postmulti.o: ../../include/mail_parm_split.h +postmulti.o: ../../include/mail_task.h postmulti.o: ../../include/mail_version.h postmulti.o: ../../include/maillog_client.h postmulti.o: ../../include/msg.h diff --git a/postfix/src/postmulti/postmulti.c b/postfix/src/postmulti/postmulti.c index 1c737de65..293356d7f 100644 --- a/postfix/src/postmulti/postmulti.c +++ b/postfix/src/postmulti/postmulti.c @@ -492,6 +492,7 @@ #include #include #include +#include #include /* Application-specific. */ @@ -1759,7 +1760,9 @@ int main(int argc, char **argv) if ((slash = strrchr(argv[0], '/')) != 0 && slash[1]) argv[0] = slash + 1; msg_vstream_init(argv[0], VSTREAM_ERR); - maillog_client_init(argv[0], MAILLOG_CLIENT_FLAG_LOGWRITER_FALLBACK); + maillog_client_init(mail_task(argv[0]), + MAILLOG_CLIENT_FLAG_LOGWRITER_FALLBACK); + set_mail_conf_str(VAR_PROCNAME, var_procname = mystrdup(argv[0])); /* * Check the Postfix library version as soon as we enable logging. diff --git a/postfix/src/postscreen/postscreen_tls_conf.c b/postfix/src/postscreen/postscreen_tls_conf.c index 4b52a6d17..331d29826 100644 --- a/postfix/src/postscreen/postscreen_tls_conf.c +++ b/postfix/src/postscreen/postscreen_tls_conf.c @@ -13,7 +13,7 @@ /* bool psc_tls_pre_jail(void) /* /* bool psc_tls_pre_start( -/* const char *remote_endpt, +/* const PSC_STATE *state, /* TLS_SERVER_START_PROPS *start_props) /* DESCRIPTION /* This module converts Postfix configuration settings into diff --git a/postfix/src/proxymap/proxymap.c b/postfix/src/proxymap/proxymap.c index 97053b109..509b3183a 100644 --- a/postfix/src/proxymap/proxymap.c +++ b/postfix/src/proxymap/proxymap.c @@ -422,7 +422,7 @@ static void proxymap_sequence_service(VSTREAM *client_stream) { int inst_flags; int request_flags; - DICT *dict; + DICT *dict = 0; int request_func; const char *reply_key; const char *reply_value; @@ -461,11 +461,12 @@ static void proxymap_sequence_service(VSTREAM *client_stream) } /* - * Respond to the client. + * Respond to the client. 202604 Claude: don't dereference uninitialized + * dict. */ attr_print(client_stream, ATTR_FLAG_NONE, SEND_ATTR_INT(MAIL_ATTR_STATUS, reply_status), - SEND_ATTR_INT(MAIL_ATTR_FLAGS, dict->flags), + SEND_ATTR_INT(MAIL_ATTR_FLAGS, dict ? dict->flags : 0), SEND_ATTR_STR(MAIL_ATTR_KEY, reply_key), SEND_ATTR_STR(MAIL_ATTR_VALUE, reply_value), ATTR_TYPE_END); diff --git a/postfix/src/smtpd/Makefile.in b/postfix/src/smtpd/Makefile.in index 133290975..b0018faae 100644 --- a/postfix/src/smtpd/Makefile.in +++ b/postfix/src/smtpd/Makefile.in @@ -79,7 +79,7 @@ root_tests: smtpd_check_test: smtpd_check smtpd_check.in smtpd_check.ref smtpd_check_access @echo ; echo RUN smtpd_check_test rm -f main.cf - cp ../../testing/main.cf . + cp ../../test-conf/main.cf . touch -t 197101010000 main.cf $(SHLIB_ENV) $(VALGRIND) ../postmap/postmap -c. hash:smtpd_check_access $(SHLIB_ENV) $(VALGRIND) ./smtpd_check smtpd_check.tmp 2>&1 @@ -92,7 +92,7 @@ smtpd_check_test: smtpd_check smtpd_check.in smtpd_check.ref smtpd_check_access smtpd_check_test2: smtpd_check smtpd_check.in2 smtpd_check.ref2 smtpd_check_access @echo ; echo RUN smtpd_check_test2 rm -f main.cf - cp ../../testing/main.cf . + cp ../../test-conf/main.cf . touch -t 197101010000 main.cf $(SHLIB_ENV) $(VALGRIND) ../postmap/postmap -c. hash:smtpd_check_access $(SHLIB_ENV) $(VALGRIND) ./smtpd_check smtpd_check.tmp 2>&1 @@ -103,7 +103,7 @@ smtpd_check_test2: smtpd_check smtpd_check.in2 smtpd_check.ref2 smtpd_check_acce smtpd_check_test4: smtpd_check smtpd_check.in4 smtpd_check.ref4 smtpd_check_access @echo ; echo RUN smtpd_check_test4 rm -f main.cf - cp ../../testing/main.cf . + cp ../../test-conf/main.cf . touch -t 197101010000 main.cf $(SHLIB_ENV) $(VALGRIND) ../postmap/postmap -c. hash:smtpd_check_access $(SHLIB_ENV) $(VALGRIND) ./smtpd_check smtpd_check.tmp 2>&1 @@ -114,7 +114,7 @@ smtpd_check_test4: smtpd_check smtpd_check.in4 smtpd_check.ref4 smtpd_check_acce smtpd_acl_test: smtpd_check smtpd_acl.in smtpd_acl.ref smtpd_check_access @echo ; echo RUN smtpd_acl_test rm -f main.cf - cp ../../testing/main.cf . + cp ../../test-conf/main.cf . touch -t 197101010000 main.cf $(SHLIB_ENV) $(VALGRIND) ../postmap/postmap -c. hash:smtpd_check_access $(SHLIB_ENV) $(VALGRIND) ./smtpd_check smtpd_check.tmp 2>&1 @@ -135,7 +135,7 @@ ADDRINFO_FIX = sed -e 's/No address associated with hostname/hostname nor servna smtpd_exp_test: smtpd_check smtpd_exp.in smtpd_exp.ref @echo ; echo RUN smtpd_acl_test rm -f main.cf - cp ../../testing/main.cf . + cp ../../test-conf/main.cf . touch -t 197101010000 main.cf $(SHLIB_ENV) $(VALGRIND) ../postmap/postmap -c. hash:smtpd_check_access $(SHLIB_ENV) $(VALGRIND) ./smtpd_check smtpd_exp.tmp 2>&1 @@ -153,7 +153,7 @@ smtpd_server_test: smtpd_check smtpd_server.in smtpd_server.ref smtpd_nullmx_test: smtpd_check smtpd_nullmx.in smtpd_nullmx.ref @echo ; echo RUN smtpd_nullmx_test rm -f main.cf - cp ../../testing/main.cf . + cp ../../test-conf/main.cf . touch -t 197101010000 main.cf $(SHLIB_ENV) $(VALGRIND) ../postmap/postmap -c. hash:smtpd_check_access $(SHLIB_ENV) $(VALGRIND) ./smtpd_check smtpd_nullmx.tmp 2>&1 @@ -173,7 +173,7 @@ smtpd_dns_filter_test: smtpd_check smtpd_dns_filter.in smtpd_dns_filter.ref \ smtpd_check_dsn_test: smtpd_check smtpd_check_dsn.in smtpd_check_dsn.ref smtpd_check_access @echo ; echo RUN smtpd_check_dsn_test rm -f main.cf - cp ../../testing/main.cf . + cp ../../test-conf/main.cf . touch -t 197101010000 main.cf $(SHLIB_ENV) $(VALGRIND) ../postmap/postmap -c. hash:smtpd_check_access $(SHLIB_ENV) $(VALGRIND) ./smtpd_check smtpd_check.tmp 2>&1 diff --git a/postfix/src/util/Makefile.in b/postfix/src/util/Makefile.in index 84ce4124e..b41e3ed9c 100644 --- a/postfix/src/util/Makefile.in +++ b/postfix/src/util/Makefile.in @@ -740,7 +740,7 @@ attr_scan0_test: attr_print0 attr_scan0 attr_scan0.ref dict_test: dict_open testdb dict_test.in dict_test.ref rm -f testdb.db testdb.dir testdb.pag main.cf - cp ../../testing/main.cf . + cp ../../test-conf/main.cf . touch -t 197601010000 main.cf $(SHLIB_ENV) ../postmap/postmap -Nc. hash:testdb $(SHLIB_ENV) ${VALGRIND} ./dict_open hash:testdb write < dict_test.in 2>&1 | sed 's/uid=[0-9][0-9][0-9]*/uid=USER/' >dict_test.tmp @@ -943,7 +943,7 @@ base32_code_test: base32_code dict_thash_test: ../postmap/postmap dict_thash.map dict_thash.in dict_thash.ref rm -f main.cf - cp ../../testing/main.cf . + cp ../../test-conf/main.cf . touch -t 197601010000 main.cf $(SHLIB_ENV) ${VALGRIND} ../postmap/postmap -fsc. texthash:dict_thash.map 2>&1 | \ LANG=C sort | diff dict_thash.map -