]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-3.0.1 v3.0.1
authorWietse Venema <wietse@porcupine.org>
Sun, 12 Apr 2015 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <postfix-users@dukhovni.org>
Tue, 14 Apr 2015 18:50:34 +0000 (14:50 -0400)
13 files changed:
postfix/HISTORY
postfix/conf/post-install
postfix/html/postscreen.8.html
postfix/man/man8/postscreen.8
postfix/src/dns/dns_strrecord.c
postfix/src/global/mail_version.h
postfix/src/postscreen/postscreen.c
postfix/src/smtpd/smtpd.c
postfix/src/tls/tls_dane.c
postfix/src/trivial-rewrite/resolve.c
postfix/src/util/allascii.c
postfix/src/util/strcasecmp_utf8.c
postfix/src/util/stringops.h

index 7585c0aa130ec16897fb9bdf861fbbb6f93067a6..9982e2b5a59f0dff48e596150bc4ecd431ea094d 100644 (file)
@@ -17919,7 +17919,7 @@ Apologies for any names omitted.
 
 20120824
 
-       Feature: support for "sendmail -R hdrs|full". Jan Kundrรกt.
+       Feature: support for "sendmail -R hdrs|full". Jan Kundr?t.
        File: sendmail/sendmail.c.
 
 20120902
@@ -21453,7 +21453,7 @@ Apologies for any names omitted.
        tls/tls_client.c, util/dict_alloc.c, util/dict_open.c,
        util/match_list.c.
 
-20150214
+20150124
 
        Workaround: nroff has been improved so that "-" comes out as
        some non-ASCII character, unlike HTML where it comes out
@@ -21461,12 +21461,10 @@ Apologies for any names omitted.
        hops to generate HTML and nroff input from the same source
        text.  Files; mantools/srctoman, mantools/postconf2man.
 
-20150524
-
        Cleanup: UTF-8 support in masquerade_domains.  File:
        cleanup/cleanup_masquerade.c.
 
-20150525
+20150125
 
        Cleanup: simplified the casefold() API: no input-dependent
        failure modes. Files: cleanup/cleanup_masquerade.c,
@@ -21502,7 +21500,7 @@ Apologies for any names omitted.
 
 20150127
 
-       Cleanup: simplified the 20150525 and 20150126 APIs, replacing
+       Cleanup: simplified the 20150125 and 20150126 APIs, replacing
        the most-common use cases with convenience macros that have
        fewer arguments. Files: anything that implements or invokes
        casefold*() or str*casecmp().
@@ -21595,3 +21593,55 @@ Apologies for any names omitted.
        Cleanup: after many years, the access(5) map BCC action is
        part of the stable release. Files: smtpd/smtpd_check.c,
        proto/acces.
+
+20150211
+
+       Cleanup: strncasecmp_utf8() streamlining. Files: util/stringops.h,
+       util/allascii.c, util/strcasecmp_utf8.c.
+
+20150214
+
+       Bugfix (introduced: Postfix 3.0): missing #ifdef USE_TLS
+       inside #ifdef USE_SASL_AUTH.  Viktor Dukhovni. File:
+       smtpd/smtpd.c.
+
+20150217
+
+       Cleanup: missing <string.h> include. File: util/allascii.c.
+
+20150221
+
+       Bugfix (introduced: Postfix 3.0): don't append '.' to the
+       DNS resource record value, when converting TXT records to
+       the string form that is used used by xxx_dns_reply_filter.
+       File: dns/dns_strrecord.c.
+
+20150313
+
+       Documentation: incorrect Postfix version number for
+       postscreen_dnsbl_timeout. Quanah Gibson-Mount. File:
+       postscreen/postscreen.c.
+
+20150324
+
+       Bugfix (introduced: Postfix 2.6): sender_dependent_relayhost_maps
+       ignored the relayhost setting in the case of a DUNNO lookup
+       result.  It would use the recipient domain instead.  Viktor
+       Dukhovni. Wietse took the pieces of code that enforce the
+       precedence of a sender-dependent relayhost, the global
+       relayhost, and the recipient domain, and put that code
+       together in once place so that it is easier to maintain.
+       File: trivial-rewrite/resolve.c.
+
+20150328
+
+       Bugfix (introduced: Postfix 1.1.0): post-install expanded
+       macros in parameter values when trying to detect parameter
+       overrides, causing unnecessary main.cf updates during Postfix
+       start-up. Julian Reich, Viktor Dukhovni, and Wietse.  File:
+       conf/post-install.
+
+20150330
+
+       Bitrot: prepare for future changes in OpenSSL API. Viktor
+       Dukhovni. File: tls_dane.c.
index b66b1477849ca9b0d307344ff1fe5cd2c54fcf60..d5db2600e72d25aadc78a2c13875568f0ed2a962 100644 (file)
@@ -447,10 +447,14 @@ do
     esac
 done
 
+# XXX Maybe update main.cf only with first install, upgrade, set
+# permissions, and what else? Should there be a warning otherwise?
+
 override=
 for name in $MOST_PARAMETERS
 do
-    eval test \"\$$name\" = \"`$POSTCONF -c $config_directory -h $name`\" || {
+    eval junk=\"\$$name\"
+    test "$junk" = "`$POSTCONF -c $config_directory -h $name`" || {
        override=1
        break
     }
index 18ac222e80f05e62781198cee65930b946782a0a..ccf9a30466df0363c4dc3402da4ba87bb3e29fd9 100644 (file)
@@ -228,7 +228,7 @@ POSTSCREEN(8)                                                    POSTSCREEN(8)
               greeting" protocol tests, based on its combined DNSBL  score  as
               defined with the <a href="postconf.5.html#postscreen_dnsbl_sites">postscreen_dnsbl_sites</a> parameter.
 
-       Available in Postfix version 2.11 and later:
+       Available in Postfix version 3.0 and later:
 
        <b><a href="postconf.5.html#postscreen_dnsbl_timeout">postscreen_dnsbl_timeout</a> (10s)</b>
               The time limit for DNSBL or DNSWL lookups.
index c71f1f77755513f3596fcbb96105fb5aa275b400..4a9e855632e679895d7e66cfabc4730096f711b2 100644 (file)
@@ -249,7 +249,7 @@ Allow a remote SMTP client to skip "before" and "after 220
 greeting" protocol tests, based on its combined DNSBL score as
 defined with the postscreen_dnsbl_sites parameter.
 .PP
-Available in Postfix version 2.11 and later:
+Available in Postfix version 3.0 and later:
 .IP "\fBpostscreen_dnsbl_timeout (10s)\fR"
 The time limit for DNSBL or DNSWL lookups.
 .SH "AFTER 220 GREETING TESTS"
index 9912b7cf1256a90719c316cbbbbaf6d3a0c5ccd0..318cdb90b3fca741f0d0e44c5f0136ad6542fc12 100644 (file)
@@ -1,6 +1,6 @@
 /*++
 /* NAME
-/*     dns_strtype 3
+/*     dns_strrecord 3
 /* SUMMARY
 /*     name service resource record printable forms
 /* SYNOPSIS
@@ -65,9 +65,11 @@ char   *dns_strrecord(VSTRING *buf, DNS_RR *rr)
     case T_MR:
     case T_NS:
     case T_PTR:
-    case T_TXT:
        vstring_sprintf_append(buf, "%s.", rr->data);
        break;
+    case T_TXT:
+       vstring_sprintf_append(buf, "%s", rr->data);
+       break;
     case T_MX:
        vstring_sprintf_append(buf, "%u %s.", rr->pref, rr->data);
        break;
index 861c2edd2406a40cdcc1f8ef8dde4f39828f3c8e..74e01ce1df7c6fb3edec22cfe79c76f36ccb9ca9 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      "20150208"
-#define MAIL_VERSION_NUMBER    "3.0.0"
+#define MAIL_RELEASE_DATE      "20150412"
+#define MAIL_VERSION_NUMBER    "3.0.1"
 
 #ifdef SNAPSHOT
 #define MAIL_VERSION_DATE      "-" MAIL_RELEASE_DATE
index e4bf8e4865473e44f004e49a367b973bff0b2d19..6a257bf5b07d73b4d12fa378c47c9b9b96d84e81 100644 (file)
 /*     greeting" protocol tests, based on its combined DNSBL score as
 /*     defined with the postscreen_dnsbl_sites parameter.
 /* .PP
-/*     Available in Postfix version 2.11 and later:
+/*     Available in Postfix version 3.0 and later:
 /* .IP "\fBpostscreen_dnsbl_timeout (10s)\fR"
 /*     The time limit for DNSBL or DNSWL lookups.
 /* AFTER 220 GREETING TESTS
index 6a704b4cdcd9b87b57a1e55402d5cf49dd61971b..abc00d9e302672ef6effbeaa17295c59790d6567 100644 (file)
@@ -4025,12 +4025,14 @@ static int xclient_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
        if (got_login)
            saved_username = mystrdup(state->sasl_username);
        smtpd_sasl_deactivate(state);
-       if (state->tls_context == 0)            /* TLS from XCLIENT proxy? */
-           smtpd_sasl_activate(state, VAR_SMTPD_SASL_OPTS,
-                               var_smtpd_sasl_opts);
-       else
+#ifdef USE_TLS
+       if (state->tls_context != 0)            /* TLS from XCLIENT proxy? */
            smtpd_sasl_activate(state, VAR_SMTPD_SASL_TLS_OPTS,
                                var_smtpd_sasl_tls_opts);
+       else
+#endif
+           smtpd_sasl_activate(state, VAR_SMTPD_SASL_OPTS,
+                               var_smtpd_sasl_opts);
        if (got_login) {
            smtpd_sasl_auth_extern(state, saved_username, XCLIENT_CMD);
            myfree(saved_username);
index cfe539a3ac846891c815e9064c9c294a12b2043d..1e91aa3cbdc4cd8137be17732941ceffe0bdbdf8 100644 (file)
@@ -1456,7 +1456,7 @@ static int set_serial(X509 *cert, AUTHORITY_KEYID *akid, X509 *subject)
 
 static int add_akid(X509 *cert, AUTHORITY_KEYID *akid)
 {
-    ASN1_STRING *id;
+    ASN1_OCTET_STRING *id;
     unsigned char c = 0;
     int     nid = NID_authority_key_identifier;
     int     ret = 0;
@@ -1468,13 +1468,13 @@ static int add_akid(X509 *cert, AUTHORITY_KEYID *akid)
      * exempt from any potential (off by default for now in OpenSSL)
      * self-signature checks!
      */
-    id = (ASN1_STRING *) ((akid && akid->keyid) ? akid->keyid : 0);
-    if (id && M_ASN1_STRING_length(id) == 1 && *M_ASN1_STRING_data(id) == c)
+    id = ((akid && akid->keyid) ? akid->keyid : 0);
+    if (id && ASN1_STRING_length(id) == 1 && *ASN1_STRING_data(id) == c)
        c = 1;
 
     if ((akid = AUTHORITY_KEYID_new()) != 0
        && (akid->keyid = ASN1_OCTET_STRING_new()) != 0
-       && M_ASN1_OCTET_STRING_set(akid->keyid, (void *) &c, 1)
+       && ASN1_OCTET_STRING_set(akid->keyid, (void *) &c, 1)
        && X509_add1_ext_i2d(cert, nid, akid, 0, X509V3_ADD_DEFAULT) > 0)
        ret = 1;
     if (akid)
index 0f8e6bbd0d9735eea51f94f28b74280431c210e4..2c65c2cafb38d6aa23cc2bfb2151a13ab8469d77 100644 (file)
@@ -591,15 +591,20 @@ static void resolve_addr(RES_CONTEXT *rp, char *sender, char *addr,
                if (*relay == 0) {
                    msg_warn("%s: ignoring null lookup result for %s",
                             rp->snd_relay_maps_name, sender_key);
-                   relay = "DUNNO";
-               }
-               vstring_strcpy(nexthop, strcasecmp(relay, "DUNNO") == 0 ?
-                              rcpt_domain : relay);
+                   relay = 0;
+               } else if (strcasecmp_utf8(relay, "DUNNO") == 0)
+                   relay = 0;
            } else if (rp->snd_relay_info
                       && rp->snd_relay_info->error != 0) {
                msg_warn("%s lookup failure", rp->snd_relay_maps_name);
                *flags |= RESOLVE_FLAG_FAIL;
                FREE_MEMORY_AND_RETURN;
+           } else {
+               relay = 0;
+           }
+           /* Enforce all the relayhost precedences in one place. */
+           if (relay != 0) {
+               vstring_strcpy(nexthop, relay);
            } else if (*RES_PARAM_VALUE(rp->relayhost))
                vstring_strcpy(nexthop, RES_PARAM_VALUE(rp->relayhost));
            else
index aabbc8e0db5be52399348bbaa38cf09835fcb5e8..6c8ff5f0f0bbd834405fcdcca37176ba4e3eb574 100644 (file)
@@ -8,12 +8,18 @@
 /*
 /*     int     allascii(buffer)
 /*     const char *buffer;
+/*
+/*     int     allascii_len(buffer, len)
+/*     const char *buffer;
+/*     ssize_t len;
 /* DESCRIPTION
 /*     allascii() determines if its argument is an all-ASCII string.
 /*
 /*     Arguments:
 /* .IP buffer
 /*     The null-terminated input string.
+/* .IP len
+/*     The string length, -1 to determine the length dynamically.
 /* LICENSE
 /* .ad
 /* .fi
 
 #include <sys_defs.h>
 #include <ctype.h>
+#include <string.h>
 
 /* Utility library. */
 
 #include "stringops.h"
 
-/* allascii - return true if string is all ASCII */
+/* allascii_len - return true if string is all ASCII */
 
-int     allascii(const char *string)
+int     allascii_len(const char *string, ssize_t len)
 {
     const char *cp;
     int     ch;
 
-    if (*string == 0)
+    if (len < 0)
+       len = strlen(string);
+    if (len == 0)
        return (0);
-    for (cp = string; (ch = *(unsigned char *) cp) != 0; cp++)
+    for (cp = string; cp < string + len
+        && (ch = *(unsigned char *) cp) != 0; cp++)
        if (!ISASCII(ch))
            return (0);
     return (1);
index fa711dcaa4d3368ec3cc867d60acef8542d45e10..07e576a556f96a1ff4d7698adcd8459eeed1adcb 100644 (file)
@@ -130,17 +130,14 @@ int     strncasecmp_utf8x(int flags, const char *s1, const char *s2,
     /*
      * Short-circuit optimization for ASCII-only text. This may be slower
      * than using a cache for all results. See comments above for limitations
-     * of strcasecmp(). XXX We could avoid the vstring_strncpy() if
-     * allascii() had a length argument.
+     * of strcasecmp().
      */
-    vstring_strncpy(f1, s1, len);
-    vstring_strncpy(f2, s2, len);
-    if (allascii(STR(f1)) && allascii(STR(f2)))
-       return (strncasecmp(STR(f1), STR(f2), len));
+    if (allascii_len(s1, len) && allascii_len(s2, len))
+       return (strncasecmp(s1, s2, len));
 
     /*
      * Caution: casefolding may change the number of bytes. See comments
-     * above for concerns about strcpy().
+     * above for concerns about strcmp().
      */
     flags &= CASEF_FLAG_UTF8;
     casefoldx(flags, f1, s1, len);
index 764fc95f911a4a508f35f964e3fbdbba066653b1..61ea515d8afecb926c45af1de29f578c1130d281 100644 (file)
@@ -44,7 +44,7 @@ extern VSTRING *escape(VSTRING *, const char *, ssize_t);
 extern int alldig(const char *);
 extern int allprint(const char *);
 extern int allspace(const char *);
-extern int allascii(const char *);
+extern int allascii_len(const char *, ssize_t);
 extern const char *split_nameval(char *, char **, char **);
 extern int valid_utf8_string(const char *, ssize_t);
 extern size_t balpar(const char *, const char *);
@@ -62,6 +62,7 @@ extern int strncasecmp_utf8x(int, const char *, const char *, ssize_t);
  /*
   * Convenience wrappers for most-common use cases.
   */
+#define allascii(s)    allascii_len((s), -1)
 #define casefold(dst, src) \
     casefoldx(util_utf8_enable ? CASEF_FLAG_UTF8 : 0, (dst), (src), -1)
 #define casefold_len(dst, src, len) \