From: Wietse Venema
Specify "tls_append_default_CA = no" to prevent Postfix from +appending the system-supplied default CAs and trusting third-party +certificates.
+Example:
@@ -8912,6 +8916,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.
+Specify "tls_append_default_CA = no" to prevent Postfix from +appending the system-supplied default CAs and trusting third-party +certificates.
+Example:
@@ -10523,8 +10531,11 @@ authenticated via the RFC 4954
Specify "tls_append_default_CA = no" to prevent Postfix from +appending the system-supplied default CAs and trusting third-party +certificates.
+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 @@ -12224,6 +12239,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.
+Specify "tls_append_default_CA = no" to prevent Postfix from +appending the system-supplied default CAs and trusting third-party +certificates.
+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 @@ -13341,6 +13360,23 @@ connections. Next, you enable Postfix TCP servers with the updated
This feature is available in Postfix 2.6 and later.
+ + +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.
+ +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.
+ +Specify "tls_append_default_CA = no" to prevent Postfix from +appending the system-supplied default CAs and trusting third-party +certificates.
+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.
+Specify "tls_append_default_CA = no" to prevent Postfix from +appending the system-supplied default CAs and trusting third-party +certificates.
+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.
+Specify "tls_append_default_CA = no" to prevent Postfix from +appending the system-supplied default CAs and trusting third-party +certificates.
+Example:
@@ -8949,6 +8964,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.
+Specify "tls_append_default_CA = no" to prevent Postfix from +appending the system-supplied default CAs and trusting third-party +certificates.
+Example:
@@ -9238,6 +9257,19 @@ smtp_tls_dcert_file = /etc/postfix/client-dsa.pemThis feature is available in Postfix 2.2 and later.
+%PARAM tls_append_default_CA 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.
+ +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.
+ %PARAM tls_random_exchange_name see "postconf -d" outputName of the pseudo random number generator (PRNG) state file diff --git a/postfix/src/global/mail_params.h b/postfix/src/global/mail_params.h index 8afc34ca8..910fba467 100644 --- a/postfix/src/global/mail_params.h +++ b/postfix/src/global/mail_params.h @@ -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; diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index a6661fcc6..20fcf09e5 100644 --- a/postfix/src/global/mail_version.h +++ b/postfix/src/global/mail_version.h @@ -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 diff --git a/postfix/src/global/pipe_command.c b/postfix/src/global/pipe_command.c index ce3bad0a9..6cd4100ed 100644 --- a/postfix/src/global/pipe_command.c +++ b/postfix/src/global/pipe_command.c @@ -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, diff --git a/postfix/src/smtpd/smtpd.c b/postfix/src/smtpd/smtpd.c index a4a34a03c..49ea6c9bb 100644 --- a/postfix/src/smtpd/smtpd.c +++ b/postfix/src/smtpd/smtpd.c @@ -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++; diff --git a/postfix/src/smtpd/smtpd_check.c b/postfix/src/smtpd/smtpd_check.c index 9b5e522fc..47cfd48c9 100644 --- a/postfix/src/smtpd/smtpd_check.c +++ b/postfix/src/smtpd/smtpd_check.c @@ -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); } diff --git a/postfix/src/smtpd/smtpd_proxy.c b/postfix/src/smtpd/smtpd_proxy.c index cfefe7e3d..5c682439a 100644 --- a/postfix/src/smtpd/smtpd_proxy.c +++ b/postfix/src/smtpd/smtpd_proxy.c @@ -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); /* diff --git a/postfix/src/tls/Makefile.in b/postfix/src/tls/Makefile.in index 1a8e26da7..918a9732f 100644 --- a/postfix/src/tls/Makefile.in +++ b/postfix/src/tls/Makefile.in @@ -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 diff --git a/postfix/src/tls/tls_certkey.c b/postfix/src/tls/tls_certkey.c index 913b67e23..504c18627 100644 --- a/postfix/src/tls/tls_certkey.c +++ b/postfix/src/tls/tls_certkey.c @@ -70,6 +70,10 @@ #include
+/* Global library. */ + +#include + /* 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(); diff --git a/postfix/src/tls/tls_misc.c b/postfix/src/tls/tls_misc.c index 8f12fe166..1a324b939 100644 --- a/postfix/src/tls/tls_misc.c +++ b/postfix/src/tls/tls_misc.c @@ -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 */