http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4691
[EMAIL PROTECTED] changed:
What |Removed |Added
----------------------------------------------------------------------------
URL|http://www.engelken.net/down|http://www.engelken.net/down
|load/tmethod.patch |load/range.patch
------- Additional Comments From [EMAIL PROTECTED] 2005-11-25 18:12 -------
okay.. new patch.
it now works properly with 'tflags multiple' no matter if you use 'line' or
'byte', and it changes the config from 'tmethod' to simply 'range' like justin
requested. i've also moved most of the code out of the $evalstr2 definition
into its own sub called get_range_data() which saves quite a bit on memory
consumption.
-------------------------------------
body __TEST /test/
range __TEST byte 0:512
tflags __TEST multiple
score __TEST 1.0
# echo -e "From: you\n\ntest\ntest\ntest\n" | spamc
[26087] dbg: range_data: type=byte args=0:512 for rule __TEST
[26087] dbg: rules: running range type byte
[26087] dbg: rules: found "test" at pos 5 - hit #1
[26087] dbg: rules: ran body rule __TEST ======> got hit: "test"
[26087] dbg: rules: found "test" at pos 10 - hit #2
[26087] dbg: rules: ran body rule __TEST ======> got hit: "test"
[26087] dbg: rules: found "test" at pos 15 - hit #3
[26087] dbg: rules: ran body rule __TEST ======> got hit: "test"
[26087] dbg: rules: __TEST got 3 hits
-------------------------------------
body __TEST /test/
range __TEST byte 0:10
tflags __TEST multiple
score __TEST 1.0
# echo -e "From: you\n\ntest\ntest\ntest\n" | spamc
[26073] dbg: range_data: type=byte args=0:10 for rule __TEST
[26073] dbg: rules: running range type byte
[26073] dbg: rules: found "test" at pos 5 - hit #1
[26073] dbg: rules: ran body rule __TEST ======> got hit: "test"
[26073] dbg: rules: found "test" at pos 10 - hit #2
[26073] dbg: rules: ran body rule __TEST ======> got hit: "test"
[26073] dbg: rules: __TEST got 2 hits
-------------------------------------
fast_body __TEST /test/
tflags __TEST multiple
score __TEST 1.0
# echo -e "From: you\n\ntest\ntest\ntest\n" | spamc
[26096] dbg: range_data: type=bytetrim args=0:8192 for rule __TEST
[26096] dbg: rules: running range type bytetrim
[26096] dbg: rules: found "test" at pos 5 - hit #1
[26096] dbg: rules: ran body rule __TEST ======> got hit: "test"
[26096] dbg: rules: found "test" at pos 10 - hit #2
[26096] dbg: rules: ran body rule __TEST ======> got hit: "test"
[26096] dbg: rules: found "test" at pos 15 - hit #3
[26096] dbg: rules: ran body rule __TEST ======> got hit: "test"
[26096] dbg: rules: __TEST got 3 hits
-------------------------------------
# echo -e "From: you\nContent-type: text/html\n\n<html>\n<body>\n\ntest<br
/>\ntest<br />\ntest<br />\n</body>\n</html>" | spamc
fast_rawbody __TEST /test/
tflags __TEST multiple
score __TEST 1.0
[26175] dbg: range_data: type=bytetrim args=0:32768 for rule __TEST
[26175] dbg: rules: ran rawbody rule __TEST ======> got hit: "test"
[26175] dbg: rules: ran rawbody rule __TEST ======> got hit: "test"
[26175] dbg: rules: ran rawbody rule __TEST ======> got hit: "test"
-------------------------------------
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.