]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.5.11 v2.5.11
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:57:40 +0000 (14:57 -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 aed5d77aa5efabe3132fabfbf581b02080eeb819..6ded39d8ebafbf711b08d4a98acfc58776a57ac2 100644 (file)
@@ -14571,3 +14571,42 @@ Apologies for any names omitted.
        2821 (and 5321) is vague about the VRFY request format, but
        spends lots of text on the reply format.  File: smtpd/smtpd.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 14fd19aa1704ef93af484ed48faef99645572fdc..5c3aeb85f871026dcc4112076447db6ce0b2bff6 100644 (file)
@@ -11,6 +11,18 @@ instead, a new snapshot is released.
 The mail_release_date configuration parameter (format: yyyymmdd)
 specifies the release date of a stable release or snapshot release.
 
+Incompatibility with Postfix 2.5.11
+===================================
+
+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.
+
 Incompatibility with Postfix 2.5.3
 ==================================
 
index 1796c89d838f0a3b2f7b8a6afca73d06828312f6..b7eb3f8d2ea69a2354e380ec2f4b2e850871ec7b 100644 (file)
@@ -8542,6 +8542,10 @@ during TLS startup and shutdown handshake procedures. </p>
 needed only when the CA certificate is not already present in the
 client 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> Example: </p>
 
 <pre>
@@ -8565,6 +8569,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>
@@ -10041,8 +10049,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>
 
@@ -11671,6 +11682,10 @@ server certificate file.  This file may also contain the CA
 certificates of other trusted CAs.  You must use this file for the
 list of trusted CAs if you want to use chroot-mode. </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>
@@ -11697,6 +11712,10 @@ CA certificates are not offered to the client, so that e.g.  Netscape
 clients might not offer certificates issued by them.  Use of this
 feature is therefore not recommended. </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>
@@ -12632,6 +12651,23 @@ while accessing the Postfix <a href="postconf.5.html">main.cf</a> configuration
 </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 922cdac1e8ba59df15e03734d37de370b6ed9a1b..b227012befd31f61dd15f9793a824e6ed6719b5d 100644 (file)
@@ -4822,6 +4822,10 @@ The file with the certificate of the certification authority
 needed only when the CA certificate is not already present in the
 client 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
 Example:
 .PP
 .nf
@@ -4842,6 +4846,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
@@ -6060,8 +6068,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.
@@ -7120,6 +7131,10 @@ server certificate file.  This file may also contain the CA
 certificates of other trusted CAs.  You must use this file for the
 list of trusted CAs if you want to use chroot-mode.
 .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
@@ -7144,6 +7159,10 @@ CA certificates are not offered to the client, so that e.g.  Netscape
 clients might not offer certificates issued by them.  Use of this
 feature is therefore not recommended.
 .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
@@ -7842,6 +7861,17 @@ a Postfix process has completed initialization. Errors during
 process initialization will be logged with the default name. Examples
 are errors while parsing the command line arguments, and errors
 while accessing the Postfix main.cf configuration file.
+.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 5e76394a6a7752a98bccce9bb09bd360dbb4d473..8c9b0462e485adf1b8fe5a4452c2f64f0aa00c5d 100755 (executable)
@@ -630,6 +630,7 @@ while (<>) {
     s;\btls_low_cipherlist\b;<a href="postconf.5.html#tls_low_cipherlist">$&</a>;g;
     s;\btls_export_cipherlist\b;<a href="postconf.5.html#tls_export_cipherlist">$&</a>;g;
     s;\btls_null_cipherlist\b;<a href="postconf.5.html#tls_null_cipherlist">$&</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 d2ce35d79f18d359a174fe03b4ade560dc7b941e..5d9c20b9b380b9ef02926d38c29f56f9164ace62 100644 (file)
@@ -4739,8 +4739,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>
 
@@ -8390,6 +8393,10 @@ server certificate file.  This file may also contain the CA
 certificates of other trusted CAs.  You must use this file for the
 list of trusted CAs if you want to use chroot-mode. </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>
@@ -8412,6 +8419,10 @@ CA certificates are not offered to the client, so that e.g.  Netscape
 clients might not offer certificates issued by them.  Use of this
 feature is therefore not recommended. </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>
@@ -8761,6 +8772,10 @@ smtp_tls_key_file = $smtp_tls_cert_file
 needed only when the CA certificate is not already present in the
 client 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> Example: </p>
 
 <pre>
@@ -8780,6 +8795,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>
@@ -9067,6 +9086,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 0702df170fff0e63879796ae5cc990df8a41e2f0..c64ed1f995a1d7ee4437878ffa60d05e3090efec 100644 (file)
@@ -607,6 +607,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 aa9bd93f37ee208ac73b2847c377f27acfa5b71e..ca3776258ef077febb055c616c156d36eab47f67 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      "20100322"
-#define MAIL_VERSION_NUMBER    "2.5.10"
+#define MAIL_RELEASE_DATE      "20101123"
+#define MAIL_VERSION_NUMBER    "2.5.11"
 
 #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 29457f13c746bb040f8dcbaecfb6c2d89c0fa5ba..a376e06a5839c4403051d8217e20241d6e460046 100644 (file)
@@ -4221,6 +4221,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 0c7eceac6db1adf572fa767f5b722e678bd6884c..d890054e0f44bcafd627410ba929ad81d5718665 100644 (file)
@@ -3702,7 +3702,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 9ebaae1e427ac52581169f66637a67b1870d29c5..80c3bcb332bd7c5ced7605e2a5c69d848e265362 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 05deba332e6b2af2a71a8267a1915e0c4db50c04..633c431b3ac103fe65e22be2e8724a1a8a58aa8d 100644 (file)
 
 #include <msg.h>
 
+/* Global library. */
+
+#include <mail_params.h>
+
 /* TLS library. */
 
 #define TLS_INTERNAL
@@ -87,7 +91,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");
            tls_print_errors();
            return (-1);
index a1f9060a63b097d0405d4ebec8015ec48e5a4541..aa4c3a23bcc86d511ffab66978e858f297f0ed3f 100644 (file)
@@ -13,6 +13,7 @@
 /*     char    *var_tls_export_clist;
 /*     char    *var_tls_null_clist;
 /*     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;
@@ -186,6 +187,7 @@ char   *var_tls_low_clist;
 char   *var_tls_export_clist;
 char   *var_tls_null_clist;
 int     var_tls_daemon_rand_bytes;
+bool    var_tls_append_def_CA;
 
  /*
   * Index to attach TLScontext pointers to SSL objects, so that they can be
@@ -401,6 +403,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)
@@ -409,6 +415,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 */