de.malowa.greylister
Class MailHistory

java.lang.Object
  extended by de.malowa.greylister.MailHistory

public class MailHistory
extends java.lang.Object

If a mail tupel is on the greylist it has a MailHistory. It can be used in rules to make decision based on the history.

Author:
Marcel Lohmann

Constructor Summary
MailHistory(long secondsToWait, long passedSeconds, int retries)
          Creates a new MailHistory
 
Method Summary
 int getBlockedmailcount()
          gets number of times a tupel has been seen before.
 long getPassedSeconds()
          gets number of seconds since the tupel was inserted into greylist
 long getSecondsToWait()
          gets seconds to wait until passing greylist.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MailHistory

public MailHistory(long secondsToWait,
                   long passedSeconds,
                   int retries)
Creates a new MailHistory

Parameters:
secondsToWait - seconds to wait until passing greylist
passedSeconds - seconds passed since first seen
retries - number of retries
Method Detail

getSecondsToWait

public long getSecondsToWait()
gets seconds to wait until passing greylist.

Returns:
positive number if one has to wait, negative number otherwise

getPassedSeconds

public long getPassedSeconds()
gets number of seconds since the tupel was inserted into greylist

Returns:
positive number of seconds

getBlockedmailcount

public int getBlockedmailcount()
gets number of times a tupel has been seen before. It is zero based meaning it is zero when just inserted into greylist (first attempt). The current attempt is not added yet.

Returns:
positive number of past retries

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()