On 10 Dec 2018, at 1:56, Henrik K wrote:
On Mon, Dec 10, 2018 at 08:46:32AM +0200, Henrik Krohns wrote:
On Sun, Dec 09, 2018 at 01:06:01PM -0500, Bill Cole wrote:
To make this determination, the rules require the 'multiple' flag
without
a cap on thne number of matches which a 'maxhits' parameter would
set.
Please don't do unlimited maxhits, it's terrible if message
accidently or
intentionally contains thousands of e's. The eval code runs all
sorts of
crap for every hit, not to mention the mass of debug lines it
potentially
creates.
If I read right, isn't it enough to set __LOWER_E maxhits=21 and
__E_LIKE_LETTER maxhits=211 for the clause to evaluate as true?
body __LOWER_E /e/i
tflags __LOWER_E multiple
replace_rules __E_LIKE_LETTER
body __E_LIKE_LETTER /<E>/
tflags __E_LIKE_LETTER multiple
meta MIXED_ES ( __LOWER_E > 20 ) && (
__E_LIKE_LETTER > ( (__LOWER_E * 14 ) / 10) ) && ( __E_LIKE_LETTER >
( 10 * __LOWER_E ) )
describe MIXED_ES Too many es are not es
Also consider limiting __HAS_IMG_SRC, __HAS_HREF,
__HAS_IMG_SRC_ONECASE,
__HAS_HREF_ONECASE
Done.
I would use non-greedy .*? in all those also
/^[^>].*<img src=/i
Done.
Thanks for the input!
--
Bill Cole
[email protected] or [email protected]
(AKA @grumpybozo and many *@billmail.scconsult.com addresses)
Available For Hire: https://linkedin.com/in/billcole