NAME
Mail::SpamAssassin::Handler::Script - A MIME-part handler for text/javascript and text/vbscript parts
SYNOPSIS
loadhandler Mail::SpamAssassin::Handler::Script
script RULE_NAME /pattern/modifiers
script RULE_NAME eval:check_script_contains_recip_addr()
DESCRIPTION
A MIME-part handler for script parts -- both text/javascript and text/vbscript (e.g. .js, .vbs and .vbe attachments). Both are collected into one script stream and matched by one script rule type.
As it consumes each script part: it collects the script text for script rules (see "SCRIPT RULES") and adds any navigation/redirect URLs it finds (e.g. window.location = '...') to the URI detail list with type script, so uri-detail rules can target them.
RETURNS
This handler returns no sub-parts (always an empty list).
SCRIPT RULES
script RULENAME /regex/modifiers
score RULENAME 1.0
describe RULENAME message contains script matching /regex/
These rules behave like rawbody rules and support the multiple and maxhits=N tflags. By default a rule stops at its first match. A rule may also reference an eval function:
script RULENAME eval:check_script_contains_recip_addr()
EVAL RULES
check_script_contains_recip_addr()
Fires if the recipient's address (To:addr) appears anywhere in the
script text -- a common phishing indicator.