|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.malowa.rules.RuleEvaluator
public final class RuleEvaluator
The RuleEvaluator
is used to evaluate all configured rules for
the Greylister
. All defined rules are loaded from the ClassPath
according to the configuration file rules.properties
and will be
added to the appropriate rule chain. The rule chains can be queried by using
the static methods. The rules will be called in order of appearance in the
configuration file.
This class is instantiated only once and therefore the rules are instatiated only once, too.
Method Summary | |
---|---|
static boolean |
checkBlacklisting(SMTPInformation info)
Checks the rule chain if the SMTPInformation should be blacklisted. |
static boolean |
checkWhitelisting(SMTPInformation info)
Checks the rule chain if the SMTPInformation should not even get to the greylist. |
static boolean |
checkWhitelisting(SMTPInformation info,
MailHistory history)
Checks the rule chain if the SMTPInformation should pass the greylist even if the delay time has not passed. |
static java.util.Date |
getDateToRemoveNoRetry(SMTPInformation info,
MailHistory history)
Checks the rule chain if one rule defines the time when an entry in the greylisting database should be removed. |
static java.util.Date |
getDateToRemovePassedEntry(SMTPInformation info,
MailHistory history)
Checks the rule chain if one rule defines the time when an entry in the greylisting database should be removed. |
static int |
getDelay(SMTPInformation info)
Queries all configured rules to get the delay time for the given SMTPInformation . |
static int |
getDelayWithHistory(SMTPInformation info,
MailHistory history)
Queries all configured rules to get the delay time for the given SMTPInformation . |
static void |
preInitialize()
Initializes the evaluator with all the rules. |
static void |
updateRules()
Calls the DelayRule.update() method of all DelayRules. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void preInitialize()
public static int getDelay(SMTPInformation info)
SMTPInformation
. The SMTPInformation is seen the first time. The
delay times will be added (even negative times).
info
- will be passed to all rules
public static int getDelayWithHistory(SMTPInformation info, MailHistory history)
SMTPInformation
. The SMTPInformation is seen more than once and
has a MailHistory.The delay times will be added (even negative times).
info
- will be passed to all ruleshistory
- will be passed to all rules
public static boolean checkWhitelisting(SMTPInformation info)
info
- is passed to all rules
public static boolean checkWhitelisting(SMTPInformation info, MailHistory history)
info
- is passed to all ruleshistory
- is passed to all rules
public static java.util.Date getDateToRemovePassedEntry(SMTPInformation info, MailHistory history)
info
- will be passed to all ruleshistory
- will be passed to all rules
public static java.util.Date getDateToRemoveNoRetry(SMTPInformation info, MailHistory history)
info
- will be passed to all ruleshistory
- will be passed to all rules
public static boolean checkBlacklisting(SMTPInformation info)
info
- is passed to all rules
public static void updateRules()
DelayRule.update()
method of all DelayRules.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |