From 291b3d61909a0af87d5ee913a43e41f08f25e815 Mon Sep 17 00:00:00 2001 From: Wietse Venema Date: Mon, 20 Oct 2014 00:00:00 -0500 Subject: [PATCH] postfix-2.12-20141020 --- postfix/HISTORY | 11 +++++++++++ postfix/RELEASE_NOTES | 10 ---------- postfix/WISHLIST | 5 ----- postfix/html/master.5.html | 23 ++++++++++++----------- postfix/man/man5/master.5 | 11 ++++++----- postfix/mantools/postlink | 2 -- postfix/proto/master | 11 ++++++----- postfix/src/global/mail_params.h | 6 ------ postfix/src/global/mail_version.h | 2 +- postfix/src/smtpd/smtpd.c | 1 - postfix/src/util/dict_pipe.c | 6 ++++-- postfix/src/util/dict_random.c | 9 ++++++--- postfix/src/util/dict_union.c | 5 +++-- 13 files changed, 49 insertions(+), 53 deletions(-) diff --git a/postfix/HISTORY b/postfix/HISTORY index 8a0e2084a..8741a9f7a 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -20685,3 +20685,14 @@ Apologies for any names omitted. Cleanup: replace dozens and dozens of ad-hoc string constants with CHARS_SPACE, CHARS_COMMA_SP, and CHARS_BRACE. Files: 52, too many files to mention here. + + Bugfix: the recently-introduced randmap, pipemap, and + unionmap did not check for all possible forms of "empty + list". Files: util/dict_random.c, util/dict_pipe.c, + util/dict_union.c. + + Documentation: word smithing. File: proto/master. + + Cleanup: the last remaining remnants of the withdrawn + smtp_tls_fallback_level feature. Files: mantools/postlink, + global/mail_params.h. diff --git a/postfix/RELEASE_NOTES b/postfix/RELEASE_NOTES index 5469a6c32..59aba34e4 100644 --- a/postfix/RELEASE_NOTES +++ b/postfix/RELEASE_NOTES @@ -59,16 +59,6 @@ Maintainers may also benefit from the makedefs documentation (mantools/srctoman - makedefs | nroff -man | less) with information about build options that are not described in the INSTALL instructions. -Incompatible changes with snapshot 20141013 -=========================================== - -Headers prepended with the access/policy PREPEND action are now -added BELOW Postfix's own Received: header. This ensures a) that -Postfix's own Received: header remains hidden from Milters as -required by the Milter protocol, and b) that PREPENDed headers -become visible to Milters, as expected by DMARC implementations -based on SPF policy plus DKIM milter. - Major changes with snapshot 20141011 ==================================== diff --git a/postfix/WISHLIST b/postfix/WISHLIST index 3bc861825..48a65e460 100644 --- a/postfix/WISHLIST +++ b/postfix/WISHLIST @@ -20,11 +20,6 @@ Wish list: Eliminate code duplication between pcf_print_master_field() and pcf_print_master_entry(). - Introduce constants to replace all the ad-hoc ", \t\r\n" - etc. for tokenization. That will have to go into an "util" - file because match_strings(3), dict_pipe(3) and dict_random(3) - depend on these definitions. - Error reporting: see if pcf_check_master_entry() and children can return error descriptions instead of terminating with a fatal error. diff --git a/postfix/html/master.5.html b/postfix/html/master.5.html index 537fa9ad3..6ec2c965f 100644 --- a/postfix/html/master.5.html +++ b/postfix/html/master.5.html @@ -188,29 +188,30 @@ MASTER(5) MASTER(5) etc., just like in main.cf. See postconf(5) for syntax. NOTE 1: With the "long form" shown above, whitespace - after "{" and before "}" is ignored. + after "{", around "=", and before "}" is ignored, and + whitespace within the parameter value is preserved. NOTE 2: with the "short form" shown above, do not specify - whitespace around the "=" or in parameter values. To - specify a parameter value that contains whitespace, use - commas instead of spaces, or specify the value in - main.cf. Example: + whitespace around the "=" or in parameter values. To + specify a parameter value that contains whitespace, use + the long form described above, or use commas instead of + spaces, or specify the value in main.cf. Example: /etc/postfix/master.cf: submission inet .... smtpd - -o smtpd_mumble=$submission_mumble + -o smtpd_xxx_yyy=$submission_xxx_yyy /etc/postfix/main.cf - submission_mumble = text with whitespace... + submission_xxx_yyy = text with whitespace... NOTE 3: Over-zealous use of parameter overrides makes the - Postfix configuration hard to understand and maintain. - At a certain point, it might be easier to configure mul- + Postfix configuration hard to understand and maintain. + At a certain point, it might be easier to configure mul- tiple instances of Postfix, instead of configuring multi- ple personalities via master.cf. - -v Increase the verbose logging level. Specify multiple -v - options to make a Postfix daemon process increasingly + -v Increase the verbose logging level. Specify multiple -v + options to make a Postfix daemon process increasingly verbose. Other command-line arguments diff --git a/postfix/man/man5/master.5 b/postfix/man/man5/master.5 index 3d2f21ea5..7991187a7 100644 --- a/postfix/man/man5/master.5 +++ b/postfix/man/man5/master.5 @@ -190,21 +190,22 @@ etc., just like in main.cf. See \fBpostconf\fR(5) for syntax. .sp NOTE 1: With the "long form" shown above, whitespace -after "{" and before "}" is ignored. +after "{", around "=", and before "}" is ignored, and +whitespace within the parameter value is preserved. .sp NOTE 2: with the "short form" shown above, do not specify whitespace around the "=" or in parameter values. To specify a parameter value that contains -whitespace, use commas instead of spaces, or specify the -value in main.cf. Example: +whitespace, use the long form described above, or use commas +instead of spaces, or specify the value in main.cf. Example: .sp .nf /etc/postfix/master.cf: submission inet .... smtpd - -o smtpd_mumble=$submission_mumble + -o smtpd_xxx_yyy=$submission_xxx_yyy .sp /etc/postfix/main.cf - submission_mumble = text with whitespace... + submission_xxx_yyy = text with whitespace... .fi .sp NOTE 3: Over-zealous use of parameter overrides makes the diff --git a/postfix/mantools/postlink b/postfix/mantools/postlink index e285966a4..97ee2364c 100755 --- a/postfix/mantools/postlink +++ b/postfix/mantools/postlink @@ -633,8 +633,6 @@ while (<>) { s;\bsmtp_starttls_timeout\b;$&;g; s;\bsmtp_tls_CAfile\b;$&;g; s;\bsmtp_tls_CApath\b;$&;g; - s;\bsmtp_tls_fallback_level\b;$&;g; - s;\blmtp_tls_fallback_level\b;$&;g; s;\bsmtp_tls_cert_file\b;$&;g; s;\bsmtp_tls_fingerprint_digest\b;$&;g; s;\bsmtp_tls_protocols\b;$&;g; diff --git a/postfix/proto/master b/postfix/proto/master index c6e145a5b..7428cf48a 100644 --- a/postfix/proto/master +++ b/postfix/proto/master @@ -184,21 +184,22 @@ # syntax. # .sp # NOTE 1: With the "long form" shown above, whitespace -# after "{" and before "}" is ignored. +# after "{", around "=", and before "}" is ignored, and +# whitespace within the parameter value is preserved. # .sp # NOTE 2: with the "short form" shown above, do not specify # whitespace around the "=" or in # parameter values. To specify a parameter value that contains -# whitespace, use commas instead of spaces, or specify the -# value in main.cf. Example: +# whitespace, use the long form described above, or use commas +# instead of spaces, or specify the value in main.cf. Example: # .sp # .nf # /etc/postfix/master.cf: # submission inet .... smtpd -# -o smtpd_mumble=$submission_mumble +# -o smtpd_xxx_yyy=$submission_xxx_yyy # .sp # /etc/postfix/main.cf -# submission_mumble = text with whitespace... +# submission_xxx_yyy = text with whitespace... # .fi # .sp # NOTE 3: Over-zealous use of parameter overrides makes the diff --git a/postfix/src/global/mail_params.h b/postfix/src/global/mail_params.h index 2bdf251a0..383873e9f 100644 --- a/postfix/src/global/mail_params.h +++ b/postfix/src/global/mail_params.h @@ -1402,12 +1402,6 @@ extern bool var_smtp_tls_enforce_peername; #define DEF_LMTP_TLS_LEVEL "" extern char *var_smtp_tls_level; -#define VAR_SMTP_TLS_FBACK_LEVEL "smtp_tls_fallback_level" -#define DEF_SMTP_TLS_FBACK_LEVEL "" -#define VAR_LMTP_TLS_FBACK_LEVEL "lmtp_tls_fallback_level" -#define DEF_LMTP_TLS_FBACK_LEVEL "" -extern char *var_smtp_tls_fback_level; - #define VAR_SMTP_TLS_SCERT_VD "smtp_tls_scert_verifydepth" #define DEF_SMTP_TLS_SCERT_VD 9 #define VAR_LMTP_TLS_SCERT_VD "lmtp_tls_scert_verifydepth" diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index 1cf37dafc..d51041b05 100644 --- a/postfix/src/global/mail_version.h +++ b/postfix/src/global/mail_version.h @@ -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 "20141019" +#define MAIL_RELEASE_DATE "20141020" #define MAIL_VERSION_NUMBER "2.12" #ifdef SNAPSHOT diff --git a/postfix/src/smtpd/smtpd.c b/postfix/src/smtpd/smtpd.c index b2ce8da14..924340b20 100644 --- a/postfix/src/smtpd/smtpd.c +++ b/postfix/src/smtpd/smtpd.c @@ -3210,7 +3210,6 @@ static int data_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *unused_argv) "\t(envelope-from %s)", STR(state->buffer)); #endif } - smtpd_chat_reply(state, "354 End data with ."); state->where = SMTPD_AFTER_DATA; diff --git a/postfix/src/util/dict_pipe.c b/postfix/src/util/dict_pipe.c index e15ff5e01..8ce0faad7 100644 --- a/postfix/src/util/dict_pipe.c +++ b/postfix/src/util/dict_pipe.c @@ -135,11 +135,14 @@ DICT *dict_pipe_open(const char *name, int open_flags, int dict_flags) open_flags, dict_flags, "%s:%s map requires O_RDONLY access mode", DICT_TYPE_PIPE, name)); + /* * Split the table name into its constituent parts. */ if ((len = balpar(name, CHARS_BRACE)) == 0 || name[len] != 0 - || *(saved_name = mystrndup(name + 1, len - 2)) == 0) + || *(saved_name = mystrndup(name + 1, len - 2)) == 0 + || ((argv = argv_splitq(saved_name, CHARS_COMMA_SP, CHARS_BRACE)), + (argv->argc == 0))) DICT_PIPE_RETURN(dict_surrogate(DICT_TYPE_PIPE, name, open_flags, dict_flags, "bad syntax: \"%s:%s\"; " @@ -152,7 +155,6 @@ DICT *dict_pipe_open(const char *name, int open_flags, int dict_flags) * level. The first table determines the pattern-matching flags. */ DICT_OWNER_AGGREGATE_INIT(aggr_owner); - argv = argv_splitq(saved_name, CHARS_COMMA_SP, CHARS_BRACE); for (cpp = argv->argv; (dict_type_name = *cpp) != 0; cpp++) { if (msg_verbose) msg_info("%s: %s", myname, dict_type_name); diff --git a/postfix/src/util/dict_random.c b/postfix/src/util/dict_random.c index 4497fe1c3..0cd389b22 100644 --- a/postfix/src/util/dict_random.c +++ b/postfix/src/util/dict_random.c @@ -81,6 +81,7 @@ DICT *dict_random_open(const char *name, int open_flags, int dict_flags) { DICT_RANDOM *dict_random; char *saved_name = 0; + ARGV *argv; size_t len; /* @@ -105,11 +106,13 @@ DICT *dict_random_open(const char *name, int open_flags, int dict_flags) * Split the name name into its constituent parts. */ if ((len = balpar(name, CHARS_BRACE)) == 0 || name[len] != 0 - || *(saved_name = mystrndup(name + 1, len - 2)) == 0) + || *(saved_name = mystrndup(name + 1, len - 2)) == 0 + || ((argv = argv_splitq(saved_name, CHARS_COMMA_SP, CHARS_BRACE)), + (argv->argc == 0))) DICT_RANDOM_RETURN(dict_surrogate(DICT_TYPE_RANDOM, name, open_flags, dict_flags, "bad syntax: \"%s:%s\"; " - "need \"%s:{type:name...}\"", + "need \"%s:{value...}\"", DICT_TYPE_RANDOM, name, DICT_TYPE_RANDOM)); @@ -121,7 +124,7 @@ DICT *dict_random_open(const char *name, int open_flags, int dict_flags) dict_random->dict.lookup = dict_random_lookup; dict_random->dict.close = dict_random_close; dict_random->dict.flags = dict_flags | DICT_FLAG_PATTERN; - dict_random->replies = argv_splitq(saved_name, CHARS_COMMA_SP, CHARS_BRACE); + dict_random->replies = argv; dict_random->dict.owner.status = DICT_OWNER_TRUSTED; dict_random->dict.owner.uid = 0; diff --git a/postfix/src/util/dict_union.c b/postfix/src/util/dict_union.c index b2a5feec8..a19e04809 100644 --- a/postfix/src/util/dict_union.c +++ b/postfix/src/util/dict_union.c @@ -146,7 +146,9 @@ DICT *dict_union_open(const char *name, int open_flags, int dict_flags) * Split the table name into its constituent parts. */ if ((len = balpar(name, CHARS_BRACE)) == 0 || name[len] != 0 - || *(saved_name = mystrndup(name + 1, len - 2)) == 0) + || *(saved_name = mystrndup(name + 1, len - 2)) == 0 + || ((argv = argv_splitq(saved_name, CHARS_COMMA_SP, CHARS_BRACE)), + (argv->argc == 0))) DICT_UNION_RETURN(dict_surrogate(DICT_TYPE_UNION, name, open_flags, dict_flags, "bad syntax: \"%s:%s\"; " @@ -159,7 +161,6 @@ DICT *dict_union_open(const char *name, int open_flags, int dict_flags) * level. The first table determines the pattern-matching flags. */ DICT_OWNER_AGGREGATE_INIT(aggr_owner); - argv = argv_splitq(saved_name, CHARS_COMMA_SP, CHARS_BRACE); for (cpp = argv->argv; (dict_type_name = *cpp) != 0; cpp++) { if (msg_verbose) msg_info("%s: %s", myname, dict_type_name);