]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-3.2.1 v3.2.1
authorWietse Venema <wietse@porcupine.org>
Sat, 10 Jun 2017 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <postfix-users@dukhovni.org>
Wed, 12 Jul 2017 05:43:47 +0000 (01:43 -0400)
postfix/HISTORY
postfix/INSTALL
postfix/README_FILES/INSTALL
postfix/html/INSTALL.html
postfix/proto/INSTALL.html
postfix/src/bounce/bounce_notify_util.c
postfix/src/global/mail_version.h
postfix/src/milter/milter.c
postfix/src/smtpd/smtpd.c
postfix/src/smtpd/smtpd_check.c
postfix/src/util/vstring.c

index 3b7a72b5bb5b6c6e53efe65c9d058a1d9b232452..a17ec44873779331608a64c1bf99466f05382b15 100644 (file)
@@ -22923,7 +22923,7 @@ Apologies for any names omitted.
 
 20170206
 
-       Bugfix (introduced: Postfix 3.0): when check_mumble_a_access
+       Bugfix (introduced: Postfix 3.0): check_mumble_a_access
        did not handle [ipaddress], unlike check_mumble_mx_access.
        When check_mumble_a_access was introduced, some condition
        was not updated.  Reported by James (postfix_tracker). File:
@@ -22940,5 +22940,42 @@ Apologies for any names omitted.
 20170218
 
        Cleanup: typofixes from klemens. The only change in compiled
-       code is in one identical mysql error message that also
-       appears in the pgsql client.  Files: about 50.
+       code is in one mysql error message that also appears in the
+       pgsql client. Files: about 50.
+
+20170221
+
+       Compatibility fix (introduced: Postfix 3.1): some Milter
+       applications do not recognize macros sent as {name} when
+       macros have single-character names. Postfix now sends such
+       macros without {} as it has done historically. Viktor
+       Dukhovni. File: milter/milter.c.
+
+20170402
+
+       Bugfix (introduced: Postfix 3.2): restore the SMTP server
+       receive override options at the end of an SMTP session,
+       after the options may have been modified by an smtpd_milter_maps
+       setting of "DISABLE". Problem report by Christian Rößner,
+       root cause analysis by Viktor Dukhovni. File: smtpd/smtpd.c.
+
+20170430
+
+       Safety net: append a null byte to vstring buffers, so that
+       C-style string operations won't scribble past the end. File:
+       vstring.c.
+
+20170531
+
+       Bugfix (introduced: Postfix 3.2): after the table lookup
+       overhaul, the check_sender_access and check_recipient_access
+       features ignored the parent_domain_matches_subdomains
+       setting. Reported by Henrik Larsson. File: smtpd/smtpd_check.c.
+
+20170610
+
+       Workaround (introduced: Postfix 3.0 20140718): prevent MIME
+       downgrade of Postfix-generated message/delivery status.
+       It's supposed to be 7bit, therefore quoted-printable encoding
+       is not expected. Problem reported by Griff. File:
+       bounce/bounce_notify_util.c.
index f2a38d314122f9638990a26fa91d2a091560f981..10e69408c8b71a92e7a729977930d484b6575b71 100644 (file)
@@ -612,7 +612,7 @@ The following is an extensive list of names and values.
 |_______________________________|_____________________________________________|
 |                              |Specifies options for the postfix-install    |
 |POSTFIX_INSTALL_OPTS=-option...|command, separated by whitespace. Currently, |
-|                              |the only supported option is "-keep-new-     |
+|                              |the only supported option is "-keep-build-   |
 |                              |mtime".                                      |
 |_______________________________|_____________________________________________|
 |                              |Specifies non-default compiler options for   |
index c0168593fc3b4e02a901e155c0094cc5cc316250..14e61caf003d2e43e073154fa67d6ea1c688d34f 100644 (file)
@@ -612,7 +612,7 @@ The following is an extensive list of names and values.
 |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
 |                               |Specifies options for the postfix-install    |
 |POSTFIX_INSTALL_OPTS=-option...|command, separated by whitespace. Currently, |
-|                               |the only supported option is "-keep-new-     |
+|                               |the only supported option is "-keep-build-   |
 |                               |mtime".                                      |
 |_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
 |                               |Specifies non-default compiler options for   |
index 016ea8221a71c6255c90983a931919ad4c6df182..2ee35cdf943c70b8d19074a04b94a9c0c00414bd 100644 (file)
@@ -883,7 +883,7 @@ Specify OPT= to turn off optimization. </td> </tr>
 <tr> <td colspan="2"> POSTFIX_INSTALL_OPTS=-option... </td> <td>
 Specifies options for the <tt>postfix-install</tt> command, separated
 by whitespace. Currently, the only supported option is
-"<tt>-keep-new-mtime</tt>". </td> </tr>
+"<tt>-keep-build-mtime</tt>". </td> </tr>
 
 <tr> <td colspan="2"> SHLIB_CFLAGS=flags </td> <td> Specifies
 non-default compiler options for building Postfix dynamically-linked
index f7213392014830a6afa1fda82cab00e3a1af2273..984528cbe8130ba3b43ac1ae3fa41ef483497e90 100644 (file)
@@ -883,7 +883,7 @@ Specify OPT= to turn off optimization. </td> </tr>
 <tr> <td colspan="2"> POSTFIX_INSTALL_OPTS=-option... </td> <td>
 Specifies options for the <tt>postfix-install</tt> command, separated
 by whitespace. Currently, the only supported option is
-"<tt>-keep-new-mtime</tt>". </td> </tr>
+"<tt>-keep-build-mtime</tt>". </td> </tr>
 
 <tr> <td colspan="2"> SHLIB_CFLAGS=flags </td> <td> Specifies
 non-default compiler options for building Postfix dynamically-linked
index fbcda18d4d7c96665a5d5db0b368c2d78aaf7215..65a874d9db1279ab7c86630f1fc4bf6564aea950 100644 (file)
@@ -637,7 +637,9 @@ int     bounce_header_dsn(VSTREAM *bounce, BOUNCE_INFO *bounce_info)
                      (bounce_info->smtputf8 & SMTPUTF8_FLAG_REQUESTED) ?
                      "global-" : "");
     /* Fix 20140709: addresses may be 8bit. */
-    if (NOT_7BIT_MIME(bounce_info))
+    if (NOT_7BIT_MIME(bounce_info)
+    /* BC Fix 20170610: prevent MIME downgrade of message/delivery-status. */
+       && (bounce_info->smtputf8 & SMTPUTF8_FLAG_REQUESTED))
        post_mail_fprintf(bounce, "Content-Transfer-Encoding: %s",
                          bounce_info->mime_encoding);
 
index 040fa635f8e016bc26fbe0e2cb69166adde5af5e..2e0859b386ae6678c9fe46b297a3d5a085d1f934 100644 (file)
@@ -20,8 +20,8 @@
   * Patches change both the patchlevel and the release date. Snapshots have no
   * patchlevel; they change the release date only.
   */
-#define MAIL_RELEASE_DATE      "20170228"
-#define MAIL_VERSION_NUMBER    "3.2.0"
+#define MAIL_RELEASE_DATE      "20170610"
+#define MAIL_VERSION_NUMBER    "3.2.1"
 
 #ifdef SNAPSHOT
 #define MAIL_VERSION_DATE      "-" MAIL_RELEASE_DATE
index 64836d46313662c9597d5f0fa8681c54539a7750..ac2baaf7762445a527db60c2d2be3ff48c1f0156 100644 (file)
@@ -333,18 +333,21 @@ static ARGV *milter_macro_lookup(MILTERS *milters, const char *macro_names)
     VSTRING *canon_buf = vstring_alloc(20);
     const char *value;
     const char *name;
+    const char *cname;
 
     while ((name = mystrtok(&cp, CHARS_COMMA_SP)) != 0) {
        if (msg_verbose)
            msg_info("%s: \"%s\"", myname, name);
        if (*name != '{')                       /* } */
-           name = STR(vstring_sprintf(canon_buf, "{%s}", name));
-       if ((value = milters->mac_lookup(name, milters->mac_context)) != 0) {
+           cname = STR(vstring_sprintf(canon_buf, "{%s}", name));
+       else
+           cname = name;
+       if ((value = milters->mac_lookup(cname, milters->mac_context)) != 0) {
            if (msg_verbose)
                msg_info("%s: result \"%s\"", myname, value);
            argv_add(argv, name, value, (char *) 0);
        } else if (milters->macro_defaults != 0
-            && (value = htable_find(milters->macro_defaults, name)) != 0) {
+           && (value = htable_find(milters->macro_defaults, cname)) != 0) {
            if (msg_verbose)
                msg_info("%s: using default \"%s\"", myname, value);
            argv_add(argv, name, value, (char *) 0);
index 986264b22730c793a0fb80a70941bb4443715485..40d49f623c59244b7f59c3faba480b8fc3925499 100644 (file)
@@ -5396,6 +5396,8 @@ static void teardown_milters(SMTPD_STATE *state)
        milter_free(state->milters);
        state->milters = 0;
     }
+    smtpd_input_transp_mask =
+       input_transp_mask(VAR_INPUT_TRANSP, var_input_transp);
 }
 
 
index 47ccec1a1ab09763321c40b1832c452460a78c3d..ea7d3870ed4925f0455dfc39eca5715b3cee77ce 100644 (file)
@@ -3174,6 +3174,7 @@ static int check_mail_access(SMTPD_STATE *state, const char *table,
     const char *myname = "check_mail_access";
     const RESOLVE_REPLY *reply;
     const char *value;
+    int     lookup_strategy;
     int     status;
     MAPS   *maps;
 
@@ -3213,8 +3214,10 @@ static int check_mail_access(SMTPD_STATE *state, const char *table,
      * Look up user+foo@domain if the address has an extension, user@domain
      * otherwise.
      */
-#define LOOKUP_STRATEGY (MA_FIND_FULL | MA_FIND_NOEXT | MA_FIND_DOMAIN \
-                        | MA_FIND_PDMS | MA_FIND_LOCALPART_AT)
+    lookup_strategy = MA_FIND_FULL | MA_FIND_NOEXT | MA_FIND_DOMAIN
+       | MA_FIND_LOCALPART_AT
+       | (access_parent_style == MATCH_FLAG_PARENT ?
+          MA_FIND_PDMS : MA_FIND_PDDMDS);
 
     if ((maps = (MAPS *) htable_find(map_command_table, table)) == 0) {
        msg_warn("%s: unexpected dictionary: %s", myname, table);
@@ -3225,7 +3228,7 @@ static int check_mail_access(SMTPD_STATE *state, const char *table,
                                   def_acl));
     }
     if ((value = mail_addr_find_strategy(maps, CONST_STR(reply->recipient),
-                                     (char **) 0, LOOKUP_STRATEGY)) != 0) {
+                                     (char **) 0, lookup_strategy)) != 0) {
        *found = 1;
        status = check_table_result(state, table, value,
                                    CONST_STR(reply->recipient),
index 6e090a2ec49188d567e44e0732fb512348e25f53..b97a32463ee285e87a70745d60a1907b2af8621c 100644 (file)
@@ -307,10 +307,11 @@ static void vstring_extend(VBUF *bp, ssize_t incr)
      */
     if ((bp->flags & VSTRING_FLAG_EXACT) == 0 && bp->len > incr)
        incr = bp->len;
-    if (bp->len > SSIZE_T_MAX - incr)
+    if (bp->len > SSIZE_T_MAX - incr - 1)
        msg_fatal("vstring_extend: length overflow");
     new_len = bp->len + incr;
-    bp->data = (unsigned char *) myrealloc((void *) bp->data, new_len);
+    bp->data = (unsigned char *) myrealloc((void *) bp->data, new_len + 1);
+    bp->data[new_len] = 0;
     bp->len = new_len;
     bp->ptr = bp->data + used;
     bp->cnt = bp->len - used;
@@ -350,12 +351,13 @@ VSTRING *vstring_alloc(ssize_t len)
 {
     VSTRING *vp;
 
-    if (len < 1)
+    if (len < 1 || len > SSIZE_T_MAX - 1)
        msg_panic("vstring_alloc: bad length %ld", (long) len);
     vp = (VSTRING *) mymalloc(sizeof(*vp));
     vp->vbuf.flags = 0;
     vp->vbuf.len = 0;
-    vp->vbuf.data = (unsigned char *) mymalloc(len);
+    vp->vbuf.data = (unsigned char *) mymalloc(len + 1);
+    vp->vbuf.data[len] = 0;
     vp->vbuf.len = len;
     VSTRING_RESET(vp);
     vp->vbuf.data[0] = 0;