org.apache.james.protocols.smtp.core.fastfail
Class TarpitHandler

java.lang.Object
  extended by org.apache.james.protocols.smtp.core.fastfail.TarpitHandler
All Implemented Interfaces:
RcptHook

public class TarpitHandler
extends java.lang.Object
implements RcptHook

Add tarpit support to SMTPServer. See http://www.palomine.net/qmail/tarpit.html for more information


Constructor Summary
TarpitHandler()
           
 
Method Summary
 HookResult doRcpt(SMTPSession session, org.apache.mailet.MailAddress sender, org.apache.mailet.MailAddress rcpt)
          Return the HookResult after run the hook
 void setTarpitRcptCount(int tarpitRcptCount)
          Set the tarpit count after which the tarpit sleep time will be activated
 void setTarpitSleepTime(long tarpitSleepTime)
          Set the tarpit sleep time
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TarpitHandler

public TarpitHandler()
Method Detail

setTarpitRcptCount

public void setTarpitRcptCount(int tarpitRcptCount)
Set the tarpit count after which the tarpit sleep time will be activated

Parameters:
tarpitRcptCount -

setTarpitSleepTime

public void setTarpitSleepTime(long tarpitSleepTime)
Set the tarpit sleep time

Parameters:
tarpitSleepTime - Time in milliseconds

doRcpt

public HookResult doRcpt(SMTPSession session,
                         org.apache.mailet.MailAddress sender,
                         org.apache.mailet.MailAddress rcpt)
Description copied from interface: RcptHook
Return the HookResult after run the hook

Specified by:
doRcpt in interface RcptHook
Parameters:
session - the SMTPSession
sender - the sender MailAddress
rcpt - the recipient MailAddress
Returns:
HookResult
See Also:
RcptHook.doRcpt(org.apache.james.protocols.smtp.SMTPSession, org.apache.mailet.MailAddress, org.apache.mailet.MailAddress)


Copyright © 2010 The Apache Software Foundation. All Rights Reserved.