de.malowa.suggestions.delay
Class HostNotGivenRule

java.lang.Object
  extended by de.malowa.suggestions.delay.HostNotGivenRule
All Implemented Interfaces:
DelayRule

public class HostNotGivenRule
extends java.lang.Object
implements DelayRule

Adds ten minutes to the delay time when the sender's host name is not resolvable.

Author:
Marcel Lohmann

Constructor Summary
HostNotGivenRule()
           
 
Method Summary
 int getDelayTime(SMTPInformation mail)
          Returns the delay in minutes for the given SMTP mail header.
 int getDelayTimeWithHistory(SMTPInformation info, MailHistory history)
          Returns the delay in minutes for the given SMTP mail header.
 void update()
          Will be called regularly.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HostNotGivenRule

public HostNotGivenRule()
Method Detail

getDelayTime

public int getDelayTime(SMTPInformation mail)
Description copied from interface: DelayRule
Returns the delay in minutes for the given SMTP mail header. Will be used for calculation of initial delay while inserting into greylist database.

Specified by:
getDelayTime in interface DelayRule
Parameters:
mail - SMTP information to utilize
Returns:
minutes to delay. May be zero or negative
See Also:
DelayRule.getDelayTime(de.malowa.greylister.SMTPInformation)

getDelayTimeWithHistory

public int getDelayTimeWithHistory(SMTPInformation info,
                                   MailHistory history)
Description copied from interface: DelayRule
Returns the delay in minutes for the given SMTP mail header. Will be used for calculation of further delay when SMTP header is already known to the greylist database. May delegate to DelayRule.getDelayTime(SMTPInformation) without considering history.

Specified by:
getDelayTimeWithHistory in interface DelayRule
Parameters:
info - SMTP information to utilize
history - the history of past delivery attempts to utilize
Returns:
minutes to delay. May be zero or negative
See Also:
DelayRule.getDelayTimeWithHistory(de.malowa.greylister.SMTPInformation, de.malowa.greylister.MailHistory)

update

public void update()
Description copied from interface: DelayRule
Will be called regularly. Can be used to reread any necessary data for calculation.

Specified by:
update in interface DelayRule
See Also:
DelayRule.update()