# SpamAssassin rules file: HTML tests # # Please don't modify this file as your changes will be overwritten with # the next update. Use @@LOCAL_RULES_DIR@@/local.cf instead. # See 'perldoc Mail::SpamAssassin::Conf' for details. # # <@LICENSE> # Copyright 2004 Apache Software Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # ########################################################################### require_version @@VERSION@@ # HTML parser tests # # please sort these by eval type then name # HTML control test, HTML spam rules should all have better S/O than this body HTML_MESSAGE eval:html_test('html_message') describe HTML_MESSAGE HTML included in message # the HTML percentage range # should really be converted into a numeric function test body HTML_00_10 eval:html_range('ratio','0.00','0.10') body HTML_10_20 eval:html_range('ratio','0.10','0.20') body HTML_20_30 eval:html_range('ratio','0.20','0.30') body HTML_30_40 eval:html_range('ratio','0.30','0.40') body HTML_40_50 eval:html_range('ratio','0.40','0.50') body HTML_50_60 eval:html_range('ratio','0.50','0.60') body HTML_60_70 eval:html_range('ratio','0.60','0.70') body HTML_70_80 eval:html_range('ratio','0.70','0.80') body HTML_80_90 eval:html_range('ratio','0.80','0.90') body HTML_90_100 eval:html_range('ratio','0.90','1.00') describe HTML_00_10 Message is 0% to 10% HTML describe HTML_10_20 Message is 10% to 20% HTML describe HTML_20_30 Message is 20% to 30% HTML describe HTML_30_40 Message is 30% to 40% HTML describe HTML_40_50 Message is 40% to 50% HTML describe HTML_50_60 Message is 50% to 60% HTML describe HTML_60_70 Message is 60% to 70% HTML describe HTML_70_80 Message is 70% to 80% HTML describe HTML_80_90 Message is 80% to 90% HTML describe HTML_90_100 Message is 90% to 100% HTML # HTML shouting range # should really be converted into a numeric function test body HTML_SHOUTING3 eval:html_range('max_shouting','2','3') body HTML_SHOUTING4 eval:html_range('max_shouting','3','4') body HTML_SHOUTING5 eval:html_range('max_shouting','4','5') body HTML_SHOUTING6 eval:html_range('max_shouting','5','6') body HTML_SHOUTING7 eval:html_range('max_shouting','6','7') describe HTML_SHOUTING3 HTML has very strong "shouting" markup describe HTML_SHOUTING4 HTML has very strong "shouting" markup describe HTML_SHOUTING5 HTML has very strong "shouting" markup describe HTML_SHOUTING6 HTML has very strong "shouting" markup describe HTML_SHOUTING7 HTML has very strong "shouting" markup body HTML_TEXT_AFTER_HTML eval:html_test('text_after_html') describe HTML_TEXT_AFTER_HTML HTML contains text after HTML close tag body HTML_TEXT_AFTER_BODY eval:html_test('text_after_body') describe HTML_TEXT_AFTER_BODY HTML contains text after BODY close tag # HTML comment tests body HTML_COMMENT_SHORT eval:html_text_match('comment', '') describe HTML_COMMENT_SHORT HTML comment is very short body HTML_COMMENT_SAVED_URL eval:html_text_match('comment', '