NAME
Mail::SpamAssassin::Handler::JavaScript - A MIME-part handler for text/javascript parts
SYNOPSIS
loadhandler Mail::SpamAssassin::Handler::JavaScript
script RULE_NAME /pattern/modifiers
script RULE_NAME eval:check_script_contains_recip_addr()
DESCRIPTION
A MIME-part handler for text/javascript parts. As it consumes each JavaScript 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.