]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.6.8 v2.6.8
authorWietse Venema <wietse@porcupine.org>
Tue, 23 Nov 2010 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <postfix-users@dukhovni.org>
Sat, 10 Feb 2018 19:38:33 +0000 (14:38 -0500)
15 files changed:
postfix/HISTORY
postfix/RELEASE_NOTES
postfix/html/postconf.5.html
postfix/man/man5/postconf.5
postfix/mantools/postlink
postfix/proto/postconf.proto
postfix/src/global/mail_params.h
postfix/src/global/mail_version.h
postfix/src/global/pipe_command.c
postfix/src/smtpd/smtpd.c
postfix/src/smtpd/smtpd_check.c
postfix/src/smtpd/smtpd_proxy.c
postfix/src/tls/Makefile.in
postfix/src/tls/tls_certkey.c
postfix/src/tls/tls_misc.c

index fb86fb8fd48d68a078186a60c2f4a6ed824a3ff0..f47f3d38ab318d18479c80b5bebf40e9681ce1b0 100644 (file)
@@ -15367,3 +15367,43 @@ Apologies for any names omitted.
 
        Portability: Berkeley DB 5.x has the same API as Berkeley
        DB 4.1 and later. File: util/dict_db.c.
+
+20100610
+
+       Bugfix (introduced Postfix 2.2): Postfix no longer appends
+       the system default CA certificates to the lists specified
+       with *_tls_CAfile or with *_tls_CApath.  This prevents
+       third-party certificates from getting mail relay permission
+       with the permit_tls_all_clientcerts feature.  Unfortunately
+       this may cause compatibility problems with configurations
+       that rely on certificate verification for other purposes.
+       To get the old behavior, specify "tls_append_default_CA =
+       yes".  Files: tls/tls_certkey.c, tls/tls_misc.c,
+       global/mail_params.h.  proto/postconf.proto, mantools/postlink.
+
+20100714
+
+       Compatibility with Postfix < 2.3: fix 20061207 was incomplete
+       (undoing the change to bounce instead of defer after
+       pipe-to-command delivery fails with a signal). Fix by Thomas
+       Arnett. File: global/pipe_command.c.
+
+20100827
+
+       Performance: fix for poor smtpd_proxy_filter TCP performance
+       over loopback (127.0.0.1) connections. Problem reported by
+       Mark Martinec.  Files: smtpd/smtpd_proxy.c.
+
+20101023
+
+       Cleanup: don't apply reject_rhsbl_helo to non-domain forms
+       such as network addresses.  This would cause false positives
+       with dbl.spamhaus.org.  File: smtpd/smtpd_check.c.
+
+20101117
+
+       Bugfix: the "421" reply after Milter error was overruled
+       by Postfix 1.1 code that replied with "503" for RFC 2821
+       compliance. We now make an exception for "final" replies,
+       as permitted by RFC. Solution by Victor Duchovni. File:
+       smtpd/smtpd.c.
index ff07431554c0ba87865f5610d75f7824fc9b6015..4c1e8f7a3c3fb6ed2f88a785863d239f5782846f 100644 (file)
@@ -14,6 +14,18 @@ specifies the release date of a stable release or snapshot release.
 If you upgrade from Postfix 2.4 or earlier, read RELEASE_NOTES-2.5
 before proceeding.
 
+Incompatibility with Postfix 2.6.8
+----------------------------------
+
+Postfix no longer appends the system-supplied default CA certificates
+to the lists specified with *_tls_CAfile or with *_tls_CApath. This
+prevents third-party certificates from getting mail relay permission
+with the permit_tls_all_clientcerts feature.
+Unfortunately this change may cause compatibility problems when
+configurations rely on certificate verification for other purposes.
+Specify "tls_append_default_CA = yes" for backwards compatibility.
+
 Major changes - multi-instance support
 --------------------------------------
 
index 701485daabae32b725ea17ff26a02934f04266b7..20d95fdc347a9c76ded8ae0ab103f2fc8b04e4fb 100644 (file)
@@ -8889,6 +8889,10 @@ file may also be used to augment the client certificate trust chain,
 but it is best to include all the required certificates directly in
 $<a href="postconf.5.html#smtp_tls_cert_file">smtp_tls_cert_file</a>. </p>
 
+<p> Specify "<a href="postconf.5.html#tls_append_default_CA">tls_append_default_CA</a> = no" to prevent Postfix from
+appending the system-supplied default CAs and trusting third-party
+certificates. </p>
+
 <p> Example: </p>
 
 <pre>
@@ -8912,6 +8916,10 @@ with, for example, "$OPENSSL_HOME/bin/c_rehash /etc/postfix/certs".
 <p> To use this option in chroot mode, this directory (or a copy)
 must be inside the chroot jail. </p>
 
+<p> Specify "<a href="postconf.5.html#tls_append_default_CA">tls_append_default_CA</a> = no" to prevent Postfix from
+appending the system-supplied default CAs and trusting third-party
+certificates. </p>
+
 <p> Example: </p>
 
 <pre>
@@ -10523,8 +10531,11 @@ authenticated via the <a href="http://tools.ietf.org/html/rfc4954">RFC 4954</a>
 <dd> Permit the request when the remote SMTP client certificate is
 verified successfully.  This option must be used only if a special
 CA issues the certificates and only this CA is listed as trusted
-CA, otherwise all clients with a recognized certificate would be
-allowed to relay. This feature is available with Postfix version 2.2.</dd>
+CA. Otherwise, clients with a third-party certificate would also
+be allowed to relay.  Specify "<a href="postconf.5.html#tls_append_default_CA">tls_append_default_CA</a> = no" when the
+trusted CA is specified with <a href="postconf.5.html#smtpd_tls_CAfile">smtpd_tls_CAfile</a> or <a href="postconf.5.html#smtpd_tls_CApath">smtpd_tls_CApath</a>,
+to prevent Postfix from appending the system-supplied default CAs.
+This feature is available with Postfix version 2.2.</dd>
 
 <dt><b><a name="permit_tls_clientcerts">permit_tls_clientcerts</a></b></dt>
 
@@ -12193,6 +12204,10 @@ file may also be used to augment the server certificate trust chain,
 but it is best to include all the required certificates directly in the
 server certificate file. </p>
 
+<p> Specify "<a href="postconf.5.html#tls_append_default_CA">tls_append_default_CA</a> = no" to prevent Postfix from
+appending the system-supplied default CAs and trusting third-party
+certificates. </p>
+
 <p> By default (see <a href="postconf.5.html#smtpd_tls_ask_ccert">smtpd_tls_ask_ccert</a>), client certificates are not
 requested, and <a href="postconf.5.html#smtpd_tls_CAfile">smtpd_tls_CAfile</a> should remain empty. If you do make use
 of client certificates, the distinguished names (DNs) of the certificate
@@ -12224,6 +12239,10 @@ for example, "$OPENSSL_HOME/bin/c_rehash /etc/postfix/certs". To use
 <a href="postconf.5.html#smtpd_tls_CApath">smtpd_tls_CApath</a> in chroot mode, this directory (or a copy) must be
 inside the chroot jail. </p>
 
+<p> Specify "<a href="postconf.5.html#tls_append_default_CA">tls_append_default_CA</a> = no" to prevent Postfix from
+appending the system-supplied default CAs and trusting third-party
+certificates. </p>
+
 <p> By default (see <a href="postconf.5.html#smtpd_tls_ask_ccert">smtpd_tls_ask_ccert</a>), client certificates are
 not requested, and <a href="postconf.5.html#smtpd_tls_CApath">smtpd_tls_CApath</a> should remain empty. In contrast
 to <a href="postconf.5.html#smtp_tls_CAfile">smtp_tls_CAfile</a>, DNs of certificate authorities installed
@@ -13341,6 +13360,23 @@ connections.  Next, you enable Postfix TCP servers with the updated
 <p> This feature is available in Postfix 2.6 and later. </p>
 
 
+</DD>
+
+<DT><b><a name="tls_append_default_CA">tls_append_default_CA</a>
+(default: no)</b></DT><DD>
+
+<p> Append the system-supplied default certificate authority
+certificates to the ones specified with *_tls_CApath or *_tls_CAfile.
+The default is "no"; this prevents Postfix from trusting third-party
+certificates and giving them relay permission with
+<a href="postconf.5.html#permit_tls_all_clientcerts">permit_tls_all_clientcerts</a>.  </p>
+
+<p> This feature is available in Postfix 2.4.15, 2.5.11, 2.6.8,
+2.7.2 and later versions. Specify "<a href="postconf.5.html#tls_append_default_CA">tls_append_default_CA</a> = yes" for
+backwards compatibility, to avoid breaking certificate verification
+with sites that don't use <a href="postconf.5.html#permit_tls_all_clientcerts">permit_tls_all_clientcerts</a>. </p>
+
+
 </DD>
 
 <DT><b><a name="tls_daemon_random_bytes">tls_daemon_random_bytes</a>
index ee6788987e1bb0ca9215a49d50b1bab589cc9ce6..dba5bc96db7b2c506fb4fcfe075e2a9b31406f4a 100644 (file)
@@ -5046,6 +5046,10 @@ file may also be used to augment the client certificate trust chain,
 but it is best to include all the required certificates directly in
 $smtp_tls_cert_file.
 .PP
+Specify "tls_append_default_CA = no" to prevent Postfix from
+appending the system-supplied default CAs and trusting third-party
+certificates.
+.PP
 Example:
 .PP
 .nf
@@ -5066,6 +5070,10 @@ with, for example, "$OPENSSL_HOME/bin/c_rehash /etc/postfix/certs".
 To use this option in chroot mode, this directory (or a copy)
 must be inside the chroot jail.
 .PP
+Specify "tls_append_default_CA = no" to prevent Postfix from
+appending the system-supplied default CAs and trusting third-party
+certificates.
+.PP
 Example:
 .PP
 .nf
@@ -6404,8 +6412,11 @@ authenticated via the RFC 4954 (AUTH) protocol.
 Permit the request when the remote SMTP client certificate is
 verified successfully.  This option must be used only if a special
 CA issues the certificates and only this CA is listed as trusted
-CA, otherwise all clients with a recognized certificate would be
-allowed to relay. This feature is available with Postfix version 2.2.
+CA. Otherwise, clients with a third-party certificate would also
+be allowed to relay.  Specify "tls_append_default_CA = no" when the
+trusted CA is specified with smtpd_tls_CAfile or smtpd_tls_CApath,
+to prevent Postfix from appending the system-supplied default CAs.
+This feature is available with Postfix version 2.2.
 .IP "\fBpermit_tls_clientcerts\fR"
 Permit the request when the remote SMTP client certificate
 fingerprint is listed in $relay_clientcerts.
@@ -7519,6 +7530,10 @@ file may also be used to augment the server certificate trust chain,
 but it is best to include all the required certificates directly in the
 server certificate file.
 .PP
+Specify "tls_append_default_CA = no" to prevent Postfix from
+appending the system-supplied default CAs and trusting third-party
+certificates.
+.PP
 By default (see smtpd_tls_ask_ccert), client certificates are not
 requested, and smtpd_tls_CAfile should remain empty. If you do make use
 of client certificates, the distinguished names (DNs) of the certificate
@@ -7548,6 +7563,10 @@ for example, "$OPENSSL_HOME/bin/c_rehash /etc/postfix/certs". To use
 smtpd_tls_CApath in chroot mode, this directory (or a copy) must be
 inside the chroot jail.
 .PP
+Specify "tls_append_default_CA = no" to prevent Postfix from
+appending the system-supplied default CAs and trusting third-party
+certificates.
+.PP
 By default (see smtpd_tls_ask_ccert), client certificates are
 not requested, and smtpd_tls_CApath should remain empty. In contrast
 to smtp_tls_CAfile, DNs of certificate authorities installed
@@ -8408,6 +8427,17 @@ tcp_windowsize change will work only for Postfix TCP clients (\fBsmtp\fR(8),
 \fBlmtp\fR(8)).
 .PP
 This feature is available in Postfix 2.6 and later.
+.SH tls_append_default_CA (default: no)
+Append the system-supplied default certificate authority
+certificates to the ones specified with *_tls_CApath or *_tls_CAfile.
+The default is "no"; this prevents Postfix from trusting third-party
+certificates and giving them relay permission with
+permit_tls_all_clientcerts.
+.PP
+This feature is available in Postfix 2.4.15, 2.5.11, 2.6.8,
+2.7.2 and later versions. Specify "tls_append_default_CA = yes" for
+backwards compatibility, to avoid breaking certificate verification
+with sites that don't use permit_tls_all_clientcerts.
 .SH tls_daemon_random_bytes (default: 32)
 The number of pseudo-random bytes that an \fBsmtp\fR(8) or \fBsmtpd\fR(8)
 process requests from the \fBtlsmgr\fR(8) server in order to seed its
index 7d4d59e5255ef268e0ede5ec1f01d9ec2ea008a5..9e4f3b374437b2e2aaab2e94d70574aacccc763b 100755 (executable)
@@ -665,6 +665,7 @@ while (<>) {
     s;\btls_null_cipherlist\b;<a href="postconf.5.html#tls_null_cipherlist">$&</a>;g;
     s;\btls_eecdh_strong_curve\b;<a href="postconf.5.html#tls_eecdh_strong_curve">$&</a>;g;
     s;\btls_eecdh_ultra_curve\b;<a href="postconf.5.html#tls_eecdh_ultra_curve">$&</a>;g;
+    s;\btls_append_default_CA\b;<a href="postconf.5.html#tls_append_default_CA">$&</a>;g;
  
     s;\bfrozen_delivered_to\b;<a href="postconf.5.html#frozen_delivered_to">$&</a>;g;
 
index eb30b1902964545a84cf3c6db66840e3fdb07010..a18cc0f09d9b8d39ca5947340abcd615cb444497 100644 (file)
@@ -4792,8 +4792,11 @@ authenticated via the RFC 4954 (AUTH) protocol. </dd>
 <dd> Permit the request when the remote SMTP client certificate is
 verified successfully.  This option must be used only if a special
 CA issues the certificates and only this CA is listed as trusted
-CA, otherwise all clients with a recognized certificate would be
-allowed to relay. This feature is available with Postfix version 2.2.</dd>
+CA. Otherwise, clients with a third-party certificate would also
+be allowed to relay.  Specify "tls_append_default_CA = no" when the
+trusted CA is specified with smtpd_tls_CAfile or smtpd_tls_CApath,
+to prevent Postfix from appending the system-supplied default CAs.
+This feature is available with Postfix version 2.2.</dd>
 
 <dt><b><a name="permit_tls_clientcerts">permit_tls_clientcerts</a></b></dt>
 
@@ -8535,6 +8538,10 @@ file may also be used to augment the server certificate trust chain,
 but it is best to include all the required certificates directly in the
 server certificate file. </p>
 
+<p> Specify "tls_append_default_CA = no" to prevent Postfix from
+appending the system-supplied default CAs and trusting third-party
+certificates. </p>
+
 <p> By default (see smtpd_tls_ask_ccert), client certificates are not
 requested, and smtpd_tls_CAfile should remain empty. If you do make use
 of client certificates, the distinguished names (DNs) of the certificate
@@ -8562,6 +8569,10 @@ for example, "$OPENSSL_HOME/bin/c_rehash /etc/postfix/certs". To use
 smtpd_tls_CApath in chroot mode, this directory (or a copy) must be
 inside the chroot jail. </p>
 
+<p> Specify "tls_append_default_CA = no" to prevent Postfix from
+appending the system-supplied default CAs and trusting third-party
+certificates. </p>
+
 <p> By default (see smtpd_tls_ask_ccert), client certificates are
 not requested, and smtpd_tls_CApath should remain empty. In contrast
 to smtp_tls_CAfile, DNs of certificate authorities installed
@@ -8930,6 +8941,10 @@ file may also be used to augment the client certificate trust chain,
 but it is best to include all the required certificates directly in
 $smtp_tls_cert_file. </p>
 
+<p> Specify "tls_append_default_CA = no" to prevent Postfix from
+appending the system-supplied default CAs and trusting third-party
+certificates. </p>
+
 <p> Example: </p>
 
 <pre>
@@ -8949,6 +8964,10 @@ with, for example, "$OPENSSL_HOME/bin/c_rehash /etc/postfix/certs".
 <p> To use this option in chroot mode, this directory (or a copy) 
 must be inside the chroot jail. </p>
 
+<p> Specify "tls_append_default_CA = no" to prevent Postfix from
+appending the system-supplied default CAs and trusting third-party
+certificates. </p>
+
 <p> Example: </p>
 
 <pre>
@@ -9238,6 +9257,19 @@ smtp_tls_dcert_file = /etc/postfix/client-dsa.pem
 
 <p> This feature is available in Postfix 2.2 and later.  </p>
 
+%PARAM tls_append_default_CA no
+
+<p> Append the system-supplied default certificate authority
+certificates to the ones specified with *_tls_CApath or *_tls_CAfile.
+The default is "no"; this prevents Postfix from trusting third-party
+certificates and giving them relay permission with
+permit_tls_all_clientcerts.  </p>
+
+<p> This feature is available in Postfix 2.4.15, 2.5.11, 2.6.8,
+2.7.2 and later versions. Specify "tls_append_default_CA = yes" for
+backwards compatibility, to avoid breaking certificate verification
+with sites that don't use permit_tls_all_clientcerts. </p>
+
 %PARAM tls_random_exchange_name see "postconf -d" output
 
 <p> Name of the pseudo random number generator (PRNG) state file
index 8afc34ca86bf13ce001c4bd11b316d3aaf91b210..910fba467ebffa0dfb5e1d4560e8451a643ad187 100644 (file)
@@ -615,6 +615,10 @@ extern bool var_stat_home_dir;
 #define DEF_DUP_FILTER_LIMIT   1000
 extern int var_dup_filter_limit;
 
+#define VAR_TLS_APPEND_DEF_CA  "tls_append_default_CA"
+#define DEF_TLS_APPEND_DEF_CA  0       /* Postfix < 2.8 BC break */
+extern bool var_tls_append_def_CA;
+
 #define VAR_TLS_RAND_EXCH_NAME "tls_random_exchange_name"
 #define DEF_TLS_RAND_EXCH_NAME "${data_directory}/prng_exch"
 extern char *var_tls_rand_exch_name;
index a6661fcc66aa9a4ae2af29225872482e572e8f5e..20fcf09e5c06cf3e08d3ae1e59ea9312d87cf6ac 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      "20100608"
-#define MAIL_VERSION_NUMBER    "2.6.7"
+#define MAIL_RELEASE_DATE      "20101123"
+#define MAIL_VERSION_NUMBER    "2.6.8"
 
 #ifdef SNAPSHOT
 # define MAIL_VERSION_DATE     "-" MAIL_RELEASE_DATE
index ce3bad0a91ce613e000d519412fec3d6b0c425e3..6cd4100ede591593f09bd9f6889358850e5df34d 100644 (file)
@@ -628,7 +628,7 @@ int     pipe_command(VSTREAM *src, DSN_BUF *why,...)
         */
        if (!NORMAL_EXIT_STATUS(wait_status)) {
            if (WIFSIGNALED(wait_status)) {
-               dsb_unix(why, "5.3.0", log_len ?
+               dsb_unix(why, "4.3.0", log_len ?
                         log_buf : sys_exits_detail(EX_SOFTWARE)->text,
                         "Command died with signal %d: \"%s\"%s%s",
                         WTERMSIG(wait_status), args.command,
index a4a34a03c15ec39df57faff2aae9d9f6bad48629..49ea6c9bb894227a09f68b34f33093e8212e8851 100644 (file)
@@ -4452,6 +4452,11 @@ static void smtpd_proto(SMTPD_STATE *state)
            }
            /* XXX We use the real client for connect access control. */
            if (state->access_denied && cmdp->action != quit_cmd) {
+               /* XXX Exception for Milter override. */
+               if (strncmp(state->access_denied + 1, "21", 2) == 0) {
+                   smtpd_chat_reply(state, "%s", state->access_denied);
+                   continue;
+               }
                smtpd_chat_reply(state, "503 5.7.0 Error: access denied for %s",
                                 state->namaddr);       /* RFC 2821 Sec 3.1 */
                state->error_count++;
index 9b5e522fcfe6d8706f3428e37173b6993dff4d2c..47cfd48c998db13feac170c74bd4ff63ee5a1708 100644 (file)
@@ -3755,7 +3755,8 @@ static int generic_checks(SMTPD_STATE *state, ARGV *restrictions,
                         name);
            else {
                cpp += 1;
-               if (state->helo_name)
+               if (state->helo_name
+                   && valid_hostname(state->helo_name, DONT_GRIPE))
                    status = reject_rbl_domain(state, *cpp, state->helo_name,
                                               SMTPD_NAME_HELO);
            }
index cfefe7e3dde80307c66b7f02d4b420ca87accad0..5c682439a7d3894b1334925c08c3ff9eecaf3f56 100644 (file)
@@ -304,6 +304,9 @@ int     smtpd_proxy_open(SMTPD_STATE *state, const char *service,
     }
     state->proxy = vstream_fdopen(fd, O_RDWR);
     vstream_control(state->proxy, VSTREAM_CTL_PATH, service, VSTREAM_CTL_END);
+    /* Avoid poor performance when TCP MSS > VSTREAM_BUFSIZE. */
+    if (connect_fn == inet_connect)
+       vstream_tweak_tcp(state->proxy);
     smtp_timeout_setup(state->proxy, timeout);
 
     /*
index 1a8e26da7a3c1442c7c6c44352c537749c4f63fe..918a9732fb0f55a44c8f551a99bfc3d34b029235 100644 (file)
@@ -101,6 +101,7 @@ tls_bio_ops.o: ../../include/vstring.h
 tls_bio_ops.o: tls.h
 tls_bio_ops.o: tls_bio_ops.c
 tls_certkey.o: ../../include/argv.h
+tls_certkey.o: ../../include/mail_params.h
 tls_certkey.o: ../../include/msg.h
 tls_certkey.o: ../../include/name_code.h
 tls_certkey.o: ../../include/name_mask.h
index 913b67e237b0de7d5229385e89f3b7c2c8b73f43..504c186277eb288bde75890921c9ed373f1d9365 100644 (file)
 
 #include <msg.h>
 
+/* Global library. */
+
+#include <mail_params.h>
+
 /* TLS library. */
 
 #define TLS_INTERNAL
@@ -91,7 +95,7 @@ int     tls_set_ca_certificate_info(SSL_CTX *ctx, const char *CAfile,
            tls_print_errors();
            return (-1);
        }
-       if (!SSL_CTX_set_default_verify_paths(ctx)) {
+       if (var_tls_append_def_CA && !SSL_CTX_set_default_verify_paths(ctx)) {
            msg_info("cannot set certificate verification paths: "
                     "disabling TLS support");
            tls_print_errors();
index 8f12fe166d77c109355729461fca32fd68efd35c..1a324b9396c5a7402baf8760bb9df21b8e336685 100644 (file)
@@ -15,6 +15,7 @@
 /*     char    *var_tls_eecdh_strong;
 /*     char    *var_tls_eecdh_ultra;
 /*     int     var_tls_daemon_rand_bytes;
+/*     bool    var_tls_append_def_CA;
 /*
 /*     TLS_APPL_STATE *tls_alloc_app_context(ssl_ctx)
 /*     SSL_CTX *ssl_ctx;
@@ -190,6 +191,7 @@ char   *var_tls_null_clist;
 int     var_tls_daemon_rand_bytes;
 char   *var_tls_eecdh_strong;
 char   *var_tls_eecdh_ultra;
+bool    var_tls_append_def_CA;
 
  /*
   * Index to attach TLScontext pointers to SSL objects, so that they can be
@@ -407,6 +409,10 @@ void    tls_param_init(void)
        VAR_TLS_DAEMON_RAND_BYTES, DEF_TLS_DAEMON_RAND_BYTES, &var_tls_daemon_rand_bytes, 1, 0,
        0,
     };
+    static const CONFIG_BOOL_TABLE bool_table[] = {
+       VAR_TLS_APPEND_DEF_CA, DEF_TLS_APPEND_DEF_CA, &var_tls_append_def_CA,
+       0,
+    };
     static int init_done;
 
     if (init_done)
@@ -415,6 +421,7 @@ void    tls_param_init(void)
 
     get_mail_conf_str_table(str_table);
     get_mail_conf_int_table(int_table);
+    get_mail_conf_bool_table(bool_table);
 }
 
 /* tls_set_ciphers - Set SSL context cipher list */