de.malowa.suggestions.cleanup
Class ManyNumbersRule

java.lang.Object
  extended by de.malowa.suggestions.cleanup.ManyNumbersRule
All Implemented Interfaces:
CleanUpRule

public class ManyNumbersRule
extends java.lang.Object
implements CleanUpRule

If the client host name contains more than five numbers and no further delivery attempts occur, the entry will be deleted after one hour.

Author:
Marcel Lohmann

Constructor Summary
ManyNumbersRule()
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ManyNumbersRule

public ManyNumbersRule()
Method Detail

dateToRemoveNoRetry

public java.util.Date dateToRemoveNoRetry(SMTPInformation info,
                                          MailHistory history)
Description copied from interface: CleanUpRule
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.

Specified by:
dateToRemoveNoRetry in interface CleanUpRule
Returns:
date at which the entry will be removed from database or null if date can not be determined
See Also:
CleanUpRule.dateToRemoveNoRetry(de.malowa.greylister.SMTPInformation, de.malowa.greylister.MailHistory)

dateToRemovePassedEntry

public java.util.Date dateToRemovePassedEntry(SMTPInformation info,
                                              MailHistory history)
Description copied from interface: CleanUpRule
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.

Specified by:
dateToRemovePassedEntry in interface CleanUpRule
Returns:
date at which the entry will be removed from database or null if date can not be determined
See Also:
CleanUpRule.dateToRemovePassedEntry(de.malowa.greylister.SMTPInformation, de.malowa.greylister.MailHistory)