public abstract class AbstractValidRcptHandler extends Object implements RcptHook
Constructor and Description |
---|
AbstractValidRcptHandler() |
Modifier and Type | Method and Description |
---|---|
HookResult |
doRcpt(SMTPSession session,
MailAddress sender,
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,
MailAddress recipient)
Return true if email for the given recipient should get accepted
|
public HookResult doRcpt(SMTPSession session, MailAddress sender, MailAddress rcpt)
RcptHook
doRcpt
in interface RcptHook
session
- the SMTPSessionsender
- the sender MailAddressrcpt
- the recipient MailAddressorg.apache.james.protocols.smtp.hook.RcptHook#doRcpt(org.apache.james.protocols.smtp.SMTPSession, org.apache.mailet.MailAddress, org.apache.mailet.MailAddress)
protected abstract boolean isValidRecipient(SMTPSession session, MailAddress recipient)
recipient
- protected abstract boolean isLocalDomain(SMTPSession session, String domain)
session
- domain
- Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.