]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-1.1.11-20020916
authorWietse Venema <wietse@porcupine.org>
Mon, 16 Sep 2002 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 06:28:14 +0000 (06:28 +0000)
12 files changed:
postfix/HISTORY
postfix/RELEASE_NOTES
postfix/src/global/mail_addr_crunch.c
postfix/src/global/mail_version.h
postfix/src/util/Makefile.in
postfix/src/util/dict_pcre.in
postfix/src/util/dict_pcre.map
postfix/src/util/dict_pcre.ref
postfix/src/util/dict_regexp.c
postfix/src/util/dict_regexp.in [new file with mode: 0644]
postfix/src/util/dict_regexp.map [new file with mode: 0644]
postfix/src/util/dict_regexp.ref [new file with mode: 0644]

index 488154856be8a13b2ebeae114d613e66e58c3e0f..d69f0f425fbf4c7abfa381d65cabaabfbc2d1325 100644 (file)
@@ -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.
index 1168c9d7801ec93d0a1fa36be2edb933e6a7eb0f..d8fdc327e3081fe7b88c08c14f36f6f9cdd481e0 100644 (file)
@@ -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
 ==========================================================
 
index 98b4e213b895bed4fb4af6eb56d562242686a22c..cd1bda9b110c3b120d4920d6b23e25b1c1fe66fd 100644 (file)
@@ -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 = "\"\"";
index aa81f49f3465e24990a91a6ad5feffb3410dbfbb..bcea63e29ff8fab8109a4bb6749414be9e7a6ee6 100644 (file)
@@ -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
index ea42cb0f08426e62a4944e2c882d9b762daa64f5..6f5be131e8127d0cc42946ebfbbe3c75337c42b3 100644 (file)
@@ -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.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
index 452600172f2ae53142b1a98c22bcc895cd9ad261..1dcba54a1b527191c4bca7876d4c937f33e45882 100644 (file)
@@ -6,3 +6,5 @@ get 3
 get true3
 get c
 get d
+get 1234
+get 123
index 2d9eb69da2d2674aede3adab4d74631bab66bcf5..690899c3fec5d21363867afe46eb17f5e65115a7 100644 (file)
@@ -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)
index 156de4885a61e95e91ab35f8146c50a7027aae6a..daae8bcec5cc6213fe624dbd8787646af683fbbc 100644 (file)
@@ -10,3 +10,5 @@ truefalse2=2
 true3=3
 c=
 d: not found
+1234=(1)(2)(3)(4)
+123=(1)(2)(3)
index eba897a95bb5c196b83c0927997fe43c32a07d7f..f741ea3a4d170e93ac1b34e2dbace08cf302ad31 100644 (file)
@@ -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 (file)
index 0000000..4e4b473
--- /dev/null
@@ -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 (file)
index 0000000..690899c
--- /dev/null
@@ -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 (file)
index 0000000..2ca40eb
--- /dev/null
@@ -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)