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

java.lang.Object
  extended by org.apache.james.protocols.smtp.core.fastfail.AbstractValidRcptHandler
All Implemented Interfaces:
ProtocolHandler, Hook, RcptHook

public abstract class AbstractValidRcptHandler
extends Object
implements RcptHook

Handler which want todo an recipient check should extend this


Constructor Summary
AbstractValidRcptHandler()
           
 
Method Summary
 HookResult doRcpt(SMTPSession session, org.apache.mailet.MailAddress sender, org.apache.mailet.MailAddress rcpt)
          Return the HookResult after run the hook
protected abstract  boolean isLocalDomain(SMTPSession session, String domain)
          Return true if the domain is local
protected abstract  boolean isValidRecipient(SMTPSession session, org.apache.mailet.MailAddress recipient)
          Return true if email for the given recipient should get accepted
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractValidRcptHandler

public AbstractValidRcptHandler()
Method Detail

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)

isValidRecipient

protected abstract boolean isValidRecipient(SMTPSession session,
                                            org.apache.mailet.MailAddress recipient)
Return true if email for the given recipient should get accepted

Parameters:
recipient -
Returns:
isValid

isLocalDomain

protected abstract boolean isLocalDomain(SMTPSession session,
                                         String domain)
Return true if the domain is local

Parameters:
session -
domain -
Returns:
local


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