public class ResolvableEhloHeloHandler extends Object implements RcptHook, HeloHook
Modifier and Type | Field and Description |
---|---|
static String |
BAD_EHLO_HELO |
Constructor and Description |
---|
ResolvableEhloHeloHandler() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
check(SMTPSession session,
MailAddress rcpt) |
protected void |
checkEhloHelo(SMTPSession session,
String argument)
Check if EHLO/HELO is resolvable
|
HookResult |
doHelo(SMTPSession session,
String helo)
Return the HookResult after run the hook
|
HookResult |
doRcpt(SMTPSession session,
MailAddress sender,
MailAddress rcpt)
Return the HookResult after run the hook
|
protected boolean |
isBadHelo(SMTPSession session,
String argument) |
protected String |
resolve(String host) |
public static final String BAD_EHLO_HELO
protected void checkEhloHelo(SMTPSession session, String argument)
session
- The SMTPSessionargument
- The argumentprotected String resolve(String host) throws UnknownHostException
UnknownHostException
protected boolean isBadHelo(SMTPSession session, String argument)
session
- the SMTPSessionargument
- the argumentprotected boolean check(SMTPSession session, MailAddress rcpt)
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)
public HookResult doHelo(SMTPSession session, String helo)
HeloHook
doHelo
in interface HeloHook
session
- the SMTPSessionhelo
- the helo nameHeloHook.doHelo(org.apache.james.protocols.smtp.SMTPSession, java.lang.String)
Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.