]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.11-20130613
authorWietse Venema <wietse@porcupine.org>
Tue, 11 Jun 2013 04:17:07 +0000 (00:17 -0400)
committerViktor Dukhovni <postfix-users@dukhovni.org>
Fri, 14 Jun 2013 14:39:13 +0000 (10:39 -0400)
postfix/HISTORY
postfix/RELEASE_NOTES_2.10
postfix/conf/post-install
postfix/html/postconf.5.html
postfix/man/man5/postconf.5
postfix/proto/postconf.proto
postfix/src/global/mail_params.h
postfix/src/global/mail_version.h
postfix/src/posttls-finger/posttls-finger.c
postfix/src/smtp/smtp_tls_policy.c
postfix/src/tls/tls_dane.c

index c8ee7e1dd3add86a6bb11abc94250081d6e49748..658fbe6c6609df0b974e169afecd62c4f5905266 100644 (file)
@@ -18703,3 +18703,16 @@ Apologies for any names omitted.
 
        Cleanup (DANE support): be more explicit in the logging of
        object digests.  Viktor Dukhovni. tls/tls_dane.c.
+
+20100613
+
+       Workaround: unhelpful down-stream maintainers fail to install
+       the new smtpd_relay_restrictions safety net, causing things
+       to break. We hard-code the safety net instead.  Files:
+       global/mail_params.h, conf/post-install, RELEASE_NOTES_2.10.
+
+       Bugfix (DANE support): when TLSA records are insecure,
+       report that none are found. Viktor Dukhovni. Files:
+       posttls-finger/posttls-finger.c, smtp/smtp_tls_policy.c,
+       tls/tls_dane.c.
+
index 8e269c2cf0e6f0f51338cac91b4a068b7e332705..1140ce1eb5a8cd8458d4e360c7a6906a5f5b7ef0 100644 (file)
@@ -110,21 +110,22 @@ authentication in the proxy agent (Postfix 2.9 and later).
 Major changes - relay safety
 ----------------------------
 
-[Incompat 20121007] As part of a forward compatibility safety net,
-the Postfix installation procedure adds the following
-smtpd_relay_restrictions entry to main.cf when there is none:
+[Incompat 20130613] New smtpd_relay_restrictions parameter built-in
+default settings:
 
     smtpd_relay_restrictions = 
        permit_mynetworks 
        permit_sasl_authenticated 
        defer_unauth_destination
 
+This safety net prevents open relay problems due to mistakes
+with spam filter rules in smtpd_recipient_restrictions.
+
 If your site has a complex mail relay policy configured under
-smtpd_recipient_restrictions, this safety net will defer mail that
-the built-in smtpd_relay_restrictions setting would bounce. 
+smtpd_recipient_restrictions, this safety net may defer mail that
+Postfix should accept.
 
-To eliminate this safety net, take one of the following three
-actions:
+To fix this safety net, take one of the following actions:
 
 - Set smtpd_relay_restrictions empty, and keep using the existing
   mail relay authorization policy in smtpd_recipient_restrictions.
@@ -132,18 +133,16 @@ actions:
 - Copy the existing mail relay authorization policy from
   smtpd_recipient_restrictions to smtpd_relay_restrictions.
 
-- Set smtpd_relay_restrictions by hand to the new built-in
-  policy: permit_mynetworks reject_unauth_destination.
-
 There is no need to change the value of smtpd_recipient_restrictions.
 
-[Feature 20121007] This version introduces the smtpd_relay_restrictions
+[Feature 20130613] This version introduces the smtpd_relay_restrictions
 feature for mail relay control. The new built-in default settings
 are:
 
     smtpd_relay_restrictions = 
        permit_mynetworks 
-       reject_unauth_destination
+       permit_sasl_authenticated
+       defer_unauth_destination
 
     smtpd_recipient_restrictions =
        ( optional spam blocking rules would go here )
@@ -164,40 +163,32 @@ with smtpd_relay_restrictions, so that a permissive spam blocking
 policy under smtpd_recipient_restrictions will not unexpectedly
 result in a permissive mail relay policy.
 
-As usual, this new feature is introduced with safety nets to prevent
-surprises when a site upgrades from an earlier Postfix release.
+As of Postfix 2.10.0 the smtpd_relay_restrictions parameter built-in
+default settings are:
 
-1 - FORWARD COMPATIBILITY SAFETY NET: the Postfix installation
-    procedure adds the following smtpd_relay_restrictions entry to
-    main.cf when there is none:
-
-    smtpd_relay_restrictions = 
-       permit_mynetworks 
-       permit_sasl_authenticated 
-       defer_unauth_destination
+    smtpd_relay_restrictions =
+        permit_mynetworks
+        permit_sasl_authenticated
+        defer_unauth_destination
 
-    If your site has a complex mail relay policy configured under
-    smtpd_recipient_restrictions, this safety net will defer mail
-    that the built-in smtpd_relay_restrictions setting would bounce.
+If your site has a complex mail relay policy configured under
+smtpd_recipient_restrictions, this safety net may defer mail that
+Postfix should accept.
 
-    To eliminate this safety net, take one of the following three
-    actions:
+To migrate from an earlier Postfix release with the least amount
+of pain:
 
-    - Set smtpd_relay_restrictions empty, and keep using the existing
-      mail relay authorization policy in smtpd_recipient_restrictions.
+- Set smtpd_relay_restrictions empty, and keep using the existing
+  mail relay authorization policy in smtpd_recipient_restrictions.
 
-    - Copy the existing mail relay authorization policy from
-      smtpd_recipient_restrictions to smtpd_relay_restrictions.
+- There is no need to change the value of smtpd_recipient_restrictions.
 
-    - Set smtpd_relay_restrictions by hand to the new built-in
-      policy: permit_mynetworks reject_unauth_destination.
+To take advantage of the new smtpd_relay_restrictions feature:
 
-    There is no need to change the value of smtpd_recipient_restrictions.
+- Copy the existing mail relay authorization policy from
+  smtpd_recipient_restrictions to smtpd_relay_restrictions.
 
-2 - BACKWARDS COMPATIBILITY SAFETY NET: sites that migrate from
-    Postfix versions before 2.10 can set smtpd_relay_restrictions
-    to the empty value, and use smtpd_recipient_restrictions exactly
-    as they used it before.
+- There is no need to change the value of smtpd_recipient_restrictions.
 
 Major changes - start-up
 ------------------------
index 80e9a99e90d80063ef5096a4ab9f90836ba65d4e..91ff4a6772ff6ecb9a467ce57248eb3914cc36c9 100644 (file)
@@ -809,25 +809,26 @@ EOF
        $POSTCONF -c $config_directory inet_protocols=ipv4 || exit 1
     }
 
-    # Postfix 2.10.
-    # Safety net for incompatible changes due to the introduction
-    # of the smtpd_relay_restrictions feature to separate the
-    # mail relay policy from the spam blocking policy.
-    # PLEASE DO NOT REMOVE THIS CODE. ITS PURPOSE IS TO PREVENT
-    # INBOUND MAIL FROM UNEXPECTEDLY BOUNCING AFTER UPGRADING FROM
-    # POSTFIX BEFORE 2.10.
-    test -n "`$POSTCONF -c $config_directory -n smtpd_relay_restrictions`" || {
-       cat <<EOF | ${FMT}
-    COMPATIBILITY: editing $config_directory/main.cf, overriding
-    smtpd_relay_restrictions to prevent inbound mail from
-    unexpectedly bouncing.
-    Specify an empty smtpd_relay_restrictions value to keep using 
-    smtpd_recipient_restrictions as before.
-EOF
-       $POSTCONF -c $config_directory "smtpd_relay_restrictions = \
-           permit_mynetworks permit_sasl_authenticated \
-           defer_unauth_destination" || exit 1
-    }
+# Disabled because unhelpful down-stream maintainers disable the safety net.
+#    # Postfix 2.10.
+#    # Safety net for incompatible changes due to the introduction
+#    # of the smtpd_relay_restrictions feature to separate the
+#    # mail relay policy from the spam blocking policy.
+#    # PLEASE DO NOT REMOVE THIS CODE. ITS PURPOSE IS TO PREVENT
+#    # INBOUND MAIL FROM UNEXPECTEDLY BOUNCING AFTER UPGRADING FROM
+#    # POSTFIX BEFORE 2.10.
+#    test -n "`$POSTCONF -c $config_directory -n smtpd_relay_restrictions`" || {
+#      cat <<EOF | ${FMT}
+#    COMPATIBILITY: editing $config_directory/main.cf, overriding
+#    smtpd_relay_restrictions to prevent inbound mail from
+#    unexpectedly bouncing.
+#    Specify an empty smtpd_relay_restrictions value to keep using 
+#    smtpd_recipient_restrictions as before.
+#EOF
+#      $POSTCONF -c $config_directory "smtpd_relay_restrictions = \
+#          permit_mynetworks permit_sasl_authenticated \
+#          defer_unauth_destination" || exit 1
+#    }
 }
 
 # A reminder if this is the first time Postfix is being installed.
index 09cacecca07ebd022b93dadd12664a34657b1021..fa232099301a8a5b87d55f7ef65de14257c65113 100644 (file)
@@ -14211,7 +14211,7 @@ This feature is available in Postfix 2.1 and later.
 </DD>
 
 <DT><b><a name="smtpd_relay_restrictions">smtpd_relay_restrictions</a>
-(default: <a href="postconf.5.html#permit_mynetworks">permit_mynetworks</a>, <a href="postconf.5.html#reject_unauth_destination">reject_unauth_destination</a>)</b></DT><DD>
+(default: <a href="postconf.5.html#permit_mynetworks">permit_mynetworks</a>, <a href="postconf.5.html#permit_sasl_authenticated">permit_sasl_authenticated</a>, <a href="postconf.5.html#defer_unauth_destination">defer_unauth_destination</a>)</b></DT><DD>
 
 <p> Access restrictions for mail relay control that the Postfix
 SMTP server applies in the context of the RCPT TO command, before
index f7a9d7a0e70d7a30f6efc3a7e5d7f5a9985170e6..0888296d8ee1965b34681e6e8fbc4f196a9fd499 100644 (file)
@@ -9446,7 +9446,7 @@ not null.
 .br
 .PP
 This feature is available in Postfix 2.1 and later.
-.SH smtpd_relay_restrictions (default: permit_mynetworks, reject_unauth_destination)
+.SH smtpd_relay_restrictions (default: permit_mynetworks, permit_sasl_authenticated, defer_unauth_destination)
 Access restrictions for mail relay control that the Postfix
 SMTP server applies in the context of the RCPT TO command, before
 smtpd_recipient_restrictions.
index df5433977646587601faab4b5db04a530b524f51..793bcf03fc22c57cf259b9ea2f837ecbe8668ca3 100644 (file)
@@ -5948,7 +5948,7 @@ Example:
 smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination
 </pre>
 
-%PARAM smtpd_relay_restrictions permit_mynetworks, reject_unauth_destination
+%PARAM smtpd_relay_restrictions permit_mynetworks, permit_sasl_authenticated, defer_unauth_destination
 
 <p> Access restrictions for mail relay control that the Postfix
 SMTP server applies in the context of the RCPT TO command, before
index a1951ec8a085a9c87e7befa068b001abb94f7da8..e4a7dd7b624bd7fdfda3d81d7b473eda201230a2 100644 (file)
@@ -1975,7 +1975,8 @@ extern char *var_mail_checks;
 
 #define VAR_RELAY_CHECKS       "smtpd_relay_restrictions"
 #define DEF_RELAY_CHECKS       PERMIT_MYNETWORKS ", " \
-                               REJECT_UNAUTH_DEST
+                               PERMIT_SASL_AUTH \
+                               DEFER_UNAUTH_DEST
 extern char *var_relay_checks;
 
 #define VAR_RCPT_CHECKS                "smtpd_recipient_restrictions"
index 27f63d0d279fdbbf9a824de154d78e1ac8d5bca9..7132bde4196ee77c6c1830d9d592b770a05f6d26 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      "20130608"
+#define MAIL_RELEASE_DATE      "20130613"
 #define MAIL_VERSION_NUMBER    "2.11"
 
 #ifdef SNAPSHOT
index 3ca448ac36217f83a5607cffeef6bbc2b34fb637..03dc1ead6675f8cffcb8107d8704007d7cf0d3a1 100644 (file)
@@ -1171,6 +1171,9 @@ static int dane_host_level(STATE *state, DNS_RR *addr)
                             tls_dane_unusable(state->ddane) ?
                             "usable " : "");
                level = TLS_LEV_SECURE;
+           } else if (!TLS_DANE_HASTA(state->ddane)
+                      && !TLS_DANE_HASEE(state->ddane)) {
+               msg_panic("empty DANE match list");
            } else {
                if (state->match)
                    argv_free(state->match);
index 152763a37da856b7ad93d43c0d1fc9cfb0b549b8..bad77d2af059cc58dff422a9013f1fa3f40c2842 100644 (file)
@@ -823,7 +823,8 @@ static void dane_init(SMTP_TLS_POLICY *tls, SMTP_ITERATOR *iter)
     if (TLS_DANE_HASTA(dane)) {
        tls->matchargv = argv_alloc(2);
        argv_add(tls->matchargv, "hostname", "nexthop", ARGV_END);
-    }
+    } else if (!TLS_DANE_HASEE(dane))
+       msg_panic("empty DANE match list");
     tls->dane = dane;
     tls->level = TLS_LEV_DANE;
     return;
index 47b106981bdf9b6db064a6f73fbaddf9792f0283..b9c327ff521e3ae8f4dee4926f0c223eb265a4aa 100644 (file)
@@ -716,6 +716,8 @@ static void *dane_lookup(const char *tlsa_fqdn, void *unused_ctx)
 
        if (rrs->dnssec_valid)
            parse_tlsa_rrs(dane, rrs);
+       else
+           dane->flags |= TLS_DANE_FLAG_NORRS;
 
        dns_rr_free(rrs);
        break;