Fix matching of long addresses. Bug 2677
authorJeremy Harris <jgh146exb@wizmail.org>
Wed, 16 Dec 2020 20:05:07 +0000 (20:05 +0000)
committerJeremy Harris <jgh146exb@wizmail.org>
Wed, 16 Dec 2020 20:06:46 +0000 (20:06 +0000)
    (cherry picked from commit 183389fae10672e8d5ffb1f14f23a179798f483a)

doc/doc-txt/ChangeLog
src/src/match.c
test/confs/0471
test/log/0471
test/scripts/0000-Basic/0471
test/stderr/0471

index 4759e018e95bf6888c259a686f535d785b68e9e3..6eb2b508c66c4178e4ae03cc93e136b4fd01d93e 100644 (file)
@@ -111,6 +111,12 @@ JH/27 Bug 2648: fix the passing of an authenticator public-name through spool
       files.  The value is used by the authresults expansion item.  Previously
       if this was used in a router or transport, a crash could result.
 
       files.  The value is used by the authresults expansion item.  Previously
       if this was used in a router or transport, a crash could result.
 
+JH/30 Bug 2677: fix matching of long addresses. Since 4.93 a limit of 256 was
+      applied. This resulted, if any header-line rewrite rules were configured,
+      in a panic-log trigerrable by sending a message with a long address in
+      a header.        Fix by increaing the arbitrary limit to larger than a single
+      (dewrapped) 5322 header line maximum size.
+
 
 Exim version 4.94
 -----------------
 
 Exim version 4.94
 -----------------
index 65d44198e6a25b82f81e31a5ee09b9b3c130eaa2..53cd22353e360e19b3ec381a3358e7a848cce38d 100644 (file)
@@ -1288,9 +1288,11 @@ compared. Therefore, Exim now forces the entire address into lower case here,
 provided that "caseless" is set. (It is FALSE for calls for matching rewriting
 patterns.) Otherwise just the domain is lower cases. A magic item "+caseful" in
 the list can be used to restore a caseful copy of the local part from the
 provided that "caseless" is set. (It is FALSE for calls for matching rewriting
 patterns.) Otherwise just the domain is lower cases. A magic item "+caseful" in
 the list can be used to restore a caseful copy of the local part from the
-original address. */
+original address.
+Limit the subject address size to avoid mem-exhastion attacks.  The size chosen
+is historical (we used to use big_buffer her). */
 
 
-if ((len = Ustrlen(address)) > 255) len = 255;
+if ((len = Ustrlen(address)) > BIG_BUFFER_SIZE) len = BIG_BUFFER_SIZE;
 ab.address = string_copyn(address, len);
 
 for (uschar * p = ab.address + len - 1; p >= ab.address; p--)
 ab.address = string_copyn(address, len);
 
 for (uschar * p = ab.address + len - 1; p >= ab.address; p--)
index f7e0a9f0bec58cb3cc0556ae50753f3ff11de121..12bd3b52729a91508bba7b90fe328686c9bcef52 100644 (file)
@@ -3,6 +3,7 @@
 .include DIR/aux-var/std_conf_prefix
 
 primary_hostname = myhost.test.ex
 .include DIR/aux-var/std_conf_prefix
 
 primary_hostname = myhost.test.ex
+log_selector = +received_recipients
 
 # ----- Main settings -----
 
 
 # ----- Main settings -----
 
@@ -12,6 +13,7 @@ primary_hostname = myhost.test.ex
 
 begin rewrite
 
 
 begin rewrite
 
+^.{40,}@*          deny_me@test.example                FTbcfrt
 *@* $1@${lookup{${lc:$2}}partial-lsearch{DIR/aux-fixed/TESTNUM.rw}{$value}fail} FTbcfrt
 
 # End
 *@* $1@${lookup{${lc:$2}}partial-lsearch{DIR/aux-fixed/TESTNUM.rw}{$value}fail} FTbcfrt
 
 # End
index f59faf8b98ac7b201a330f8681e6776574461930..fc09b469215fba044c6c1b79a55caeadc185c1dd 100644 (file)
@@ -1 +1,3 @@
-1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local S=sss
+1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local S=sss for r1@test.ex
+1999-03-02 09:44:33 10HmaY-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local S=sss for r2@test.ex
+1999-03-02 09:44:33 10HmaZ-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local S=sss for r3@test.ex
index b00658c30cd9f0c451ef420c013598d4a01fdcde..e01ca28d22736f714072030cae8ed57b023217dc 100644 (file)
@@ -163,4 +163,10 @@ To: random@test.example,
     random@test.example,
     random@test.example
 ****
     random@test.example,
     random@test.example
 ****
+exim -d -odq r2@test.ex
+To: localpart_with_056_chars_56789012345678901234567890123456@test.example
+****
+exim -d -odq r3@test.ex
+To: localpart_with_256_chars_5678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456@test.example
+****
 no_msglog_check
 no_msglog_check
index f4619a3e97898a45aad0a3db4071fc3e424c4193..8fd0a8660b887fc6f21b336832ab72261389d7bf 100644 (file)
@@ -98,6 +98,8 @@ To: random@test.example,
  
 **** debug string too long - truncated ****
 
  
 **** debug string too long - truncated ****
 
+address match test: subject=r1@test.ex pattern=^.{40,}@*
+r1@test.ex in "^.{40,}@*"? no (end of list)
 address match test: subject=r1@test.ex pattern=*@*
 test.ex in "*"? yes (matched "*")
 r1@test.ex in "*@*"? yes (matched "*@*")
 address match test: subject=r1@test.ex pattern=*@*
 test.ex in "*"? yes (matched "*")
 r1@test.ex in "*@*"? yes (matched "*@*")
@@ -118,6 +120,8 @@ r1@test.ex in "*@*"? yes (matched "*@*")
  file lookup required for *.test.ex
    in TESTSUITE/aux-fixed/0471.rw
  lookup failed
  file lookup required for *.test.ex
    in TESTSUITE/aux-fixed/0471.rw
  lookup failed
+address match test: subject=CALLER@myhost.test.ex pattern=^.{40,}@*
+CALLER@myhost.test.ex in "^.{40,}@*"? no (end of list)
 address match test: subject=CALLER@myhost.test.ex pattern=*@*
 myhost.test.ex in "*"? yes (matched "*")
 CALLER@myhost.test.ex in "*@*"? yes (matched "*@*")
 address match test: subject=CALLER@myhost.test.ex pattern=*@*
 myhost.test.ex in "*"? yes (matched "*")
 CALLER@myhost.test.ex in "*@*"? yes (matched "*@*")
@@ -227,6 +231,8 @@ rewrite_one_header: type=T:
     random@test.example,
     random@test.examp
 **** debug string too long - truncated ****
     random@test.example,
     random@test.examp
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -243,7 +249,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4051 newtype=T newtext:
 To: random@rwtest.example,
     random@test.example,
 newlen=4051 newtype=T newtext:
 To: random@rwtest.example,
     random@test.example,
@@ -406,6 +412,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -422,7 +430,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4053 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4053 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -585,6 +593,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -601,7 +611,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4055 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4055 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -764,6 +774,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -780,7 +792,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4057 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4057 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -943,6 +955,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -959,7 +973,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4059 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4059 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -1122,6 +1136,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -1138,7 +1154,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4061 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4061 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -1301,6 +1317,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -1317,7 +1335,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4063 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4063 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -1480,6 +1498,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -1496,7 +1516,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4065 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4065 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -1659,6 +1679,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -1675,7 +1697,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4067 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4067 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -1838,6 +1860,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -1854,7 +1878,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4069 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4069 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -2016,6 +2040,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -2032,7 +2058,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4071 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4071 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -2194,6 +2220,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -2210,7 +2238,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4073 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4073 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -2372,6 +2400,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -2388,7 +2418,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4075 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4075 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -2550,6 +2580,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -2566,7 +2598,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4077 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4077 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -2728,6 +2760,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -2744,7 +2778,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4079 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4079 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -2906,6 +2940,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -2922,7 +2958,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4081 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4081 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -3084,6 +3120,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -3100,7 +3138,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4083 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4083 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -3262,6 +3300,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -3278,7 +3318,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4085 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4085 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -3440,6 +3480,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -3456,7 +3498,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4087 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4087 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -3618,6 +3660,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -3634,7 +3678,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4089 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4089 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -3796,6 +3840,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -3812,7 +3858,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4091 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4091 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -3974,6 +4020,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -3990,7 +4038,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4093 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4093 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -4152,6 +4200,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -4168,7 +4218,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4095 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4095 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -4329,6 +4379,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -4345,7 +4397,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4097 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4097 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -4506,6 +4558,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -4522,7 +4576,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4099 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4099 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -4683,6 +4737,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -4699,7 +4755,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4101 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4101 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -4860,6 +4916,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -4876,7 +4934,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4103 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4103 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -5037,6 +5095,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -5053,7 +5113,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4105 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4105 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -5214,6 +5274,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -5230,7 +5292,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4107 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4107 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -5391,6 +5453,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -5407,7 +5471,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4109 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4109 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -5568,6 +5632,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -5584,7 +5650,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4111 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4111 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -5745,6 +5811,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -5761,7 +5829,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4113 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4113 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -5922,6 +5990,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -5938,7 +6008,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4115 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4115 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -6099,6 +6169,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -6115,7 +6187,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4117 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4117 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -6276,6 +6348,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -6292,7 +6366,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4119 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4119 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -6452,6 +6526,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -6468,7 +6544,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4121 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4121 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -6628,6 +6704,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -6644,7 +6722,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4123 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4123 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -6804,6 +6882,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -6820,7 +6900,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4125 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4125 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -6980,6 +7060,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -6996,7 +7078,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4127 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4127 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -7156,6 +7238,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -7172,7 +7256,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4129 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4129 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -7332,6 +7416,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -7348,7 +7434,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4131 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4131 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -7508,6 +7594,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -7524,7 +7612,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4133 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4133 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -7684,6 +7772,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -7700,7 +7790,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4135 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4135 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -7860,6 +7950,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -7876,7 +7968,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4137 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4137 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -8036,6 +8128,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -8052,7 +8146,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4139 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4139 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -8212,6 +8306,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -8228,7 +8324,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4141 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4141 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -8388,6 +8484,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -8404,7 +8502,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4143 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4143 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -8564,6 +8662,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -8580,7 +8680,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4145 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4145 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -8739,6 +8839,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -8755,7 +8857,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4147 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4147 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -8914,6 +9016,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -8930,7 +9034,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4149 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4149 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -9089,6 +9193,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -9105,7 +9211,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4151 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4151 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -9264,6 +9370,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -9280,7 +9388,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4153 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4153 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -9439,6 +9547,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -9455,7 +9565,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4155 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4155 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -9614,6 +9724,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -9630,7 +9742,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4157 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4157 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -9789,6 +9901,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -9805,7 +9919,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4159 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4159 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -9964,6 +10078,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -9980,7 +10096,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4161 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4161 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -10139,6 +10255,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -10155,7 +10273,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4163 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4163 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -10314,6 +10432,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -10330,7 +10450,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4165 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4165 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -10489,6 +10609,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -10505,7 +10627,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4167 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4167 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -10664,6 +10786,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -10680,7 +10804,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4169 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4169 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -10838,6 +10962,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -10854,7 +10980,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4171 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4171 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -11012,6 +11138,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -11028,7 +11156,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4173 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4173 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -11186,6 +11314,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -11202,7 +11332,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4175 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4175 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -11360,6 +11490,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -11376,7 +11508,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4177 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4177 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -11534,6 +11666,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -11550,7 +11684,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4179 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4179 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -11708,6 +11842,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -11724,7 +11860,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4181 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4181 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -11882,6 +12018,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -11898,7 +12036,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4183 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4183 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -12056,6 +12194,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -12072,7 +12212,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4185 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4185 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -12230,6 +12370,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -12246,7 +12388,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4187 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4187 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -12404,6 +12546,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -12420,7 +12564,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4189 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4189 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -12578,6 +12722,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -12594,7 +12740,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4191 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4191 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -12752,6 +12898,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -12768,7 +12916,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4193 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4193 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -12926,6 +13074,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -12942,7 +13092,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4195 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4195 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -13099,6 +13249,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -13115,7 +13267,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4197 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4197 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -13272,6 +13424,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -13288,7 +13442,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4199 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4199 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -13445,6 +13599,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -13461,7 +13617,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4201 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4201 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -13618,6 +13774,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -13634,7 +13792,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4203 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4203 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -13791,6 +13949,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -13807,7 +13967,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4205 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4205 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -13964,6 +14124,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -13980,7 +14142,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4207 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4207 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -14137,6 +14299,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -14153,7 +14317,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4209 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4209 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -14310,6 +14474,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
     random@test.example,
     random@test.exa
 **** debug string too long - truncated ****
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -14326,7 +14492,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4211 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4211 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -14483,6 +14649,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -14499,7 +14667,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4213 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4213 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -14655,6 +14823,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -14671,7 +14841,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4215 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4215 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -14826,6 +14996,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -14842,7 +15014,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4217 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4217 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -14996,6 +15168,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -15012,7 +15186,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4219 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4219 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -15165,6 +15339,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -15181,7 +15357,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4221 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4221 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -15333,6 +15509,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -15349,7 +15527,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4223 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4223 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -15500,6 +15678,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -15516,7 +15696,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4225 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4225 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -15666,6 +15846,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -15682,7 +15864,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4227 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4227 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -15831,6 +16013,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -15847,7 +16031,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4229 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4229 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -15995,6 +16179,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -16011,7 +16197,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4231 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4231 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -16158,6 +16344,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -16174,7 +16362,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4233 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4233 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -16320,6 +16508,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -16336,7 +16526,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4235 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4235 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -16481,6 +16671,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -16497,7 +16689,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4237 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4237 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -16641,6 +16833,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -16657,7 +16851,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4239 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4239 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -16800,6 +16994,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -16816,7 +17012,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4241 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4241 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -16958,6 +17154,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -16974,7 +17172,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4243 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4243 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -17115,6 +17313,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -17131,7 +17331,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4245 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4245 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -17271,6 +17471,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -17287,7 +17489,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4247 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4247 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -17426,6 +17628,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -17442,7 +17646,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4249 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4249 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -17580,6 +17784,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -17596,7 +17802,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4251 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4251 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -17733,6 +17939,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -17749,7 +17957,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4253 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4253 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -17885,6 +18093,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -17901,7 +18111,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4255 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4255 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -18036,6 +18246,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -18052,7 +18264,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4257 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4257 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -18186,6 +18398,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -18202,7 +18416,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4259 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4259 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -18335,6 +18549,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -18351,7 +18567,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4261 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4261 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -18483,6 +18699,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -18499,7 +18717,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4263 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4263 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -18630,6 +18848,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -18646,7 +18866,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4265 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4265 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -18776,6 +18996,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -18792,7 +19014,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4267 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4267 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -18921,6 +19143,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -18937,7 +19161,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4269 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4269 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -19065,6 +19289,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -19081,7 +19307,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4271 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4271 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -19208,6 +19434,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -19224,7 +19452,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4273 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4273 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -19350,6 +19578,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -19366,7 +19596,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4275 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4275 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -19491,6 +19721,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -19507,7 +19739,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4277 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4277 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -19631,6 +19863,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -19647,7 +19881,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4279 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4279 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -19770,6 +20004,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -19786,7 +20022,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4281 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4281 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -19908,6 +20144,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -19924,7 +20162,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4283 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4283 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -20045,6 +20283,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -20061,7 +20301,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4285 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4285 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -20181,6 +20421,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -20197,7 +20439,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4287 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4287 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -20316,6 +20558,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -20332,7 +20576,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4289 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4289 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -20450,6 +20694,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -20466,7 +20712,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4291 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4291 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -20583,6 +20829,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -20599,7 +20847,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4293 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4293 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -20715,6 +20963,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -20731,7 +20981,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4295 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4295 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -20846,6 +21096,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -20862,7 +21114,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4297 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4297 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -20976,6 +21228,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -20992,7 +21246,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4299 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4299 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -21105,6 +21359,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -21121,7 +21377,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4301 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4301 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -21233,6 +21489,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -21249,7 +21507,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4303 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4303 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -21360,6 +21618,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -21376,7 +21636,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4305 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4305 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -21486,6 +21746,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -21502,7 +21764,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4307 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4307 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -21611,6 +21873,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -21627,7 +21891,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4309 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4309 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -21735,6 +21999,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -21751,7 +22017,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4311 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4311 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -21858,6 +22124,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -21874,7 +22142,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4313 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4313 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -21980,6 +22248,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -21996,7 +22266,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4315 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4315 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -22101,6 +22371,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -22117,7 +22389,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4317 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4317 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -22221,6 +22493,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -22237,7 +22511,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4319 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4319 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -22340,6 +22614,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -22356,7 +22632,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4321 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4321 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -22458,6 +22734,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -22474,7 +22752,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4323 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4323 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -22575,6 +22853,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -22591,7 +22871,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4325 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4325 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -22691,6 +22971,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -22707,7 +22989,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4327 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4327 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -22806,6 +23088,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -22822,7 +23106,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4329 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4329 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -22920,6 +23204,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -22936,7 +23222,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4331 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4331 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -23033,6 +23319,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -23049,7 +23337,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4333 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4333 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -23145,6 +23433,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -23161,7 +23451,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4335 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4335 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -23256,6 +23546,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -23272,7 +23564,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4337 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4337 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -23366,6 +23658,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -23382,7 +23676,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4339 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4339 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -23475,6 +23769,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -23491,7 +23787,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4341 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4341 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -23583,6 +23879,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -23599,7 +23897,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4343 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4343 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -23690,6 +23988,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -23706,7 +24006,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4345 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4345 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -23796,6 +24096,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -23812,7 +24114,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4347 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4347 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -23901,6 +24203,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -23917,7 +24221,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4349 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4349 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -24005,6 +24309,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -24021,7 +24327,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4351 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4351 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -24108,6 +24414,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -24124,7 +24432,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4353 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4353 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -24210,6 +24518,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -24226,7 +24536,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4355 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4355 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -24311,6 +24621,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -24327,7 +24639,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4357 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4357 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -24411,6 +24723,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -24427,7 +24741,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4359 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4359 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -24510,6 +24824,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -24526,7 +24842,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4361 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4361 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -24608,6 +24924,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -24624,7 +24942,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4363 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4363 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -24705,6 +25023,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -24721,7 +25041,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4365 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4365 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -24801,6 +25121,8 @@ remainder: random@test.example,
     random@test.example,
     random@test.example,
     random@test.example
     random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -24817,7 +25139,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4367 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4367 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -24896,6 +25218,8 @@ To: random@rwtest.example,
 remainder: random@test.example,
     random@test.example,
     random@test.example
 remainder: random@test.example,
     random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -24912,7 +25236,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4369 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4369 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -24990,6 +25314,8 @@ To: random@rwtest.example,
 **** debug string too long - truncated ****
 remainder: random@test.example,
     random@test.example
 **** debug string too long - truncated ****
 remainder: random@test.example,
     random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -25006,7 +25332,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4371 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4371 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -25083,6 +25409,8 @@ To: random@rwtest.example,
     random@rwtest.example,
 **** debug string too long - truncated ****
 remainder: random@test.example
     random@rwtest.example,
 **** debug string too long - truncated ****
 remainder: random@test.example
+address match test: subject=random@test.example pattern=^.{40,}@*
+random@test.example in "^.{40,}@*"? no (end of list)
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
 address match test: subject=random@test.example pattern=*@*
 test.example in "*"? yes (matched "*")
 random@test.example in "*@*"? yes (matched "*@*")
@@ -25099,7 +25427,7 @@ random@test.example in "*@*"? yes (matched "*@*")
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
    in TESTSUITE/aux-fixed/0471.rw
  lookup yielded: rwtest.example
 LOG: address_rewrite MAIN
-  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 1
+  "random@test.example" from to: rewritten as "random@rwtest.example" by rule 2
 newlen=4373 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
 newlen=4373 newtype=T newtext:
 To: random@rwtest.example,
     random@rwtest.example,
@@ -25178,6 +25506,8 @@ To: random@rwtest.example,
 remainder: 
 rewrite_one_header: type=F:
   From: CALLER_NAME <CALLER@myhost.test.ex>
 remainder: 
 rewrite_one_header: type=F:
   From: CALLER_NAME <CALLER@myhost.test.ex>
+address match test: subject=CALLER@myhost.test.ex pattern=^.{40,}@*
+CALLER@myhost.test.ex in "^.{40,}@*"? no (end of list)
 address match test: subject=CALLER@myhost.test.ex pattern=*@*
 myhost.test.ex in "*"? yes (matched "*")
 CALLER@myhost.test.ex in "*@*"? yes (matched "*@*")
 address match test: subject=CALLER@myhost.test.ex pattern=*@*
 myhost.test.ex in "*"? yes (matched "*")
 CALLER@myhost.test.ex in "*@*"? yes (matched "*@*")
@@ -25384,3 +25714,305 @@ LOG: MAIN
 created log directory TESTSUITE/spool/log
 search_tidyup called
 >>>>>>>>>>>>>>>> Exim pid=pppp (fresh-exec) terminating with rc=0 >>>>>>>>>>>>>>>>
 created log directory TESTSUITE/spool/log
 search_tidyup called
 >>>>>>>>>>>>>>>> Exim pid=pppp (fresh-exec) terminating with rc=0 >>>>>>>>>>>>>>>>
+Exim version x.yz ....
+changed uid/gid: forcing real = effective
+  uid=uuuu gid=CALLER_GID pid=pppp
+configuration file is TESTSUITE/test-config
+admin user
+changed uid/gid: privilege not needed
+  uid=EXIM_UID gid=EXIM_GID pid=pppp
+originator: uid=CALLER_UID gid=CALLER_GID login=CALLER name=CALLER_NAME
+sender address = CALLER@myhost.test.ex
+set_process_info: pppp accepting a local non-SMTP message from <CALLER@myhost.test.ex>
+spool directory space = nnnnnK inodes = nnnnn check_space = 10240K inodes = 100 msg_size = 0
+log directory space = nnnnnK inodes = nnnnn check_space = 10240K inodes = 100
+Sender: CALLER@myhost.test.ex
+Recipients:
+  r2@test.ex
+search_tidyup called
+>>Headers received:
+To: localpart_with_056_chars_56789012345678901234567890123456@test.example
+
+address match test: subject=r2@test.ex pattern=^.{40,}@*
+r2@test.ex in "^.{40,}@*"? no (end of list)
+address match test: subject=r2@test.ex pattern=*@*
+test.ex in "*"? yes (matched "*")
+r2@test.ex in "*@*"? yes (matched "*@*")
+ search_open: lsearch "TESTSUITE/aux-fixed/0471.rw"
+ search_find: file="TESTSUITE/aux-fixed/0471.rw"
+   key="test.ex" partial=2 affix=*. starflags=0 opts=NULL
+ LRU list:
+   0TESTSUITE/aux-fixed/0471.rw
+   End
+ internal_search_find: file="TESTSUITE/aux-fixed/0471.rw"
+   type=lsearch key="test.ex" opts=NULL
+ file lookup required for test.ex
+   in TESTSUITE/aux-fixed/0471.rw
+ lookup failed
+ trying partial match *.test.ex
+ internal_search_find: file="TESTSUITE/aux-fixed/0471.rw"
+   type=lsearch key="*.test.ex" opts=NULL
+ file lookup required for *.test.ex
+   in TESTSUITE/aux-fixed/0471.rw
+ lookup failed
+address match test: subject=CALLER@myhost.test.ex pattern=^.{40,}@*
+CALLER@myhost.test.ex in "^.{40,}@*"? no (end of list)
+address match test: subject=CALLER@myhost.test.ex pattern=*@*
+myhost.test.ex in "*"? yes (matched "*")
+CALLER@myhost.test.ex in "*@*"? yes (matched "*@*")
+ search_open: lsearch "TESTSUITE/aux-fixed/0471.rw"
+   cached open
+ search_find: file="TESTSUITE/aux-fixed/0471.rw"
+   key="myhost.test.ex" partial=2 affix=*. starflags=0 opts=NULL
+ LRU list:
+   0TESTSUITE/aux-fixed/0471.rw
+   End
+ internal_search_find: file="TESTSUITE/aux-fixed/0471.rw"
+   type=lsearch key="myhost.test.ex" opts=NULL
+ file lookup required for myhost.test.ex
+   in TESTSUITE/aux-fixed/0471.rw
+ lookup failed
+ trying partial match *.myhost.test.ex
+ internal_search_find: file="TESTSUITE/aux-fixed/0471.rw"
+   type=lsearch key="*.myhost.test.ex" opts=NULL
+ file lookup required for *.myhost.test.ex
+   in TESTSUITE/aux-fixed/0471.rw
+ lookup failed
+ trying partial match *.test.ex
+ internal_search_find: file="TESTSUITE/aux-fixed/0471.rw"
+   type=lsearch key="*.test.ex" opts=NULL
+ cached data used for lookup of *.test.ex
+   in TESTSUITE/aux-fixed/0471.rw
+ lookup failed
+rewritten sender = CALLER@myhost.test.ex
+rewrite_one_header: type=T:
+  To: localpart_with_056_chars_56789012345678901234567890123456@test.example
+address match test: subject=localpart_with_056_chars_56789012345678901234567890123456@test.example pattern=^.{40,}@*
+localpart_with_056_chars_56789012345678901234567890123456@test.example in "^.{40,}@*"? yes (matched "^.{40,}@*")
+LOG: address_rewrite MAIN
+  "localpart_with_056_chars_56789012345678901234567890123456@test.example" from to: rewritten as "deny_me@test.example" by rule 1
+address match test: subject=deny_me@test.example pattern=*@*
+test.example in "*"? yes (matched "*")
+deny_me@test.example in "*@*"? yes (matched "*@*")
+ search_open: lsearch "TESTSUITE/aux-fixed/0471.rw"
+   cached open
+ search_find: file="TESTSUITE/aux-fixed/0471.rw"
+   key="test.example" partial=2 affix=*. starflags=0 opts=NULL
+ LRU list:
+   0TESTSUITE/aux-fixed/0471.rw
+   End
+ internal_search_find: file="TESTSUITE/aux-fixed/0471.rw"
+   type=lsearch key="test.example" opts=NULL
+ file lookup required for test.example
+   in TESTSUITE/aux-fixed/0471.rw
+ lookup yielded: rwtest.example
+LOG: address_rewrite MAIN
+  "deny_me@test.example" from to: rewritten as "deny_me@rwtest.example" by rule 2
+newlen=27 newtype=T newtext:
+To: deny_me@rwtest.example
+remainder: 
+rewrite_one_header: type=F:
+  From: CALLER_NAME <CALLER@myhost.test.ex>
+address match test: subject=CALLER@myhost.test.ex pattern=^.{40,}@*
+CALLER@myhost.test.ex in "^.{40,}@*"? no (end of list)
+address match test: subject=CALLER@myhost.test.ex pattern=*@*
+myhost.test.ex in "*"? yes (matched "*")
+CALLER@myhost.test.ex in "*@*"? yes (matched "*@*")
+ search_open: lsearch "TESTSUITE/aux-fixed/0471.rw"
+   cached open
+ search_find: file="TESTSUITE/aux-fixed/0471.rw"
+   key="myhost.test.ex" partial=2 affix=*. starflags=0 opts=NULL
+ LRU list:
+   0TESTSUITE/aux-fixed/0471.rw
+   End
+ internal_search_find: file="TESTSUITE/aux-fixed/0471.rw"
+   type=lsearch key="myhost.test.ex" opts=NULL
+ cached data used for lookup of myhost.test.ex
+   in TESTSUITE/aux-fixed/0471.rw
+ lookup failed
+ trying partial match *.myhost.test.ex
+ internal_search_find: file="TESTSUITE/aux-fixed/0471.rw"
+   type=lsearch key="*.myhost.test.ex" opts=NULL
+ cached data used for lookup of *.myhost.test.ex
+   in TESTSUITE/aux-fixed/0471.rw
+ lookup failed
+ trying partial match *.test.ex
+ internal_search_find: file="TESTSUITE/aux-fixed/0471.rw"
+   type=lsearch key="*.test.ex" opts=NULL
+ cached data used for lookup of *.test.ex
+   in TESTSUITE/aux-fixed/0471.rw
+ lookup failed
+search_tidyup called
+>>Headers after rewriting and local additions:
+* To: localpart_with_056_chars_56789012345678901234567890123456@test.example
+T To: deny_me@rwtest.example
+I Message-Id: <E10HmaY-0005vi-00@myhost.test.ex>
+F From: CALLER_NAME <CALLER@myhost.test.ex>
+  Date: Tue, 2 Mar 1999 09:44:33 +0000
+
+Data file name: TESTSUITE/spool//input//10HmaY-0005vi-00-D
+Data file written for message 10HmaY-0005vi-00
+>>Generated Received: header line
+P Received: from CALLER by myhost.test.ex with local (Exim x.yz)
+       (envelope-from <CALLER@myhost.test.ex>)
+       id 10HmaY-0005vi-00
+       for r2@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
+Writing spool header file: TESTSUITE/spool//input//hdr.10HmaY-0005vi-00
+DSN: **** SPOOL_OUT - address: <r2@test.ex> errorsto: <NULL> orcpt: <NULL> dsn_flags: 0x0
+Renaming spool header file: TESTSUITE/spool//input//10HmaY-0005vi-00-H
+Size of headers = sss
+LOG: MAIN
+  <= CALLER@myhost.test.ex U=CALLER P=local S=sss
+search_tidyup called
+>>>>>>>>>>>>>>>> Exim pid=pppp (fresh-exec) terminating with rc=0 >>>>>>>>>>>>>>>>
+Exim version x.yz ....
+changed uid/gid: forcing real = effective
+  uid=uuuu gid=CALLER_GID pid=pppp
+configuration file is TESTSUITE/test-config
+admin user
+changed uid/gid: privilege not needed
+  uid=EXIM_UID gid=EXIM_GID pid=pppp
+originator: uid=CALLER_UID gid=CALLER_GID login=CALLER name=CALLER_NAME
+sender address = CALLER@myhost.test.ex
+set_process_info: pppp accepting a local non-SMTP message from <CALLER@myhost.test.ex>
+spool directory space = nnnnnK inodes = nnnnn check_space = 10240K inodes = 100 msg_size = 0
+log directory space = nnnnnK inodes = nnnnn check_space = 10240K inodes = 100
+Sender: CALLER@myhost.test.ex
+Recipients:
+  r3@test.ex
+search_tidyup called
+>>Headers received:
+To: localpart_with_256_chars_5678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456@test.example
+
+address match test: subject=r3@test.ex pattern=^.{40,}@*
+r3@test.ex in "^.{40,}@*"? no (end of list)
+address match test: subject=r3@test.ex pattern=*@*
+test.ex in "*"? yes (matched "*")
+r3@test.ex in "*@*"? yes (matched "*@*")
+ search_open: lsearch "TESTSUITE/aux-fixed/0471.rw"
+ search_find: file="TESTSUITE/aux-fixed/0471.rw"
+   key="test.ex" partial=2 affix=*. starflags=0 opts=NULL
+ LRU list:
+   0TESTSUITE/aux-fixed/0471.rw
+   End
+ internal_search_find: file="TESTSUITE/aux-fixed/0471.rw"
+   type=lsearch key="test.ex" opts=NULL
+ file lookup required for test.ex
+   in TESTSUITE/aux-fixed/0471.rw
+ lookup failed
+ trying partial match *.test.ex
+ internal_search_find: file="TESTSUITE/aux-fixed/0471.rw"
+   type=lsearch key="*.test.ex" opts=NULL
+ file lookup required for *.test.ex
+   in TESTSUITE/aux-fixed/0471.rw
+ lookup failed
+address match test: subject=CALLER@myhost.test.ex pattern=^.{40,}@*
+CALLER@myhost.test.ex in "^.{40,}@*"? no (end of list)
+address match test: subject=CALLER@myhost.test.ex pattern=*@*
+myhost.test.ex in "*"? yes (matched "*")
+CALLER@myhost.test.ex in "*@*"? yes (matched "*@*")
+ search_open: lsearch "TESTSUITE/aux-fixed/0471.rw"
+   cached open
+ search_find: file="TESTSUITE/aux-fixed/0471.rw"
+   key="myhost.test.ex" partial=2 affix=*. starflags=0 opts=NULL
+ LRU list:
+   0TESTSUITE/aux-fixed/0471.rw
+   End
+ internal_search_find: file="TESTSUITE/aux-fixed/0471.rw"
+   type=lsearch key="myhost.test.ex" opts=NULL
+ file lookup required for myhost.test.ex
+   in TESTSUITE/aux-fixed/0471.rw
+ lookup failed
+ trying partial match *.myhost.test.ex
+ internal_search_find: file="TESTSUITE/aux-fixed/0471.rw"
+   type=lsearch key="*.myhost.test.ex" opts=NULL
+ file lookup required for *.myhost.test.ex
+   in TESTSUITE/aux-fixed/0471.rw
+ lookup failed
+ trying partial match *.test.ex
+ internal_search_find: file="TESTSUITE/aux-fixed/0471.rw"
+   type=lsearch key="*.test.ex" opts=NULL
+ cached data used for lookup of *.test.ex
+   in TESTSUITE/aux-fixed/0471.rw
+ lookup failed
+rewritten sender = CALLER@myhost.test.ex
+rewrite_one_header: type=T:
+  To: localpart_with_256_chars_5678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456@test.example
+address match test: subject=localpart_with_256_chars_5678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456@test.example pattern=^.{40,}@*
+localpart_with_256_chars_5678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456@test.example in "^.{40,}@*"? yes (matched "^.{40,}@*")
+LOG: address_rewrite MAIN
+  "localpart_with_256_chars_5678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456@test.example" from to: rewritten as "deny_me@test.example" by rule 1
+address match test: subject=deny_me@test.example pattern=*@*
+test.example in "*"? yes (matched "*")
+deny_me@test.example in "*@*"? yes (matched "*@*")
+ search_open: lsearch "TESTSUITE/aux-fixed/0471.rw"
+   cached open
+ search_find: file="TESTSUITE/aux-fixed/0471.rw"
+   key="test.example" partial=2 affix=*. starflags=0 opts=NULL
+ LRU list:
+   0TESTSUITE/aux-fixed/0471.rw
+   End
+ internal_search_find: file="TESTSUITE/aux-fixed/0471.rw"
+   type=lsearch key="test.example" opts=NULL
+ file lookup required for test.example
+   in TESTSUITE/aux-fixed/0471.rw
+ lookup yielded: rwtest.example
+LOG: address_rewrite MAIN
+  "deny_me@test.example" from to: rewritten as "deny_me@rwtest.example" by rule 2
+newlen=27 newtype=T newtext:
+To: deny_me@rwtest.example
+remainder: 
+rewrite_one_header: type=F:
+  From: CALLER_NAME <CALLER@myhost.test.ex>
+address match test: subject=CALLER@myhost.test.ex pattern=^.{40,}@*
+CALLER@myhost.test.ex in "^.{40,}@*"? no (end of list)
+address match test: subject=CALLER@myhost.test.ex pattern=*@*
+myhost.test.ex in "*"? yes (matched "*")
+CALLER@myhost.test.ex in "*@*"? yes (matched "*@*")
+ search_open: lsearch "TESTSUITE/aux-fixed/0471.rw"
+   cached open
+ search_find: file="TESTSUITE/aux-fixed/0471.rw"
+   key="myhost.test.ex" partial=2 affix=*. starflags=0 opts=NULL
+ LRU list:
+   0TESTSUITE/aux-fixed/0471.rw
+   End
+ internal_search_find: file="TESTSUITE/aux-fixed/0471.rw"
+   type=lsearch key="myhost.test.ex" opts=NULL
+ cached data used for lookup of myhost.test.ex
+   in TESTSUITE/aux-fixed/0471.rw
+ lookup failed
+ trying partial match *.myhost.test.ex
+ internal_search_find: file="TESTSUITE/aux-fixed/0471.rw"
+   type=lsearch key="*.myhost.test.ex" opts=NULL
+ cached data used for lookup of *.myhost.test.ex
+   in TESTSUITE/aux-fixed/0471.rw
+ lookup failed
+ trying partial match *.test.ex
+ internal_search_find: file="TESTSUITE/aux-fixed/0471.rw"
+   type=lsearch key="*.test.ex" opts=NULL
+ cached data used for lookup of *.test.ex
+   in TESTSUITE/aux-fixed/0471.rw
+ lookup failed
+search_tidyup called
+>>Headers after rewriting and local additions:
+* To: localpart_with_256_chars_5678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456@test.example
+T To: deny_me@rwtest.example
+I Message-Id: <E10HmaZ-0005vi-00@myhost.test.ex>
+F From: CALLER_NAME <CALLER@myhost.test.ex>
+  Date: Tue, 2 Mar 1999 09:44:33 +0000
+
+Data file name: TESTSUITE/spool//input//10HmaZ-0005vi-00-D
+Data file written for message 10HmaZ-0005vi-00
+>>Generated Received: header line
+P Received: from CALLER by myhost.test.ex with local (Exim x.yz)
+       (envelope-from <CALLER@myhost.test.ex>)
+       id 10HmaZ-0005vi-00
+       for r3@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
+Writing spool header file: TESTSUITE/spool//input//hdr.10HmaZ-0005vi-00
+DSN: **** SPOOL_OUT - address: <r3@test.ex> errorsto: <NULL> orcpt: <NULL> dsn_flags: 0x0
+Renaming spool header file: TESTSUITE/spool//input//10HmaZ-0005vi-00-H
+Size of headers = sss
+LOG: MAIN
+  <= CALLER@myhost.test.ex U=CALLER P=local S=sss
+search_tidyup called
+>>>>>>>>>>>>>>>> Exim pid=pppp (fresh-exec) terminating with rc=0 >>>>>>>>>>>>>>>>