mirror of
https://github.com/rspamd/rspamd.git
synced 2024-09-07 21:31:48 +02:00
[Fix] Composites: Allow partial match
This commit is contained in:
parent
5ab536d145
commit
7c63add10c
@ -449,8 +449,8 @@ rspamd_composite_process_single_symbol (struct composites_data *cd,
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (rspamd_regexp_match (cur_opt->data.re,
|
||||
opt->option, opt->optlen, FALSE)) {
|
||||
if (rspamd_regexp_search (cur_opt->data.re,
|
||||
opt->option, opt->optlen, NULL, NULL, FALSE, NULL)) {
|
||||
found = true;
|
||||
|
||||
break;
|
||||
|
@ -70,3 +70,9 @@ Composites - Opts RE Hit 2
|
||||
Expect Symbol With Score SYMOPTS3 6.00
|
||||
Do Not Expect Symbol SYMOPTS2
|
||||
Do Not Expect Symbol SYMOPTS1
|
||||
|
||||
Composites - Opts RE Hit 3
|
||||
Scan File ${MESSAGE} opts=example.com->app.link
|
||||
Expect Symbol With Score SYMOPTS4 6.00
|
||||
Do Not Expect Symbol SYMOPTS2
|
||||
Do Not Expect Symbol SYMOPTS1
|
@ -80,4 +80,8 @@ composites {
|
||||
expression = 'OPTS[sym2,/FoO\\//i]';
|
||||
score = 6.0;
|
||||
}
|
||||
SYMOPTS4 {
|
||||
expression = 'POSITIVE_A & OPTS[/>app.link$/i] & EXPRESSIONS';
|
||||
score = 6.0;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user