]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.9-20111109
authorWietse Venema <wietse@porcupine.org>
Wed, 9 Nov 2011 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 06:37:34 +0000 (06:37 +0000)
postfix/HISTORY
postfix/RELEASE_NOTES
postfix/WISHLIST
postfix/src/global/mail_version.h
postfix/src/postconf/postconf.c

index d4ababc45480b96f559aebd5938b30450f4a2dcb..83b84ed74a93a6bab235fe65ba17cc69f1c62a58 100644 (file)
@@ -17045,20 +17045,20 @@ Apologies for any names omitted.
        Feature: "postconf -M" support to show Postfix's idea of
        what is in the master.cf file. File: postconf/postconf.c.
 
-       Work in progress: extract mail delivery transport names
-       from master.cf, and provide better postconf(1) support to
-       manipulate main.cf parameters with transport-dependent
-       names.
-
        Feature: postconf "-f" option to "nicely" format long lines
        from main.cf or master.cf. File: postconf/postconf.c.
 
-201108
+20111108
 
        Cleanup: postconf finally supports dynamic configuration
        parameter names: parameters whose name depend on a mail
-       delivery transport name in master.cf, and parameters whose
-       names are specified with smtpd_restriction_classes in
-       main.cf. This adds 70 parameters to the "postconf" output,
+       delivery transport or spawn service in master.cf, and
+       parameters whose names are specified with smtpd_restriction_classes
+       in main.cf. This adds 70 parameters to the "postconf" output,
        more if additional mail delivery transports are defined in
        master.cf.  File: postconf/postconf.c.
+
+20111109
+
+       Cleanup: account for "," in smtpd_restriction_classes
+       value (Victor Duchovni). File: postconf/postconf.c.
index a813583f2fcca474af70e564a2392f431083c4b5..58344f35303d3ea751af525b718037f14c83b04f 100644 (file)
@@ -14,6 +14,20 @@ specifies the release date of a stable release or snapshot release.
 If you upgrade from Postfix 2.7 or earlier, read RELEASE_NOTES-2.8
 before proceeding.
 
+Major changes with snapshot 20111108
+====================================
+
+postconf support for parameter names that are generated automatically
+from master.cf entries (delivery agents, spawn services), and for
+parameter names that are defined with main.cf smtpd_restriction_classes.
+This increases the postconf output size with 70 lines or more.
+
+Major changes with snapshot 20111106
+====================================
+
+"postconf -M" support to print master.cf entries, and "postconf -f"
+support to fold long main.cf or master.cf lines for human readability.
+
 Incompatible changes with snapshot 20111106
 ===========================================
 
index 4157fa95582f8c1a9b082f23300e10da9ed0937f..0fdcb5beaf69cef125b8eb2613a399bce9d4c6ba 100644 (file)
@@ -6,6 +6,13 @@ Wish list:
 
        Things to do after the stable release:
 
+       postconf: legitimize spontaneous_name=value if it is
+       referenced as legitimate_name=$spontaneous_name in main.cf
+       or master.cf, and warn about spontaneous_name=value that
+       have no legitimizing reference. Use mac_expand callback
+       to identidy references, and add mac_expand option to always
+       expand a conditional macro's right-hand side.
+
        TLS_README has the priorities reversed. The section about
        SMTP client settings begins with an exposition about client
        certificates, which almost no-one needs. Instead, the text
index 3db456fda4acf4b942f42981713e74ae569d6819..1a653e442121c02fe8fd0913e82fe7082ccf360f 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      "20111108"
+#define MAIL_RELEASE_DATE      "20111109"
 #define MAIL_VERSION_NUMBER    "2.9"
 
 #ifdef SNAPSHOT
index 8c2107c54c056b973a53c3ff1a4049a8461f62b8..77460913cbe2ef0189513bd395d374826c8e4767 100644 (file)
@@ -754,6 +754,58 @@ static void set_parameters(void)
      */
 }
 
+/* read_master - read and digest the master.cf file */
+
+static void read_master(void)
+{
+    char   *path;
+    VSTRING *buf = vstring_alloc(100);
+    ARGV   *argv;
+    VSTREAM *fp;
+    int     entry_count = 0;
+    int     line_count = 0;
+
+    /*
+     * Get the location of master.cf.
+     */
+    if (var_config_dir == 0)
+       set_config_dir();
+    path = concatenate(var_config_dir, "/", MASTER_CONF_FILE, (char *) 0);
+
+    /*
+     * We can't use the master_ent routines in their current form. They
+     * convert everything to internal form, and they skip disabled services.
+     * We need to be able to show default fields as "-", and we need to know
+     * about all service names so that we can generate dynamic parameter
+     * names (transport-dependent etc.).
+     */
+#define MASTER_BLANKS  " \t\r\n"               /* XXX */
+#define MASTER_FIELD_COUNT 8                   /* XXX */
+
+    /*
+     * Initialize the in-memory master table.
+     */
+    master_table = (ARGV **) mymalloc(sizeof(*master_table));
+
+    /*
+     * Skip blank lines and comment lines.
+     */
+    if ((fp = vstream_fopen(path, O_RDONLY, 0)) == 0)
+       msg_fatal("open %s: %m", path);
+    while (readlline(buf, fp, &line_count) != 0) {
+       master_table = (ARGV **) myrealloc((char *) master_table,
+                                (entry_count + 2) * sizeof(*master_table));
+       argv = argv_split(STR(buf), MASTER_BLANKS);
+       if (argv->argc < MASTER_FIELD_COUNT)
+           msg_fatal("file %s: line %d: bad field count", path, line_count);
+       master_table[entry_count++] = argv;
+    }
+    master_table[entry_count] = 0;
+    vstream_fclose(fp);
+    myfree(path);
+    vstring_free(buf);
+}
+
  /*
   * Basename of programs in $daemon_directory. XXX These belong in a header
   * file, or they should be made configurable.
@@ -888,10 +940,22 @@ static void add_dynamic_parameters(int mode)
     if ((mode & SHOW_DEFS) == 0
        && (class_list = mail_conf_lookup_eval(VAR_REST_CLASSES)) != 0) {
        cp = saved_class_list = mystrdup(class_list);
-       while ((class_name = mystrtok(&cp, " \t\r\n")) != 0)
+       while ((class_name = mystrtok(&cp, ", \t\r\n")) != 0)
            add_restriction_class(class_name);
        myfree(saved_class_list);
     }
+
+    /*
+     * TODO: Parse all legitimate parameter values (in main.cf and in
+     * master.cf) for references to spontaneous parameters that are defined
+     * in main.cf, and flag those spontaneous parameters as legitimate. Then,
+     * flag all remaining spontaneous parameter definitions in main.cf as
+     * mistakes.
+     * 
+     * It is OK if a spontaneous name exists only in a reference; this is how
+     * Postfix implements backwards compatibility after a feature name
+     * change.
+     */
 }
 
 /* hash_parameters - hash all parameter names so we can find and sort them */
@@ -943,58 +1007,6 @@ static void hash_parameters(void)
            htable_enter(param_table, *rct, (char *) rct);
 }
 
-/* read_master - read and digest the master.cf file */
-
-static void read_master(void)
-{
-    char   *path;
-    VSTRING *buf = vstring_alloc(100);
-    ARGV   *argv;
-    VSTREAM *fp;
-    int     entry_count = 0;
-    int     line_count = 0;
-
-    /*
-     * Get the location of master.cf.
-     */
-    if (var_config_dir == 0)
-       set_config_dir();
-    path = concatenate(var_config_dir, "/", MASTER_CONF_FILE, (char *) 0);
-
-    /*
-     * We can't use the master_ent routines in their current form. They
-     * convert everything to internal form, and they skip disabled services.
-     * We need to be able to show default fields as "-", and we need to know
-     * about all service names so that we can generate dynamic parameter
-     * names (transport-dependent etc.).
-     */
-#define MASTER_BLANKS  " \t\r\n"               /* XXX */
-#define MASTER_FIELD_COUNT 8                   /* XXX */
-
-    /*
-     * Initialize the in-memory master table.
-     */
-    master_table = (ARGV **) mymalloc(sizeof(*master_table));
-
-    /*
-     * Skip blank lines and comment lines.
-     */
-    if ((fp = vstream_fopen(path, O_RDONLY, 0)) == 0)
-       msg_fatal("open %s: %m", path);
-    while (readlline(buf, fp, &line_count) != 0) {
-       master_table = (ARGV **) myrealloc((char *) master_table,
-                                (entry_count + 2) * sizeof(*master_table));
-       argv = argv_split(STR(buf), MASTER_BLANKS);
-       if (argv->argc < MASTER_FIELD_COUNT)
-           msg_fatal("file %s: line %d: bad field count", path, line_count);
-       master_table[entry_count++] = argv;
-    }
-    master_table[entry_count] = 0;
-    vstream_fclose(fp);
-    myfree(path);
-    vstring_free(buf);
-}
-
 /* print_line - show line possibly folded, and with normalized whitespace */
 
 static void print_line(int mode, const char *fmt,...)
@@ -1369,7 +1381,7 @@ static void print_del_transp_param(int mode, const char *name,
     }
 }
 
-/* print_rest_class_param - show dynamic parameter */
+/* print_rest_class_param - show dynamic restriction class parameter */
 
 static void print_rest_class_param(int mode, const char *name)
 {