]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-3.0.3 v3.0.3
authorWietse Venema <wietse@porcupine.org>
Sat, 10 Oct 2015 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <postfix-users@dukhovni.org>
Mon, 12 Oct 2015 04:36:28 +0000 (00:36 -0400)
17 files changed:
postfix/HISTORY
postfix/INSTALL
postfix/README_FILES/INSTALL
postfix/conf/postfix-files
postfix/conf/postmulti-script
postfix/html/INSTALL.html
postfix/makedefs
postfix/proto/INSTALL.html
postfix/src/cleanup/cleanup_message.c
postfix/src/dns/dns.h
postfix/src/dns/dns_lookup.c
postfix/src/global/mail_version.h
postfix/src/global/uxtext.c
postfix/src/global/xtext.c
postfix/src/postmulti/postmulti.c
postfix/src/smtpd/smtpd_haproxy.c
postfix/src/util/scan_dir.c

index 721de20029fb0decb4676c4103d4fcce5396c2ee..aa689f90d6a276231d88b9021337b92b8797c0a4 100644 (file)
@@ -21665,3 +21665,65 @@ Apologies for any names omitted.
        SSLv2 or SSLv3.  See the RELEASE_NOTES file for how to get
        the old settings back. Files: global/mail_params.h,
        proto/postconf.proto, and files derived from those.
+
+20150722
+
+       The COMPATIBILITY_README text and HTML files were not
+       installed.  File: conf/postfix-files.
+
+20150903
+
+       Workaround: disable DNSSEC support for AIX 7x and earlier.
+       The AIX 6/7 resolver(5) API defines RES_USE_DNSSEC without
+       defining the "ad" bit.  Viktor Dukhovni.  Files: makedefs,
+       proto/INSTALL.html, dns/dns.h.
+
+20150923
+
+       Bugfix (introduced: 20120531-617): the Postfix SMTP server
+       used a larger-than-1 VSTREAM buffer to read the HAProxy
+       connection hand-off information. This broke TLS wrappermode,
+       as the TLS helo packet would end up in the plaintext VSTREAM
+       buffer. Reported by Lukas Erlacher.  File: smtpd/smtpd_haproxy.c.
+
+20150924
+
+       Bugfix (introduced: 20090216-24): incorrect postmulti error
+       message. Reported by Patrik Koetter. Fix by Viktor Dukhovni.
+       File: postmulti/postmulti.c.
+
+       Workaround: don't create a new instance when the template
+       main.cf and master.cf files are missing, as happens on
+       Debian-like systems. Viktor Dukhovni. File: conf/postmulti-script.
+
+20150925
+
+       Bugfix (introduced: 19970309, fixed 20150421 in development
+       release): reset errno before calling readdir(), in order
+       to distinguish between an end-of-directory and an error
+       condition. File: scandir.c.
+
+20150930
+
+       Bugfix (introduced: 20040124): Milter client panic while
+       adding a header, because the PREPEND action used the same
+       output function for header_checks and body_checks.  Viktor
+       Dukhovni and Wietse. File: cleanup/cleanup_message.c.
+
+       Bugfix (introduced: 20031128): xtext_unquote() did not
+       propagate error reports from xtext_unquote_append(), causing
+       the decoder to return partial ouput, instead of rejecting
+       malformed input. Fix by Krzysztof Wojta.  File: global/xtext.c.
+
+20151003
+
+       Bugfix (copied from xtext): uxtext_unquote() did not propagate
+       error reports from uxtext_unquote_append(), causing the
+       decoder to return partial output, instead of rejecting
+       malformed input.  Found by searching the code for similar
+       error patterns as with xtext_unquote().  File: global/uxtext.c.
+
+       Bugfix (introduced: 20141130, fixed around 20150607 in
+       development release): the DNS multi-query clients forgot
+       to save and restore h_errno when evaluating the aggregate
+       result. File: dns/dns_lookup.c.
index 5e5fa4e9046f54c359751e8d75dec99a0d3ef37d..a1745918149b7a047195545692e983f657b7ed2a 100644 (file)
@@ -539,6 +539,9 @@ The following is an extensive list of names and values.
 ||                            |probably should also override DEF_DB_TYPE as  |
 ||                            |described in section 4.6.                     |
 ||_____________________________|______________________________________________|
+||-DNO_DNSSEC                 |Do not build with DNSSEC support, even if the |
+||                            |resolver library appears to support it.       |
+||_____________________________|______________________________________________|
 ||                            |Do not build with Solaris /dev/poll support.  |
 ||-DNO_DEVPOLL                |By default, /dev/poll support is compiled in  |
 ||                            |on Solaris versions that are known to support |
index 401152db5f6a302daf9f1f8e8354719982a9d45a..dac8e8e894a59b33bcdcba1d84c9c088d7c51548 100644 (file)
@@ -539,6 +539,9 @@ The following is an extensive list of names and values.
 ||                             |probably should also override DEF_DB_TYPE as  |
 ||                             |described in section 4.6.                     |
 |_\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 |
+||-DNO_DNSSEC                  |Do not build with DNSSEC support, even if the |
+||                             |resolver library appears to support it.       |
+|_\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 |
 ||                             |Do not build with Solaris /dev/poll support.  |
 ||-DNO_DEVPOLL                 |By default, /dev/poll support is compiled in  |
 ||                             |on Solaris versions that are known to support |
index b259bca8c4dfd651803008af1575ea20a5b110b6..4cb19674b87e2a20276bd3ae1016b8af76cc4356 100644 (file)
@@ -274,6 +274,7 @@ $readme_directory/BACKSCATTER_README:f:root:-:644
 $readme_directory/BASIC_CONFIGURATION_README:f:root:-:644
 $readme_directory/BUILTIN_FILTER_README:f:root:-:644
 $readme_directory/CDB_README:f:root:-:644
+$readme_directory/COMPATIBILITY_README:f:root:-:644
 $readme_directory/CONNECTION_CACHE_README:f:root:-:644
 $readme_directory/CONTENT_INSPECTION_README:f:root:-:644
 $readme_directory/DATABASE_README:f:root:-:644
@@ -331,6 +332,7 @@ $html_directory/BACKSCATTER_README.html:f:root:-:644
 $html_directory/BASIC_CONFIGURATION_README.html:f:root:-:644
 $html_directory/BUILTIN_FILTER_README.html:f:root:-:644
 $html_directory/CDB_README.html:f:root:-:644
+$html_directory/COMPATIBILITY_README.html:f:root:-:644
 $html_directory/CONNECTION_CACHE_README.html:f:root:-:644
 $html_directory/CONTENT_INSPECTION_README.html:f:root:-:644
 $html_directory/CYRUS_README.html:f:root:-:644:o
index 349c8941deab1e0e10dc0644f3e187b9a5205dbd..b1aea8e0e44051cea1d4b1eb72dc7396194cd116 100644 (file)
@@ -142,6 +142,11 @@ create|import)
                fatal "'$config_directory' lacks a master.cf file"
        }
 
+       test -f $meta_directory/main.cf.proto ||
+           fatal "Missing main.cf prototype: $meta_directory/main.cf.proto"
+       test -f $meta_directory/master.cf.proto ||
+           fatal "Missing master.cf prototype: $meta_directory/master.cf.proto"
+
        # Create instance-specific directories
        #
        test -d $config_directory ||
index 1c5f33b030b1a205ec44e9e2dc99df7505c37226..3154d17f7e7128c80feb77d418a1955a77902794 100644 (file)
@@ -810,6 +810,10 @@ platforms that are known to support this feature. If you override
 this, then you probably should also override DEF_DB_TYPE as described
 in section 4.6.  </td> </tr>
 
+<tr> <td> </td> <td> -DNO_DNSSEC </td> <td> Do not build with DNSSEC
+support, even if the resolver library appears to support it. </td>
+</tr>
+
 <tr> <td> </td> <td> -DNO_DEVPOLL </td> <td> Do not build with
 Solaris <tt>/dev/poll</tt> support. By default, <tt>/dev/poll</tt>
 support is compiled in on Solaris versions that are known to support
index d29b9cf338dec75c8793530e3dc132ee538c9555..dbdc091dba17d13a7be23bbcce66878e3eb12402 100644 (file)
@@ -45,6 +45,9 @@
 #      Do not build with Solaris /dev/poll support.
 #      By default, /dev/poll support is compiled in on platforms that
 #      are known to support it.
+# .IP \fB-DNO_DNSSEC\fR
+#      Do not build with DNSSEC support, even if the resolver
+#      library appears to support it.
 # .IP \fB-DNO_EPOLL\fR
 #      Do not build with Linux EPOLL support.
 #      By default, EPOLL support is compiled in on platforms that
@@ -387,18 +390,21 @@ case "$SYSTEM.$RELEASE" in
                ;;
        AIX.*)  case "`uname -v`" in
                6)      SYSTYPE=AIX6
+                       CCARGS="$CCARGS -DNO_DNSSEC"
                        case "$CC" in
                        cc|*/cc|xlc|*/xlc) CCARGS="$CCARGS -w -blibpath:/usr/lib:/lib:/usr/local/lib";;
                        esac
                        CCARGS="$CCARGS -D_ALL_SOURCE -DHAS_POSIX_REGEXP"
                        ;;
                5)      SYSTYPE=AIX5
+                       CCARGS="$CCARGS -DNO_DNSSEC"
                        case "$CC" in
                        cc|*/cc|xlc|*/xlc) CCARGS="$CCARGS -w -blibpath:/usr/lib:/lib:/usr/local/lib";;
                        esac
                        CCARGS="$CCARGS -D_ALL_SOURCE -DHAS_POSIX_REGEXP"
                        ;;
                4)      SYSTYPE=AIX4
+                       CCARGS="$CCARGS -DNO_DNSSEC"
                        # How embarrassing...
                        case "$CC" in
                        cc|*/cc|xlc|*/xlc) OPT=; CCARGS="$CCARGS -w -blibpath:/usr/lib:/lib:/usr/local/lib";;
index 583618e241103c77ce3d28d5b394e2ebcdc5621e..63183add42409903875ad9b9f2a1003563f240a7 100644 (file)
@@ -810,6 +810,10 @@ platforms that are known to support this feature. If you override
 this, then you probably should also override DEF_DB_TYPE as described
 in section 4.6.  </td> </tr>
 
+<tr> <td> </td> <td> -DNO_DNSSEC </td> <td> Do not build with DNSSEC
+support, even if the resolver library appears to support it. </td>
+</tr>
+
 <tr> <td> </td> <td> -DNO_DEVPOLL </td> <td> Do not build with
 Solaris <tt>/dev/poll</tt> support. By default, <tt>/dev/poll</tt>
 support is compiled in on Solaris versions that are known to support
index 47b7177c61bc86272c4e59bca645b3219f5d4960..b33da8f4eb4470f1b779f019ccd51239839763f4 100644 (file)
@@ -385,11 +385,20 @@ static const char *cleanup_act(CLEANUP_STATE *state, char *context,
     if (STREQUAL(value, "PREPEND", command_len)) {
        if (*optional_text == 0) {
            msg_warn("PREPEND action without text in %s map", map_class);
-       } else if (strcmp(context, CLEANUP_ACT_CTXT_HEADER) == 0
-                  && !is_header(optional_text)) {
-           msg_warn("bad PREPEND header text \"%s\" in %s map -- "
-                    "need \"headername: headervalue\"",
-                    optional_text, map_class);
+       } else if (strcmp(context, CLEANUP_ACT_CTXT_HEADER) == 0) {
+           if (!is_header(optional_text)) {
+               msg_warn("bad PREPEND header text \"%s\" in %s map -- "
+                        "need \"headername: headervalue\"",
+                        optional_text, map_class);
+           } else {
+               VSTRING *temp;
+
+               cleanup_act_log(state, "prepend", context, buf, optional_text);
+               temp = vstring_strcpy(vstring_alloc(strlen(optional_text)),
+                                                    optional_text);
+               cleanup_out_header(state, temp);
+               vstring_free(temp);
+           }
        } else {
            cleanup_act_log(state, "prepend", context, buf, optional_text);
            cleanup_out_string(state, REC_TYPE_NORM, optional_text);
index 7cfc581080c6e74651f18764dcd3395d3cf1ec0b..ee6e1a48af44d719ad40b6910d30381615dc4be8 100644 (file)
        (cp) += 4; \
 }
 
+#endif
+
+/*
+ * Disable DNSSEC at compile-time even if RES_USE_DNSSEC is available
+ */
+#ifdef NO_DNSSEC
+#undef RES_USE_DNSSEC
 #endif
 
  /*
index 3838ea6b14599d33ceb35f40e5d667c7213fc968..ccedb94c102ea22666c00df2df36f6fdfdfd9ebc 100644 (file)
@@ -790,6 +790,7 @@ int     dns_lookup_rl(const char *name, unsigned flags, DNS_RR **rrlist,
     int     hpref_status = INT_MIN;
     VSTRING *hpref_rtext = 0;
     int     hpref_rcode;
+    int     hpref_h_errno;
     DNS_RR *rr;
 
     /* Save intermediate highest-priority result. */
@@ -801,6 +802,7 @@ int     dns_lookup_rl(const char *name, unsigned flags, DNS_RR **rrlist,
            vstring_strcpy(hpref_rtext ? hpref_rtext : \
                           (hpref_rtext = vstring_alloc(VSTRING_LEN(why))), \
                           vstring_str(why)); \
+       hpref_h_errno = h_errno; \
     } while (0)
 
     /* Restore intermediate highest-priority result. */
@@ -810,6 +812,7 @@ int     dns_lookup_rl(const char *name, unsigned flags, DNS_RR **rrlist,
            *rcode = hpref_rcode; \
        if (why && status != DNS_OK) \
            vstring_strcpy(why, vstring_str(hpref_rtext)); \
+       SET_H_ERRNO(hpref_h_errno); \
     } while (0)
 
     if (rrlist)
@@ -862,6 +865,7 @@ int     dns_lookup_rv(const char *name, unsigned flags, DNS_RR **rrlist,
     int     hpref_status = INT_MIN;
     VSTRING *hpref_rtext = 0;
     int     hpref_rcode;
+    int     hpref_h_errno;
     DNS_RR *rr;
 
     if (rrlist)
index 0d7a1b560de6231aa18845236a668683d2427ffb..2a7aca5425d2ad65ababa65b4663904af62dd5f6 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      "20150720"
-#define MAIL_VERSION_NUMBER    "3.0.2"
+#define MAIL_RELEASE_DATE      "20151010"
+#define MAIL_VERSION_NUMBER    "3.0.3"
 
 #ifdef SNAPSHOT
 #define MAIL_VERSION_DATE      "-" MAIL_RELEASE_DATE
index 03e5cc1380d26bf7b820cf8f819ce475b6001334..d374de4a6fae5ae66e4a4788ba9be0ec010d972b 100644 (file)
@@ -214,8 +214,7 @@ VSTRING *uxtext_unquote_append(VSTRING *unquoted, const char *quoted)
 VSTRING *uxtext_unquote(VSTRING *unquoted, const char *quoted)
 {
     VSTRING_RESET(unquoted);
-    uxtext_unquote_append(unquoted, quoted);
-    return (unquoted);
+    return (uxtext_unquote_append(unquoted, quoted) ? unquoted : 0);
 }
 
 #ifdef TEST
index e5605d7be47bdcce175630e4ec2651a04370f579..9a0225111bd1893fcd02726a4df0aeab150c75ed 100644 (file)
@@ -134,8 +134,7 @@ VSTRING *xtext_unquote_append(VSTRING *unquoted, const char *quoted)
 VSTRING *xtext_unquote(VSTRING *unquoted, const char *quoted)
 {
     VSTRING_RESET(unquoted);
-    xtext_unquote_append(unquoted, quoted);
-    return (unquoted);
+    return (xtext_unquote_append(unquoted, quoted) ? unquoted : 0);
 }
 
 #ifdef TEST
index 0d124ae7b138111a7f5b6e656338ae6e2cd11c99..8fdc23185e51b7256b74744ccf8ecefc4215d2d2 100644 (file)
@@ -1711,7 +1711,7 @@ int     main(int argc, char **argv)
        case 'e':
            if ((code = EDIT_CMD_CODE(optarg)) < 0)
                msg_fatal("Invalid '-e' edit action '%s'. Specify '%s', "
-                         "'%s', '%s', '%s', '%s', '%s', '%s', '%s' or '%s'",
+                         "'%s', '%s', '%s', '%s', '%s', '%s' or '%s'",
                          optarg,
                          EDIT_CMD_STR(EDIT_CMD_CREATE),
                          EDIT_CMD_STR(EDIT_CMD_DESTROY),
@@ -1720,8 +1720,7 @@ int     main(int argc, char **argv)
                          EDIT_CMD_STR(EDIT_CMD_ENABLE),
                          EDIT_CMD_STR(EDIT_CMD_DISABLE),
                          EDIT_CMD_STR(EDIT_CMD_ASSIGN),
-                         EDIT_CMD_STR(EDIT_CMD_INIT),
-                         optarg);
+                         EDIT_CMD_STR(EDIT_CMD_INIT));
            if (cmd_mode != code)
                command_mode_count++;
            cmd_mode = code;
index 599e3ed42604e9b7da53d0773628b7d3f39d5a5e..a4c527ce3c8592e62299fc307594fe35ee880160 100644 (file)
@@ -95,6 +95,14 @@ int     smtpd_peer_from_haproxy(SMTPD_STATE *state)
     int     io_err;
     VSTRING *escape_buf;
 
+    /*
+     * While reading HAProxy handshake information, don't buffer input beyond
+     * the end-of-line. That would break the TLS wrappermode handshake.
+     */
+    vstream_control(state->client,
+                   VSTREAM_CTL_BUFSIZE, 1,
+                   VSTREAM_CTL_END);
+
     /*
      * Note: the haproxy_srvr_parse() routine performs address protocol
      * checks, address and port syntax checks, and converts IPv4-in-IPv6
@@ -142,6 +150,13 @@ int     smtpd_peer_from_haproxy(SMTPD_STATE *state)
         * Avoid surprises in the Dovecot authentication server.
         */
        state->dest_addr = mystrdup(smtp_server_addr.buf);
+
+       /*
+        * Enable normal buffering.
+        */
+       vstream_control(state->client,
+                       VSTREAM_CTL_BUFSIZE, VSTREAM_BUFSIZE,
+                       VSTREAM_CTL_END);
        return (0);
     }
 }
index d8c76cfceea03220ab93bd5446a35f1bddafab72..432c9f4f6f3f349103438bd6a77387213d542984 100644 (file)
@@ -78,6 +78,7 @@
 #endif
 #endif
 #include <string.h>
+#include <errno.h>
 
 /* Utility library. */
 
@@ -177,6 +178,13 @@ char   *scan_dir_next(SCAN_DIR *scan)
 #define STREQ(x,y)     (strcmp((x),(y)) == 0)
 
     if (info) {
+
+       /*
+        * Fix 20150421: readdir() does not reset errno after reaching the
+        * end-of-directory. This dates back all the way to the initial
+        * implementation of 19970309.
+        */
+       errno = 0;
        while ((dp = readdir(info->dir)) != 0) {
            if (STREQ(dp->d_name, ".") || STREQ(dp->d_name, "..")) {
                if (msg_verbose > 1)