public class SPFHandler extends Object implements JamesMessageHook, org.apache.james.protocols.smtp.hook.MailHook, org.apache.james.protocols.smtp.hook.RcptHook, InitializingLifecycleAwareProtocolHandler
Modifier and Type | Field and Description |
---|---|
static String |
SPF_BLOCKLISTED |
static String |
SPF_DETAIL |
static String |
SPF_HEADER |
static String |
SPF_HEADER_MAIL_ATTRIBUTE_NAME |
static String |
SPF_TEMPBLOCKLISTED |
Constructor and Description |
---|
SPFHandler() |
Modifier and Type | Method and Description |
---|---|
void |
destroy() |
org.apache.james.protocols.smtp.hook.HookResult |
doMail(org.apache.james.protocols.smtp.SMTPSession session,
org.apache.james.protocols.smtp.MailAddress sender) |
org.apache.james.protocols.smtp.hook.HookResult |
doRcpt(org.apache.james.protocols.smtp.SMTPSession session,
org.apache.james.protocols.smtp.MailAddress sender,
org.apache.james.protocols.smtp.MailAddress rcpt) |
void |
init(org.apache.commons.configuration.Configuration config)
Init with the given
Configuration |
org.apache.james.protocols.smtp.hook.HookResult |
onMessage(org.apache.james.protocols.smtp.SMTPSession session,
org.apache.mailet.Mail mail)
Handle Message
|
void |
setBlockPermError(boolean blockPermError)
block the email on a permerror
|
void |
setBlockSoftFail(boolean blockSoftFail)
block the email on a softfail
|
void |
setDNSService(org.apache.james.jspf.core.DNSService dnsService)
DNSService to use
|
public static final String SPF_BLOCKLISTED
public static final String SPF_DETAIL
public static final String SPF_TEMPBLOCKLISTED
public static final String SPF_HEADER
public static final String SPF_HEADER_MAIL_ATTRIBUTE_NAME
public void setBlockSoftFail(boolean blockSoftFail)
blockSoftFail
- true or falsepublic void setBlockPermError(boolean blockPermError)
blockPermError
- true or falsepublic void setDNSService(org.apache.james.jspf.core.DNSService dnsService)
dnsService
- The DNSServicepublic org.apache.james.protocols.smtp.hook.HookResult doRcpt(org.apache.james.protocols.smtp.SMTPSession session, org.apache.james.protocols.smtp.MailAddress sender, org.apache.james.protocols.smtp.MailAddress rcpt)
doRcpt
in interface org.apache.james.protocols.smtp.hook.RcptHook
org.apache.james.protocols.smtp.hook.RcptHook#doRcpt(org.apache.james.protocols.smtp.SMTPSession,
org.apache.mailet.MailAddress, org.apache.mailet.MailAddress)
public org.apache.james.protocols.smtp.hook.HookResult doMail(org.apache.james.protocols.smtp.SMTPSession session, org.apache.james.protocols.smtp.MailAddress sender)
doMail
in interface org.apache.james.protocols.smtp.hook.MailHook
org.apache.james.protocols.smtp.hook.MailHook#doMail(org.apache.james.protocols.smtp.SMTPSession,
org.apache.mailet.MailAddress)
public org.apache.james.protocols.smtp.hook.HookResult onMessage(org.apache.james.protocols.smtp.SMTPSession session, org.apache.mailet.Mail mail)
JamesMessageHook
onMessage
in interface JamesMessageHook
JamesMessageHook.onMessage(org.apache.james.protocols.smtp.SMTPSession,
org.apache.mailet.Mail)
public void init(org.apache.commons.configuration.Configuration config) throws org.apache.commons.configuration.ConfigurationException
InitializingLifecycleAwareProtocolHandler
Configuration
init
in interface InitializingLifecycleAwareProtocolHandler
org.apache.commons.configuration.ConfigurationException
public void destroy()
destroy
in interface org.apache.james.protocols.api.handler.LifecycleAwareProtocolHandler
Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.