de.malowa.greylister.trap
Class NoSpamTrap

java.lang.Object
  extended by de.malowa.greylister.trap.SpamTrap
      extended by de.malowa.greylister.trap.NoSpamTrap

public final class NoSpamTrap
extends SpamTrap

Concrete implementation of a spam trap. This spam trap is not a real spam trap and works as if no spam trap is defined.

Author:
Marcel Lohmann

Constructor Summary
NoSpamTrap()
           
 
Method Summary
 void cleanUp()
          Cleans expired entries of spam trap occurrences.
 java.lang.String getAction(java.lang.String recipient)
          Action to be performed when mail is sent to a spam trap.
 boolean isSpamLover(java.lang.String recipient)
          Returns true, if the recipient's email address or email domain is defined as spam trap
 boolean sentSpamLately(SMTPInformation recipient)
          Stops redirecting when a defined amount of spam arrives from a given IP in a given period of time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NoSpamTrap

public NoSpamTrap()
Method Detail

cleanUp

public void cleanUp()
Description copied from class: SpamTrap
Cleans expired entries of spam trap occurrences.

Specified by:
cleanUp in class SpamTrap
See Also:
SpamTrap.cleanUp()

sentSpamLately

public boolean sentSpamLately(SMTPInformation recipient)
Description copied from class: SpamTrap
Stops redirecting when a defined amount of spam arrives from a given IP in a given period of time. It is not necessary to redirect too much spam to final recipient.

Specified by:
sentSpamLately in class SpamTrap
Parameters:
recipient - data containing the spammer's IP
Returns:
true when there was too much spam originating from an IP
See Also:
SpamTrap.sentSpamLately(de.malowa.greylister.SMTPInformation)

isSpamLover

public boolean isSpamLover(java.lang.String recipient)
Description copied from class: SpamTrap
Returns true, if the recipient's email address or email domain is defined as spam trap

Specified by:
isSpamLover in class SpamTrap
Parameters:
recipient - email address
Returns:
true if the recipient or domain is a spam trap
See Also:
SpamTrap.isSpamLover(java.lang.String)

getAction

public java.lang.String getAction(java.lang.String recipient)
Description copied from class: SpamTrap
Action to be performed when mail is sent to a spam trap. See postfix's access(5) manual page.

Specified by:
getAction in class SpamTrap
Parameters:
recipient - address of spam trap
Returns:
action for postfix to perform
See Also:
SpamTrap.getAction(java.lang.String)