From: Wietse Z Venema Date: Tue, 25 Nov 2025 05:00:00 +0000 (-0500) Subject: postfix-3.11-20251125 X-Git-Tag: v3.11.0-RC1~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a46a16ab9582a316328f8f71963214c5dff03d1;p=thirdparty%2Fpostfix.git postfix-3.11-20251125 --- diff --git a/postfix/HISTORY b/postfix/HISTORY index 437e28770..1e543007e 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -30082,3 +30082,8 @@ Apologies for any names omitted. Added basic tests to verify the output formats for original and JSON output. Files: postmulti/postmulti.c, postmulti/fake_strcmp.c, postmulti/Makefile.in. + +20251125 + + Cleanup: too many braces in postmulti JSON output. Files: + postmulti/Makefile.in, postmulti/postmulti.c. diff --git a/postfix/html/postmulti.1.html b/postfix/html/postmulti.1.html index 47eec47cb..6467cbb3e 100644 --- a/postfix/html/postmulti.1.html +++ b/postfix/html/postmulti.1.html @@ -99,6 +99,8 @@ POSTMULTI(1) POSTMULTI(1) List mode -j Produce JSON output. See JSON OBJECT FORMAT below. + This feature is available in Postfix version 3.11 and later. + -l List Postfix instances with their instance name, instance group name, enable/disable status and configuration directory. diff --git a/postfix/man/man1/postmulti.1 b/postfix/man/man1/postmulti.1 index 45273c804..af552dde6 100644 --- a/postfix/man/man1/postmulti.1 +++ b/postfix/man/man1/postmulti.1 @@ -121,6 +121,8 @@ This option cannot be used with \fB\-p\fR. .fi .IP \fB\-j\fR Produce JSON output. See JSON OBJECT FORMAT below. + +This feature is available in Postfix version 3.11 and later. .IP \fB\-l\fR List Postfix instances with their instance name, instance group name, enable/disable status and configuration directory. diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index 260b40159..7116469dd 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 "20251124" +#define MAIL_RELEASE_DATE "20251125" #define MAIL_VERSION_NUMBER "3.11" #ifdef SNAPSHOT diff --git a/postfix/src/postmulti/Makefile.in b/postfix/src/postmulti/Makefile.in index bb84a46d7..e9309b984 100644 --- a/postfix/src/postmulti/Makefile.in +++ b/postfix/src/postmulti/Makefile.in @@ -58,7 +58,7 @@ json_single_test: $(PROG) fake_strcmp.so echo daemon_directory = ../../libexec >> main.cf echo meta_directory = . >> main.cf echo shlib_directory = ../../lib >> main.cf - echo "{{\"name\": \"-\"},{\"group\": \"-\"},{\"enabled\": \"y\"},{\"config_directory\": \".\"}}" >> json_single_test.tmp + echo "{\"name\": \"-\",\"group\": \"-\",\"enabled\": \"y\",\"config_directory\": \".\"}" >> json_single_test.tmp $(SHLIB_ENV) ${VALGRIND} LD_PRELOAD=./fake_strcmp.so MAIL_CONFIG=. \ ./$(PROG) -lj | diff json_single_test.tmp - rm -f main.cf json_single_test.tmp diff --git a/postfix/src/postmulti/postmulti.c b/postfix/src/postmulti/postmulti.c index dddde2571..5bd0b27a7 100644 --- a/postfix/src/postmulti/postmulti.c +++ b/postfix/src/postmulti/postmulti.c @@ -107,6 +107,8 @@ /* .fi /* .IP \fB-j\fR /* Produce JSON output. See JSON OBJECT FORMAT below. +/* +/* This feature is available in Postfix version 3.11 and later. /* .IP \fB-l\fR /* List Postfix instances with their instance name, instance /* group name, enable/disable status and configuration directory. @@ -1602,16 +1604,16 @@ static void list_instances(int iter_flags, INST_SELECTION *selection) ip->enabled ? "y" : "n", ip->config_dir); } else { - vstream_printf("{{\"name\": \"%s\"},", + vstream_printf("{\"name\": \"%s\",", quote_for_json(json_buf, ip->name ? ip->name : "-", -1)); - vstream_printf("{\"group\": \"%s\"},", + vstream_printf("\"group\": \"%s\",", quote_for_json(json_buf, ip->gname ? ip->gname : "-", 1)); - vstream_printf("{\"enabled\": \"%s\"},", + vstream_printf("\"enabled\": \"%s\",", quote_for_json(json_buf, ip->enabled ? "y" : "n", 1)); - vstream_printf("{\"config_directory\": \"%s\"}}\n", + vstream_printf("\"config_directory\": \"%s\"}\n", quote_for_json(json_buf, ip->config_dir, -1)); }