From: Wietse Venema Date: Fri, 1 Feb 2013 05:00:00 +0000 (-0500) Subject: postfix-2.10-20130201 X-Git-Tag: v2.10.0-RC1~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ede669adc7dd817f79eca5f398a797ee6f84409b;p=thirdparty%2Fpostfix.git postfix-2.10-20130201 --- diff --git a/postfix/HISTORY b/postfix/HISTORY index 534b439ac..f11bb5588 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -18221,6 +18221,13 @@ Apologies for any names omitted. Factor out the master.cf line parser so that it can be reused for "postconf -Me". File: postconf/postconf_master.c. -20130113 +20130121 - Start of work on integrating a pile of new code. + Bugfix (introduced 20120307): the postconf -X option erased + other options. File: postconf/postconf.c. + +20130131 + + Bugfix: the local(8) delivery agent dereferenced a null + pointer while delivering to null command (for example, "|" + in a .forward file). Reported by Gilles Chehade. diff --git a/postfix/RELEASE_NOTES b/postfix/RELEASE_NOTES index 8a70de043..eb9863799 100644 --- a/postfix/RELEASE_NOTES +++ b/postfix/RELEASE_NOTES @@ -14,6 +14,14 @@ specifies the release date of a stable release or snapshot release. If you upgrade from Postfix 2.8 or earlier, read RELEASE_NOTES-2.9 before proceeding. +Major changes with snapshot 20130201 +==================================== + +The "postconf -Mn" feature is withdrawn, in favor of a better design +that not only supports queries but also updates of named properties +of a master.cf service entry. But there is not enough time to finish +that for Postfix 2.10. + Incompatible changes with snapshot 20121224 =========================================== diff --git a/postfix/html/postconf.1.html b/postfix/html/postconf.1.html index d17d96e93..309215529 100644 --- a/postfix/html/postconf.1.html +++ b/postfix/html/postconf.1.html @@ -21,7 +21,7 @@ POSTCONF(1) POSTCONF(1) Managing master.cf: - postconf [-fMnovx] [-c config_dir] [service ...] + postconf [-fMovx] [-c config_dir] [service ...] Managing bounce message templates: @@ -297,66 +297,63 @@ POSTCONF(1) POSTCONF(1) later. -n Show only configuration parameters that have - explicit name=value settings in main.cf. When - specified with -M, show only services that have - explicit "-o name=value" settings in master.cf - (Postfix 2.10 and later). Specify -nf to fold long - lines for human readability (Postfix 2.9 and - later). + explicit name=value settings in main.cf. Specify + -nf to fold long lines for human readability (Post- + fix 2.9 and later). -o name=value Override main.cf parameter settings. - This feature is available with Postfix 2.10 and + This feature is available with Postfix 2.10 and later. -t [template_file] - Display the templates for text that appears at the - beginning of delivery status notification (DSN) + Display the templates for text that appears at the + beginning of delivery status notification (DSN) messages, without expanding $name expressions. - To override the built-in templates, specify a tem- - plate file name at the end of the postconf(1) com- - mand line, or specify a file name in main.cf with + To override the built-in templates, specify a tem- + plate file name at the end of the postconf(1) com- + mand line, or specify a file name in main.cf with the bounce_template_file parameter. To force selection of the built-in templates, spec- - ify an empty template file name on the postconf(1) + ify an empty template file name on the postconf(1) command line (in shell language: ""). - This feature is available with Postfix 2.3 and + This feature is available with Postfix 2.3 and later. -v Enable verbose logging for debugging purposes. Mul- - tiple -v options make the software increasingly + tiple -v options make the software increasingly verbose. -x Expand $name in main.cf or master.cf parameter val- ues. The expansion is recursive. - This feature is available with Postfix 2.10 and + This feature is available with Postfix 2.10 and later. -X Edit the main.cf configuration file, and remove the - parameters named on the postconf(1) command line. + parameters named on the postconf(1) command line. The file is copied to a temporary file then renamed into place. Specify a list of parameter names, not - "name=value" pairs. There is no postconf(1) com- + "name=value" pairs. There is no postconf(1) com- mand to perform the reverse operation. - This feature is available with Postfix 2.10 and + This feature is available with Postfix 2.10 and later. - -# Edit the main.cf configuration file, and comment + -# Edit the main.cf configuration file, and comment out the parameters named on the postconf(1) command - line, so that those parameters revert to their - default values. The file is copied to a temporary - file then renamed into place. Specify a list of - parameter names, not "name=value" pairs. There is + line, so that those parameters revert to their + default values. The file is copied to a temporary + file then renamed into place. Specify a list of + parameter names, not "name=value" pairs. There is no postconf(1) command to perform the reverse oper- ation. - This feature is available with Postfix 2.6 and + This feature is available with Postfix 2.6 and later. DIAGNOSTICS @@ -367,18 +364,18 @@ POSTCONF(1) POSTCONF(1) Directory with Postfix configuration files. CONFIGURATION PARAMETERS - The following main.cf parameters are especially relevant + The following main.cf parameters are especially relevant to this program. - The text below provides only a parameter summary. See + The text below provides only a parameter summary. See postconf(5) for more details including examples. config_directory (see 'postconf -d' output) - The default location of the Postfix main.cf and + The default location of the Postfix main.cf and master.cf configuration files. bounce_template_file (empty) - Pathname of a configuration file with bounce mes- + Pathname of a configuration file with bounce mes- sage templates. FILES @@ -394,7 +391,7 @@ POSTCONF(1) POSTCONF(1) DATABASE_README, Postfix lookup table overview LICENSE - The Secure Mailer license must be distributed with this + The Secure Mailer license must be distributed with this software. AUTHOR(S) diff --git a/postfix/man/man1/postconf.1 b/postfix/man/man1/postconf.1 index 269c9ca64..9cbd7518c 100644 --- a/postfix/man/man1/postconf.1 +++ b/postfix/man/man1/postconf.1 @@ -22,7 +22,7 @@ Postfix configuration utility \fBManaging master.cf:\fR -\fBpostconf\fR [\fB-fMnovx\fR] [\fB-c \fIconfig_dir\fR] +\fBpostconf\fR [\fB-fMovx\fR] [\fB-c \fIconfig_dir\fR] [\fIservice ...\fR] \fBManaging bounce message templates:\fR @@ -262,9 +262,6 @@ This feature is available with Postfix 2.9 and later. .IP \fB-n\fR Show only configuration parameters that have explicit \fIname=value\fR settings in \fBmain.cf\fR. -When specified with \fB-M\fR, show only services that have -explicit "-o \fIname=value\fR" settings in \fBmaster.cf\fR -(Postfix 2.10 and later). Specify \fB-nf\fR to fold long lines for human readability (Postfix 2.9 and later). .IP "\fB-o \fIname=value\fR" diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index 86532ce2e..edaa8b60b 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 "20130113" +#define MAIL_RELEASE_DATE "20130201" #define MAIL_VERSION_NUMBER "2.10" #ifdef SNAPSHOT diff --git a/postfix/src/postconf/Makefile.in b/postfix/src/postconf/Makefile.in index 85864a2a6..4a1d9487e 100644 --- a/postfix/src/postconf/Makefile.in +++ b/postfix/src/postconf/Makefile.in @@ -45,7 +45,7 @@ test: $(TESTPROG) tests: test1 test2 test3 test4 test5 test6 test7 test8 test9 test10 test11 \ test12 test13 test14 test15 test16 test17 test18 test19 test20 test21 \ test22 test23 test24 test25 test26 test27 test28 test29 test30 test4b \ - test31 test32 test33 test34 test35 test36 test37 test38 test39 test40 + test31 test32 test33 test34 test35 test36 test37 test39 test40 root_tests: @@ -507,16 +507,6 @@ test37: $(PROG) test37.ref diff test37.ref test37.tmp rm -f main.cf master.cf test37.tmp -test38: $(PROG) test38.ref - rm -f main.cf master.cf - touch main.cf master.cf - echo foo unix - n n - 0 other >> master.cf - echo bar unix - n n - 0 other >> master.cf - echo ' -o aaa=ccc' >> master.cf - ./$(PROG) -Mnfxc . >test38.tmp 2>&1 - diff test38.ref test38.tmp - rm -f main.cf master.cf test38.tmp - test39: $(PROG) test39.ref rm -f main.cf master.cf touch main.cf master.cf diff --git a/postfix/src/postconf/postconf.c b/postfix/src/postconf/postconf.c index 4e3ae9a42..95bea1702 100644 --- a/postfix/src/postconf/postconf.c +++ b/postfix/src/postconf/postconf.c @@ -18,7 +18,7 @@ /* /* \fBManaging master.cf:\fR /* -/* \fBpostconf\fR [\fB-fMnovx\fR] [\fB-c \fIconfig_dir\fR] +/* \fBpostconf\fR [\fB-fMovx\fR] [\fB-c \fIconfig_dir\fR] /* [\fIservice ...\fR] /* /* \fBManaging bounce message templates:\fR @@ -256,9 +256,6 @@ /* .IP \fB-n\fR /* Show only configuration parameters that have explicit /* \fIname=value\fR settings in \fBmain.cf\fR. -/* When specified with \fB-M\fR, show only services that have -/* explicit "-o \fIname=value\fR" settings in \fBmaster.cf\fR -/* (Postfix 2.10 and later). /* Specify \fB-nf\fR to fold long lines for human readability /* (Postfix 2.9 and later). /* .IP "\fB-o \fIname=value\fR" @@ -510,7 +507,7 @@ int main(int argc, char **argv) break; case 'X': /* This is irreversible, therefore require two-finger action. */ - cmd_mode = EDIT_EXCL; + cmd_mode |= EDIT_EXCL; break; case 'v': msg_verbose++; @@ -533,8 +530,8 @@ int main(int argc, char **argv) msg_fatal("specify one of -a, -A, -b, -d, -e, -#, -l, -m, -M, and -X"); if ((cmd_mode & SHOW_EVAL) != 0 && junk != 0 && junk != SHOW_DEFS && junk != SHOW_MASTER) msg_fatal("do not specify -x with -a, -A, -b, -e, -#, -l, -m, or -X"); - if ((cmd_mode & SHOW_NONDEF) != 0 && junk != 0 && junk != SHOW_MASTER) - msg_fatal("do not specify -n with -a, -A, -b, -d, -e, -#, -l, -m, or -X"); + if ((cmd_mode & SHOW_NONDEF) != 0 && junk != 0) + msg_fatal("do not specify -n with -a, -A, -b, -d, -e, -#, -l, -m, -M, or -X"); if (override_params != 0 && junk != 0 && junk != SHOW_MASTER) msg_fatal("do not specify -o with -a, -A, -b, -d, -e, -#, -l, -m, or -X"); diff --git a/postfix/src/postconf/postconf_master.c b/postfix/src/postconf/postconf_master.c index 9bf79a78e..e3520bfc7 100644 --- a/postfix/src/postconf/postconf_master.c +++ b/postfix/src/postconf/postconf_master.c @@ -122,8 +122,7 @@ static void normalize_options(ARGV *argv) /* parse_master_line - parse one master line */ -static void parse_master_line(PC_MASTER_ENT *masterp, const char *buf, - const char *path, int line_count) +static const char *parse_master_line(PC_MASTER_ENT *masterp, const char *buf) { ARGV *argv; @@ -140,14 +139,14 @@ static void parse_master_line(PC_MASTER_ENT *masterp, const char *buf, argv = argv_split(buf, MASTER_BLANKS); if (argv->argc < PC_MASTER_MIN_FIELDS) - msg_fatal("file %s: line %d: bad field count", - path, line_count); + return ("bad field count"); normalize_options(argv); masterp->name_space = concatenate(argv->argv[0], ".", argv->argv[1], (char *) 0); masterp->argv = argv; masterp->valid_names = 0; masterp->all_params = 0; + return (0); } /* read_master - read and digest the master.cf file */ @@ -158,6 +157,7 @@ void read_master(int fail_on_open_error) char *path; VSTRING *buf; VSTREAM *fp; + const char *err; int entry_count = 0; int line_count = 0; @@ -192,8 +192,9 @@ void read_master(int fail_on_open_error) while (readlline(buf, fp, &line_count) != 0) { master_table = (PC_MASTER_ENT *) myrealloc((char *) master_table, (entry_count + 2) * sizeof(*master_table)); - parse_master_line(master_table + entry_count, STR(buf), - path, line_count); + if ((err = parse_master_line(master_table + entry_count, + STR(buf))) != 0) + msg_fatal("file %s: line %d: %s", path, line_count, err); entry_count += 1; } vstream_fclose(fp); diff --git a/postfix/src/util/exec_command.c b/postfix/src/util/exec_command.c index 9ab82535e..8629b0c24 100644 --- a/postfix/src/util/exec_command.c +++ b/postfix/src/util/exec_command.c @@ -63,7 +63,8 @@ ABCDEFGHIJKLMNOPQRSTUVWXYZ" SPACE_TAB; /* * See if this command contains any shell magic characters. */ - if (command[strspn(command, ok_chars)] == 0) { + if (command[strspn(command, ok_chars)] == 0 + && command[strspn(command, SPACE_TAB)] != 0) { /* * No shell meta characters found, so we can try to avoid the overhead