]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.10-20130201
authorWietse Venema <wietse@porcupine.org>
Fri, 1 Feb 2013 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 06:38:27 +0000 (06:38 +0000)
postfix/HISTORY
postfix/RELEASE_NOTES
postfix/html/postconf.1.html
postfix/man/man1/postconf.1
postfix/src/global/mail_version.h
postfix/src/postconf/Makefile.in
postfix/src/postconf/postconf.c
postfix/src/postconf/postconf_master.c
postfix/src/util/exec_command.c

index 534b439ac1278d144e8dcfd03628a9baaae1e3b1..f11bb5588375d19db86f724b5b7602d25c5cdcaf 100644 (file)
@@ -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.
index 8a70de0436e34463cc40473c206732562bb8573a..eb986379989f204fd3fa3e436fc3a34d78059736 100644 (file)
@@ -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
 ===========================================
 
index d17d96e93646995ead3486762605da2a29041a75..309215529dd20ba2b54b215258d34a9316d203e6 100644 (file)
@@ -21,7 +21,7 @@ POSTCONF(1)                                                        POSTCONF(1)
 
        <b>Managing <a href="master.5.html">master.cf</a>:</b>
 
-       <b>postconf</b> [<b>-fMnovx</b>] [<b>-c</b> <i>config</i><b>_</b><i>dir</i>] [<i>service ...</i>]
+       <b>postconf</b> [<b>-fMovx</b>] [<b>-c</b> <i>config</i><b>_</b><i>dir</i>] [<i>service ...</i>]
 
        <b>Managing bounce message templates:</b>
 
@@ -297,66 +297,63 @@ POSTCONF(1)                                                        POSTCONF(1)
               later.
 
        <b>-n</b>     Show  only  configuration  parameters   that   have
-              explicit  <i>name=value</i>  settings  in  <a href="postconf.5.html"><b>main.cf</b></a>.   When
-              specified with <b>-M</b>, show  only  services  that  have
-              explicit  "-o  <i>name=value</i>"  settings  in  <a href="master.5.html"><b>master.cf</b></a>
-              (Postfix 2.10 and later).  Specify <b>-nf</b> to fold long
-              lines   for  human  readability  (Postfix  2.9  and
-              later).
+              explicit  <i>name=value</i>  settings in <a href="postconf.5.html"><b>main.cf</b></a>.  Specify
+              <b>-nf</b> to fold long lines for human readability (Post-
+              fix 2.9 and later).
 
        <b>-o</b> <i>name=value</i>
               Override <a href="postconf.5.html"><b>main.cf</b></a> parameter settings.
 
-              This feature is available  with  Postfix  2.10  and
+              This  feature  is  available  with Postfix 2.10 and
               later.
 
        <b>-t</b> [<i>template</i><b>_</b><i>file</i>]
-              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 $<b>name</b> expressions.
 
-              To  override the built-in templates, specify a tem-
-              plate file name at the end of the <a href="postconf.1.html"><b>postconf</b>(1)</a>  com-
-              mand  line,  or specify a file name in <a href="postconf.5.html"><b>main.cf</b></a> with
+              To override the built-in templates, specify a  tem-
+              plate  file name at the end of the <a href="postconf.1.html"><b>postconf</b>(1)</a> com-
+              mand line, or specify a file name in  <a href="postconf.5.html"><b>main.cf</b></a>  with
               the <b><a href="postconf.5.html#bounce_template_file">bounce_template_file</a></b> parameter.
 
               To force selection of the built-in templates, spec-
-              ify  an empty template file name on the <a href="postconf.1.html"><b>postconf</b>(1)</a>
+              ify an empty template file name on the  <a href="postconf.1.html"><b>postconf</b>(1)</a>
               command line (in shell language: "").
 
-              This feature is  available  with  Postfix  2.3  and
+              This  feature  is  available  with  Postfix 2.3 and
               later.
 
        <b>-v</b>     Enable verbose logging for debugging purposes. Mul-
-              tiple <b>-v</b> options  make  the  software  increasingly
+              tiple  <b>-v</b>  options  make  the software increasingly
               verbose.
 
        <b>-x</b>     Expand <i>$name</i> in <a href="postconf.5.html"><b>main.cf</b></a> or <a href="master.5.html"><b>master.cf</b></a> 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.
 
        <b>-X</b>     Edit the <a href="postconf.5.html"><b>main.cf</b></a> configuration file, and remove the
-              parameters named on the <a href="postconf.1.html"><b>postconf</b>(1)</a>  command  line.
+              parameters  named  on the <a href="postconf.1.html"><b>postconf</b>(1)</a> command line.
               The file is copied to a temporary file then renamed
               into place.  Specify a list of parameter names, not
-              "<i>name=value</i>"  pairs.   There is no <a href="postconf.1.html"><b>postconf</b>(1)</a> com-
+              "<i>name=value</i>" pairs.  There is no  <a href="postconf.1.html"><b>postconf</b>(1)</a>  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.
 
-       <b>-#</b>     Edit  the  <a href="postconf.5.html"><b>main.cf</b></a>  configuration file, and comment
+       <b>-#</b>     Edit the <a href="postconf.5.html"><b>main.cf</b></a> configuration  file,  and  comment
               out the parameters named on the <a href="postconf.1.html"><b>postconf</b>(1)</a> 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 "<i>name=value</i>" 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 "<i>name=value</i>" pairs.  There is
               no <a href="postconf.1.html"><b>postconf</b>(1)</a> 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.
 
 <b>DIAGNOSTICS</b>
@@ -367,18 +364,18 @@ POSTCONF(1)                                                        POSTCONF(1)
               Directory with Postfix configuration files.
 
 <b>CONFIGURATION PARAMETERS</b>
-       The  following  <a href="postconf.5.html"><b>main.cf</b></a> parameters are especially relevant
+       The following <a href="postconf.5.html"><b>main.cf</b></a> 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
        <a href="postconf.5.html"><b>postconf</b>(5)</a> for more details including examples.
 
        <b><a href="postconf.5.html#config_directory">config_directory</a> (see 'postconf -d' output)</b>
-              The  default  location  of  the Postfix <a href="postconf.5.html">main.cf</a> and
+              The default location of  the  Postfix  <a href="postconf.5.html">main.cf</a>  and
               <a href="master.5.html">master.cf</a> configuration files.
 
        <b><a href="postconf.5.html#bounce_template_file">bounce_template_file</a> (empty)</b>
-              Pathname of a configuration file with  bounce  mes-
+              Pathname  of  a configuration file with bounce mes-
               sage templates.
 
 <b>FILES</b>
@@ -394,7 +391,7 @@ POSTCONF(1)                                                        POSTCONF(1)
        <a href="DATABASE_README.html">DATABASE_README</a>, Postfix lookup table overview
 
 <b>LICENSE</b>
-       The Secure Mailer license must be  distributed  with  this
+       The  Secure  Mailer  license must be distributed with this
        software.
 
 <b>AUTHOR(S)</b>
index 269c9ca64b2f2960d6ca7725fed1c68c9ebea371..9cbd7518c60fee1be3574edb0334873f708f7e5f 100644 (file)
@@ -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"
index 86532ce2e85e2da25963cb845941320a474712d0..edaa8b60bfebbfbf16c6e4d987cf87248a48443f 100644 (file)
@@ -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
index 85864a2a6f08c7a1ab4cfa33da9f500d8a0ebb96..4a1d9487e8efcf7c83007648742e5356575887b5 100644 (file)
@@ -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
index 4e3ae9a42e7272b9c97d93e9c38de81e29993f8b..95bea170272464a9f210a01fdc420d5b076d1de6 100644 (file)
@@ -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
 /* .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");
 
index 9bf79a78ec5b871597ef48fd25aacc3f06dc1d84..e3520bfc72378c6322ed3d7f5f74305e120986c8 100644 (file)
@@ -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);
index 9ab82535e53bbe59c7abc8038090ec7bea9b7724..8629b0c2407b8e542c4418a40eeb587d06177a75 100644 (file)
@@ -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