]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-3.11-20250920
authorWietse Z Venema <wietse@porcupine.org>
Sat, 20 Sep 2025 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <ietf-dane@dukhovni.org>
Mon, 22 Sep 2025 06:16:20 +0000 (16:16 +1000)
postfix/HISTORY
postfix/conf/main.cf
postfix/src/cleanup/cleanup_message.c
postfix/src/global/mail_version.h
postfix/src/postconf/postconf_edit.c
postfix/src/smtp/smtp.h

index c2bc3dca6c0b04b807eb732ecc4958a29704a0b2..bdf2ebc23e22a5225ecebed263ad74be8ba2a202 100644 (file)
@@ -29618,3 +29618,22 @@ Apologies for any names omitted.
        Finally, do not cache a connection when SMTPUTF8 is
        required but the server does not support that feature.
        Files: smtp/smtp.h, smtp/smtp_key.c, smtp/smtp_proto.c.
+
+20250919
+
+       Cleanup: unnecessary header parsing code. Viktor Dukhovni.
+       File: cleanup/cleanup_message.c.
+
+       Bugfix (defect introduced: Postfix 3.8, date 20220128): the
+       'postconf -e' output order for new main.cf entries was no
+       longer deterministic. Problem reported by Oleksandr Natalenko,
+       diagnosis by Eray Aslan. File: postconf/postconf_edit.c.
+
+       Add missing meta_directory and shlib_directory settings to
+       the stock main.cf file. Problem diagnosed by Eray Aslan.
+       File: conf/main.cf.
+
+20250920
+
+       Added back a hunk of patch 20250911 that had somehow gone
+       missing. File: smtp/smtp.h.
index dc20b71dd44acf3499cdc114faae4227e27a5d50..f61060ef26cc3aeafd8afc8de2c3a80dc423c216 100644 (file)
@@ -682,4 +682,13 @@ sample_directory =
 # readme_directory: The location of the Postfix README files.
 #
 readme_directory =
+
+# shlib_directory: The location of the Postfix *.so library files and
+# database plugins.
+shlib_directory =
+
+# meta_directory: The location of non-executable files that are shared
+# between multiple Postfix instances.
+meta_directory = /etc/postfix
+
 inet_protocols = ipv4
index cdff5bf05921d003afaba794f70948bf03f2c603..7259de188056f0845c1c42bd8603fb804e28de33 100644 (file)
@@ -654,11 +654,7 @@ static void cleanup_header_callback(void *context, int header_class,
                argv_add(state->auto_hdrs, vstring_str(header_buf), ARGV_END);
        }
        if (hdr_opts->type == HDR_TLS_REQUIRED && var_tls_required_enable) {
-           char   *cp = vstring_str(header_buf) + strlen(hdr_opts->name) + 1;
-
-           while (ISSPACE(*cp))
-               cp++;
-           if (strcasecmp(cp, "no") == 0)
+           if (strcasecmp(hdrval, "no") == 0)
                state->sendopts |= SOPT_REQUIRETLS_HEADER;
            else
                msg_warn("ignoring malformed header: '%.100s'",
index 14d4e2ad5f67a91de990b3902193673e395f4357..a6b120a5f07da70e6f1cfc81a71f75f593d0acc5 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      "20250911"
+#define MAIL_RELEASE_DATE      "20250920"
 #define MAIL_VERSION_NUMBER    "3.11"
 
 #ifdef SNAPSHOT
index 437f2a87013ae379ec90d275fe1e23e5dbf70dde..96d1915e2325b1502bae87c7940ac4e59e7a8f1e 100644 (file)
@@ -148,6 +148,16 @@ static void pcf_gobble_cf_line(VSTRING *full_entry_buf, VSTRING *line_buf,
     }
 }
 
+/* pcf_cmp_ht_key - qsort helper for ht_info pointer array */
+
+static int pcf_cmp_ht_key(const void *a, const void *b)
+{
+    HTABLE_INFO **ap = (HTABLE_INFO **) a;
+    HTABLE_INFO **bp = (HTABLE_INFO **) b;
+
+    return (strcmp(ap[0]->key, bp[0]->key));
+}
+
 /* pcf_edit_main - edit main.cf file */
 
 void    pcf_edit_main(int mode, int argc, char **argv)
@@ -262,7 +272,9 @@ void    pcf_edit_main(int mode, int argc, char **argv)
      * Generate new entries for parameters that were not found.
      */
     if (mode & PCF_EDIT_CONF) {
-       for (ht_info = ht = htable_list(table); *ht; ht++) {
+       ht_info = htable_list(table);
+       qsort((void *) ht_info, table->used, sizeof(*ht_info), pcf_cmp_ht_key);
+       for (ht = ht_info; *ht; ht++) {
            cvalue = (struct cvalue *) ht[0]->value;
            if (cvalue->found == 0)
                vstream_fprintf(dst, "%s = %s\n", ht[0]->key, cvalue->value);
index 5ce798d02f36317fa8ca1603c9d29fdf4fdb8cc3..984387a857457419423d818d74755071fced53e5 100644 (file)
@@ -296,7 +296,9 @@ typedef struct SMTP_STATE {
 #define SMTP_FEATURE_FROM_PROXY                (1<<22) /* proxied connection */
 
  /*
-  * Features that passivate under the endpoint.
+  * Features that passivate under the endpoint. Be sure to passivate all
+  * features that are needed in SMTP_KEY_MASK_SCACHE_DEST_LABEL, otherwise a
+  * reused connection may be stored under the wrong key.
   */
 #define SMTP_FEATURE_ENDPOINT_MASK \
        (~(SMTP_FEATURE_BEST_MX | SMTP_FEATURE_RSET_REJECTED \