git://git.exim.org
/
exim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Regex compile cacheing
[exim.git]
/
src
/
src
/
rewrite.c
diff --git
a/src/src/rewrite.c
b/src/src/rewrite.c
index 005dc51fefa882e5e678526adb59326115cd834e..bfd78b5f11a23242d827501de5a4bddce2e25aa9 100644
(file)
--- a/
src/src/rewrite.c
+++ b/
src/src/rewrite.c
@@
-136,7
+136,8
@@
for (rewrite_rule * rule = rewrite_rules;
if (flag & rewrite_smtp)
{
if (flag & rewrite_smtp)
{
- uschar *key = expand_string(rule->key);
+ BOOL textonly_re;
+ const uschar * key = expand_string_2(rule->key, &textonly_re);
if (!key)
{
if (!f.expand_string_forcedfail)
if (!key)
{
if (!f.expand_string_forcedfail)
@@
-144,7
+145,8
@@
for (rewrite_rule * rule = rewrite_rules;
"checking for SMTP rewriting: %s", rule->key, expand_string_message);
continue;
}
"checking for SMTP rewriting: %s", rule->key, expand_string_message);
continue;
}
- if (match_check_string(subject, key, 0, TRUE, FALSE, FALSE, NULL) != OK)
+ if (match_check_string(subject, key, 0,
+ textonly_re ? MCS_CACHEABLE | MCS_PARTIAL : MCS_PARTIAL, NULL) != OK)
continue;
new = expand_string(rule->replacement);
}
continue;
new = expand_string(rule->replacement);
}