]> git.netwichtig.de Git - user/henk/code/exim.git/blobdiff - src/src/routers/redirect.c
pcre2
[user/henk/code/exim.git] / src / src / routers / redirect.c
index 13b6e5244684e37aabf0b69479c6a475d4e5e144..71769dbc3386a9b19f522f7b85dcfb0f8f14543d 100644 (file)
@@ -529,9 +529,6 @@ int options = ob->bit_options;
 int frc = 0;
 int xrc = 0;
 
-addr_local = addr_local;     /* Keep picky compilers happy */
-addr_remote = addr_remote;
-
 /* Initialize the data to be propagated to the children */
 
 addr_prop.address_data = deliver_address_data;
@@ -737,15 +734,13 @@ switch (frc)
       addr->message = yield == FAIL ? US"forced rejection" : US"forced defer";
     else
       {
-      int ovector[3];
-      if (ob->forbid_smtp_code &&
-         pcre_exec(regex_smtp_code, NULL, CS addr->message,
-           Ustrlen(addr->message), 0, PCRE_EOPT,
-           ovector, sizeof(ovector)/sizeof(int)) >= 0)
+      uschar * matched;
+      if (  ob->forbid_smtp_code
+        && regex_match(regex_smtp_code, addr->message, -1, &matched))
        {
        DEBUG(D_route) debug_printf("SMTP code at start of error message "
          "is ignored because forbid_smtp_code is set\n");
-       addr->message += ovector[1];
+       addr->message += Ustrlen(matched);
        }
       addr->user_message = addr->message;
       setflag(addr, af_pass_message);