From: Wietse Venema Date: Mon, 16 Sep 2002 05:00:00 +0000 (-0500) Subject: postfix-1.1.11-20020916 X-Git-Tag: v2.0.0~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=549abc01a85780ef121b6e2aa3da107b7ca45213;p=thirdparty%2Fpostfix.git postfix-1.1.11-20020916 --- diff --git a/postfix/HISTORY b/postfix/HISTORY index 488154856..d69f0f425 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -6929,8 +6929,9 @@ Apologies for any names omitted. 20020906 Cleanup: dict_regexp module speedups by avoiding unnecessary - work while matching strings. This involved major rewriting - of the regexp map code. File: util/dict_regexp.c. + substring overhead while matching strings. Based on a + suggestion by Liviu Daia. This involved major rewriting of + the regexp map code. File: util/dict_regexp.c. 20020907 @@ -6941,8 +6942,8 @@ Apologies for any names omitted. 200209010 - Bugfix: the SMTP client produced unnecessary warnings about - trouble with the fallback_relay hosts. File: smtp/smtp_connect.c. + Bugfix: the SMTP client produced suprious warnings about + trouble with fallback_relay hosts. File: smtp/smtp_connect.c. Robustness: don't wait with detecting broken SMTP connections until reading input. Leandro Santi. File: smtpd/smtpd_chat.c. @@ -6954,6 +6955,10 @@ Apologies for any names omitted. 20020912 + Bugfix: canonical/virtual mapping core dump with a null + right-hand side address. Report by Jussi Silvennoinen. + File: global/mail-addr_crunch.c. + Feature: IF..ENDIF support based on code by Bert Driehuis. This involved a rewrite of the pcre map code similar to the regexp map code. File: util/dict_pcre.c. diff --git a/postfix/RELEASE_NOTES b/postfix/RELEASE_NOTES index 1168c9d78..d8fdc327e 100644 --- a/postfix/RELEASE_NOTES +++ b/postfix/RELEASE_NOTES @@ -12,12 +12,31 @@ snapshot release). Patches change the patchlevel and the release date. Snapshots change only the release date, unless they include the same bugfixes as a patch release. -Incompatible changes with Postfix snapshot 1.1.11-20020910 +Incompatible changes with Postfix snapshot 1.1.11-20020916 ========================================================== The relayhost setting now behaves as documented, i.e. you can no longer specify multiple destinations. +Major changes with Postfix snapshot 1.1.11-20020916 +=================================================== + +Speedups of regexp table lookups by optimizing the compilation and +execution settings for the actual number of $number substitutions +in the right-hand side. Based on a suggestion by Liviu Daia. + +Speedups of regexp and pcre tables, using IF..ENDIF support based +on an idea by Bert Driehuis. To protect a block of patterns, use: + + if /pattern/ + /pattern2/ replacement text1 + /pattern2/ replacement text2 + endif + +IF..ENDIF can nest. Don't specify blanks at the beginning of lines +inside IF..ENDIF. Lines beginning with whitespace are appended to +the previous line. + Incompatible changes with Postfix snapshot 1.1.11-20020906 ========================================================== diff --git a/postfix/src/global/mail_addr_crunch.c b/postfix/src/global/mail_addr_crunch.c index 98b4e213b..cd1bda9b1 100644 --- a/postfix/src/global/mail_addr_crunch.c +++ b/postfix/src/global/mail_addr_crunch.c @@ -77,6 +77,9 @@ ARGV *mail_addr_crunch(const char *string, const char *extension) * Parse the string, rewrite each address to canonical form, and convert * the result to external (quoted) form. Optionally apply the extension * to each address found. + * + * XXX Workaround for the null address. This works for envelopes but + * produces ugly results for message headers. */ if (*string == 0 || strcmp(string, "<>") == 0) string = "\"\""; diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index aa81f49f3..bcea63e29 100644 --- a/postfix/src/global/mail_version.h +++ b/postfix/src/global/mail_version.h @@ -20,7 +20,7 @@ * Patches change the patchlevel and the release date. Snapshots change the * release date only, unless they include the same bugfix as a patch release. */ -#define MAIL_RELEASE_DATE "20020914" +#define MAIL_RELEASE_DATE "20020916" #define VAR_MAIL_VERSION "mail_version" #define DEF_MAIL_VERSION "1.1.11-" MAIL_RELEASE_DATE diff --git a/postfix/src/util/Makefile.in b/postfix/src/util/Makefile.in index ea42cb0f0..6f5be131e 100644 --- a/postfix/src/util/Makefile.in +++ b/postfix/src/util/Makefile.in @@ -393,6 +393,11 @@ dict_pcre_test: dict_open dict_pcre.in dict_pcre.map dict_pcre.ref diff dict_pcre.ref dict_pcre.tmp rm -f dict_pcre.tmp +dict_regexp_test: dict_open dict_regexp.in dict_regexp.map dict_regexp.ref + ./dict_open regexp:dict_regexp.map read dict_regexp.tmp 2>&1 + diff dict_regexp.ref dict_regexp.tmp + rm -f dict_regexp.tmp + # do not edit below this line - it is generated by 'make depend' alldig.o: alldig.c alldig.o: sys_defs.h diff --git a/postfix/src/util/dict_pcre.in b/postfix/src/util/dict_pcre.in index 452600172..1dcba54a1 100644 --- a/postfix/src/util/dict_pcre.in +++ b/postfix/src/util/dict_pcre.in @@ -6,3 +6,5 @@ get 3 get true3 get c get d +get 1234 +get 123 diff --git a/postfix/src/util/dict_pcre.map b/postfix/src/util/dict_pcre.map index 2d9eb69da..690899c3f 100644 --- a/postfix/src/util/dict_pcre.map +++ b/postfix/src/util/dict_pcre.map @@ -7,3 +7,6 @@ endif fodder endif /a/!/b/ a!b /c/ +/(1)(2)(3)(5)/ ($1)($2)($3)($4)($5) +/(1)(2)(3)(4)/ ($1)($2)($3)($4) +/(1)(2)(3)/ ($1)($2)($3) diff --git a/postfix/src/util/dict_pcre.ref b/postfix/src/util/dict_pcre.ref index 156de4885..daae8bcec 100644 --- a/postfix/src/util/dict_pcre.ref +++ b/postfix/src/util/dict_pcre.ref @@ -10,3 +10,5 @@ truefalse2=2 true3=3 c= d: not found +1234=(1)(2)(3)(4) +123=(1)(2)(3) diff --git a/postfix/src/util/dict_regexp.c b/postfix/src/util/dict_regexp.c index eba897a95..f741ea3a4 100644 --- a/postfix/src/util/dict_regexp.c +++ b/postfix/src/util/dict_regexp.c @@ -444,7 +444,7 @@ static int dict_regexp_get_pats(const char *mapname, int lineno, char **p, if (**p == '!') { #if 0 msg_warn("regexp file %s, line %d: /pattern1/!/pattern2/ goes away, " - "use \"if /!pattern2/ ... /pattern1/ ... endif\" instead", + "use \"if !/pattern2/ ... /pattern1/ ... endif\" instead", mapname, lineno); #endif if (dict_regexp_get_pat(mapname, lineno, p, second_pat) == 0) diff --git a/postfix/src/util/dict_regexp.in b/postfix/src/util/dict_regexp.in new file mode 100644 index 000000000..4e4b473b1 --- /dev/null +++ b/postfix/src/util/dict_regexp.in @@ -0,0 +1,13 @@ +get true +get true1 +get true2 +get truefalse2 +get 3 +get true3 +get c +get d +get ab +get aa +get 1235 +get 1234 +get 123 diff --git a/postfix/src/util/dict_regexp.map b/postfix/src/util/dict_regexp.map new file mode 100644 index 000000000..690899c3f --- /dev/null +++ b/postfix/src/util/dict_regexp.map @@ -0,0 +1,12 @@ +if /true/ fodder +/1/ 1 +if /false/ +/2/ 2 +endif fodder +/3/ 3 +endif +/a/!/b/ a!b +/c/ +/(1)(2)(3)(5)/ ($1)($2)($3)($4)($5) +/(1)(2)(3)(4)/ ($1)($2)($3)($4) +/(1)(2)(3)/ ($1)($2)($3) diff --git a/postfix/src/util/dict_regexp.ref b/postfix/src/util/dict_regexp.ref new file mode 100644 index 000000000..2ca40eb93 --- /dev/null +++ b/postfix/src/util/dict_regexp.ref @@ -0,0 +1,17 @@ +./dict_open: warning: regexp map dict_regexp.map, line 1: ignoring extra text after IF +./dict_open: warning: regexp map dict_regexp.map, line 5: ignoring extra text after ENDIF +./dict_open: warning: regexp map dict_regexp.map, line 9: using empty replacement string +./dict_open: warning: regexp map dict_regexp.map, line 10: out of range replacement index "5": skipping this rule +true: not found +true1=1 +true2: not found +truefalse2=2 +3: not found +true3=3 +c= +d: not found +ab: not found +aa=a!b +1235=(1)(2)(3) +1234=(1)(2)(3)(4) +123=(1)(2)(3)