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
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.
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.
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
==========================================================
* 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 = "\"\"";
* 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 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.in >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
get true3
get c
get d
+get 1234
+get 123
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)
true3=3
c=
d: not found
+1234=(1)(2)(3)(4)
+123=(1)(2)(3)
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)
--- /dev/null
+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
--- /dev/null
+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)
--- /dev/null
+./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)