|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jasen.plugins.HeuristicScanner
Performs a heuristic scan of an email.
The scan is done across the entire message text (and html) and looks for known spam identifiers
The term "heuristic" in this context is defined as: "A method based on empirical information that has no explicit rationalization"
This essentially correlates to a "hard-coded" search for specific string patterns
The scanner makes use of a HeuristicAnalyzer to perform the analysis. The default analyzer for jASEN uses regular expressions to interrogate the email content.
Implementation Note: When adding heuristic definitions one should be very careful to ensure the definition is precise. An imprecise heuristic definition (regular expression) may lead to false identification of spam
Constructor Summary | |
HeuristicScanner()
|
Method Summary | |
void |
destroy()
Destroys the plugin. |
void |
init(Properties properties)
Initialises the plugin with the given properties |
JasenTestResult |
test(Jasen engine,
javax.mail.internet.MimeMessage rawMessage,
JasenMessage parsedMessage,
ParserData data,
ReceivedHeaderParser parser)
Computess the "spamminess" of a message. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public HeuristicScanner()
Method Detail |
public void init(Properties properties) throws JasenException
JasenPlugin
init
in interface JasenPlugin
properties
-
JasenException
public void destroy() throws JasenException
JasenPlugin
destroy
in interface JasenPlugin
JasenException
public JasenTestResult test(Jasen engine, javax.mail.internet.MimeMessage rawMessage, JasenMessage parsedMessage, ParserData data, ReceivedHeaderParser parser) throws JasenException
JasenPlugin
test
in interface JasenPlugin
engine
- A reference to the current engine instance.rawMessage
- The original MimeMessage passed to the engine.parsedMessage
- The parsed JasenMessage returned from the MimeParser.data
- The data returned from the HTML Parser / Tokenizer combination.parser
- The parser used to parse mail headers
JasenException
- If an error occurs while performing the test
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |