de.malowa.rules.cleanup
Interface CleanUpRule

All Known Implementing Classes:
DefaultCleanUpRule, DynamicIPRule, HostNotGivenRule, ManyNumbersRule

public interface CleanUpRule

CleanUpRules compute a date when an greylisting entry should be removed from the database. The time to evaluate the date during program runtime is allowed take some time. It is not time critical to do advanced calculation, as the SMTP host already got a response of greylisting status. See RuleEvaluator on how to integrate your own rules to the program. See de.malowa.suggestions.cleanup for working and usable examples.

Author:
Marcel Lohmann

Method Summary
 java.util.Date dateToRemoveNoRetry(SMTPInformation info, MailHistory history)
          Must return a date when the current greylist entry should be removed from list.
 java.util.Date dateToRemovePassedEntry(SMTPInformation info, MailHistory history)
          Must return a date when the current greylist entry should be removed from list.
 

Method Detail

dateToRemovePassedEntry

java.util.Date dateToRemovePassedEntry(SMTPInformation info,
                                       MailHistory history)
Must return a date when the current greylist entry should be removed from list. Date is used for entries that passed greylisting but are considered "ancient". Has to return null when another rule should be used to specify date.

Parameters:
info -
history -
Returns:
date at which the entry will be removed from database or null if date can not be determined

dateToRemoveNoRetry

java.util.Date dateToRemoveNoRetry(SMTPInformation info,
                                   MailHistory history)
Must return a date when the current greylist entry should be removed from list. Date is used for entries that did not pass greylisting; another successful delivery attempt has to occur before that date. Has to return null when another rule should be used to specify date.

Parameters:
info -
history -
Returns:
date at which the entry will be removed from database or null if date can not be determined