tlsproxy_client_policy, virtual_maps. Files: mantools/postlink,
proto/DEPRECATION_README.html, postconf/postconf_unused.c.
- Cleanup: SMTP client null pointer crash when an STS policy
- plugin sends no policy_string or no mx_pattern attributes.
- This can happen only during tests with a fake STS plugin.
- File: smtp/smtp_tlsrpt.c.
+ Bugfix (defect introduced: Postfix 3.10, date: 20240902):
+ SMTP client null pointer crash when an STS policy plugin
+ sends no policy_string or no mx_pattern attributes. This
+ can happen only during tests with a fake STS plugin. File:
+ smtp/smtp_tlsrpt.c.
20251028
20251125
- Cleanup: too many braces in postmulti JSON output. Files:
+ Cleanup: too many braces in postmulti JSON output. Files:
postmulti/Makefile.in, postmulti/postmulti.c.
+
+20251130
+
+ Bugfix (defect introduced: Postfix 3.11, date: 20251103):
+ postconf panic (in mac_expand_add_named_fn) because an
+ attempt was made to register a function more than once.
+ Files: util/mac_midna.c, global/mail_params.c.
+
+ Cleanup: in postmulti(1) tests link the fake_strcmp wrapper
+ statically, and speed up tests by back-dating test main.cf
+ files. Files: postmulti/Makefile.in.
+
+ Usability: enable postmulti(1) logging to STDERR even when
+ STDERR is not connected to a terminal, just like most other
+ Postfix command utilities. This makes the command easier
+ to integrate into (test) scripts. File: postmulti/postmulti.c.
+
+ Testing: test that postmulti(1) will reject a non-default
+ config_directory setting. File: postmulti/Makefile.in.
CFLAGS = $(DEBUG) $(OPT) $(DEFS)
FILES = Makefile $(SRCS) $(HDRS)
INC_DIR = ../../include
-TESTPROG=
+TESTPROG= postmulti_test
PROG = postmulti
LIBS = ../../lib/lib$(LIB_PREFIX)global$(LIB_SUFFIX) \
../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX)
-LIB_SO = fake_strcmp.so
+TESTOBJ = fake_strcmp.o
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
$(CC) $(CFLAGS) $(SHLIB_RPATH) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
-$(OBJS): ../../conf/makedefs.out
+$(TESTPROG): $(OBJS) fake_strcmp.o $(LIBS)
+ $(CC) $(CFLAGS) $(SHLIB_RPATH) -o $@ $(OBJS) fake_strcmp.o $(LIBS) $(SYSLIBS)
+
+$(OBJS) $(TESTOBJ): ../../conf/makedefs.out
Makefile: Makefile.in
cat ../../conf/makedefs.out $? >$@
test: $(TESTPROG)
-# Force strcmp(var_config_dir, DEF_CONFIG_DIR) to always succeeed. Outside
-# tests, postmulti MUST abort when their values differ.
-fake_strcmp.so: fake_strcmp.c
- $(CC) $(CFLAGS) -fPIC -shared -o $@ fake_strcmp.c $(LIBS)
-
-tests: single_test json_tests
+tests: single_test json_tests config_dir_test
# Single instance, original output format.
-single_test: $(PROG) fake_strcmp.so
- @echo; echo RUN single_test
+single_test: $(TESTPROG)
+ @echo RUN single_test
rm -f main.cf single_test.tmp
echo config_directory = . >>main.cf
echo command_directory = ../../bin >> main.cf
echo daemon_directory = ../../libexec >> main.cf
echo meta_directory = . >> main.cf
echo shlib_directory = ../../lib >> main.cf
+ touch -t 197101010000 main.cf
printf "%-15s %-15s %-9s %s\n" - - y . >single_test.tmp
- $(SHLIB_ENV) ${VALGRIND} LD_PRELOAD=./fake_strcmp.so MAIL_CONFIG=. \
- ./$(PROG) -l | diff single_test.tmp -
+ $(SHLIB_ENV) ${VALGRIND} MAIL_CONFIG=. \
+ ./$(TESTPROG) -l | diff single_test.tmp -
rm -f main.cf single_test.tmp
- @echo PASS single_test
+ @echo PASS single_test; echo
json_tests: json_single_test
# Single instance, JSON output format.
-json_single_test: $(PROG) fake_strcmp.so
- @echo; echo RUN json_single_test
+json_single_test: $(TESTPROG)
+ @echo RUN json_single_test
rm -f main.cf json_single_test.tmp
echo config_directory = . >>main.cf
echo command_directory = ../../bin >> main.cf
echo daemon_directory = ../../libexec >> main.cf
echo meta_directory = . >> main.cf
echo shlib_directory = ../../lib >> main.cf
+ touch -t 197101010000 main.cf
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 -
+ $(SHLIB_ENV) ${VALGRIND} MAIL_CONFIG=. \
+ ./$(TESTPROG) -lj | diff json_single_test.tmp -
rm -f main.cf json_single_test.tmp
- @echo PASS json_single_test
+ @echo PASS json_single_test; echo
+
+# Reject non-default config_directory.
+config_dir_test: $(PROG)
+ @echo RUN config_dir_test
+ rm -f main.cf config_dir_test.tmp
+ echo config_directory = . >>main.cf
+ echo command_directory = ../../bin >> main.cf
+ echo daemon_directory = ../../libexec >> main.cf
+ echo meta_directory = . >> main.cf
+ echo shlib_directory = ../../lib >> main.cf
+ touch -t 197101010000 main.cf
+ echo "postmulti: fatal: Non-default configuration directory: MAIL_CONFIG=." > config_dir_test.tmp
+ ($(SHLIB_ENV) ${VALGRIND} MAIL_CONFIG=. ./$(PROG) -l 2>&1 || exit 0) \
+ | diff config_dir_test.tmp -
+ rm -f config_dir_test.tmp
+ @echo PASS config_dir_test; echo
root_tests:
cp $(PROG) ../../bin
clean:
- rm -f *.o *core $(PROG) $(TESTPROG) $(LIB_SO) junk
+ rm -f *.o *core $(PROG) $(TESTPROG) $(TESTOBJ) *.tmp main.cf junk
tidy: clean