|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.avalon.framework.logger.AbstractLogEnabled org.apache.james.smtpserver.core.filter.fastfail.AbstractJunkHandler org.apache.james.smtpserver.core.filter.fastfail.SPFHandler
public class SPFHandler
SPFHandler which could be used to reject mail based on spf. The Following attributes
org.apache.james.smtpserver.spf.header - Holds the header which can be attached later
Sample Configuration:
<handler class="org.apache.james.smtpserver.core.SPFHandler" command="MAIL,RCPT">
<blockSoftFail>false</blockSoftFail>
<checkAuthNetworks>false</checkAuthNetworks>
</handler>
Field Summary | |
---|---|
static java.lang.String |
SPF_BLOCKLISTED
|
static java.lang.String |
SPF_DETAIL
|
static java.lang.String |
SPF_HEADER
|
static java.lang.String |
SPF_HEADER_MAIL_ATTRIBUTE_NAME
|
static java.lang.String |
SPF_TEMPBLOCKLISTED
|
Constructor Summary | |
---|---|
SPFHandler()
|
Method Summary | |
---|---|
protected boolean |
check(SMTPSession session)
All checks must be done in this method |
void |
configure(org.apache.avalon.framework.configuration.Configuration handlerConfiguration)
|
java.util.Collection |
getImplCommands()
Return a Collection of implemented commands |
JunkHandlerData |
getJunkHandlerData(SMTPSession session)
Get the JunkHandlerData to work with |
void |
initialize()
|
void |
onCommand(SMTPSession session)
Calls the SPFcheck |
void |
onMessage(SMTPSession session)
|
void |
setBlockPermError(boolean blockPermError)
block the email on a permerror |
void |
setBlockSoftFail(boolean blockSoftFail)
block the email on a softfail |
void |
setCheckAuthNetworks(boolean checkAuthNetworks)
Set to true if AuthNetworks should be included in the EHLO check |
void |
setDNSService(org.apache.james.jspf.core.DNSService dnsService)
DNSService to use |
Methods inherited from class org.apache.james.smtpserver.core.filter.fastfail.AbstractJunkHandler |
---|
doProcessing, getAction, getJunkScore, getScore, setAction, setScore |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
---|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String SPF_BLOCKLISTED
public static final java.lang.String SPF_DETAIL
public static final java.lang.String SPF_TEMPBLOCKLISTED
public static final java.lang.String SPF_HEADER
public static final java.lang.String SPF_HEADER_MAIL_ATTRIBUTE_NAME
Constructor Detail |
---|
public SPFHandler()
Method Detail |
---|
public void configure(org.apache.avalon.framework.configuration.Configuration handlerConfiguration) throws org.apache.avalon.framework.configuration.ConfigurationException
configure
in interface org.apache.avalon.framework.configuration.Configurable
configure
in class AbstractJunkHandler
org.apache.avalon.framework.configuration.ConfigurationException
Configurable.configure(Configuration)
public void initialize() throws java.lang.Exception
initialize
in interface org.apache.avalon.framework.activity.Initializable
java.lang.Exception
Initializable.initialize()
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 void setCheckAuthNetworks(boolean checkAuthNetworks)
checkAuthNetworks
- Set to true to enablepublic void onCommand(SMTPSession session)
onCommand
in interface CommandHandler
CommandHandler.onCommand(SMTPSession)
public java.util.Collection getImplCommands()
CommandHandler
getImplCommands
in interface CommandHandler
CommandHandler.getImplCommands()
public void onMessage(SMTPSession session)
onMessage
in interface MessageHandler
MessageHandler.onMessage(SMTPSession)
protected boolean check(SMTPSession session)
AbstractJunkHandler
check
in class AbstractJunkHandler
session
- the SMTPSession
AbstractJunkHandler.check(org.apache.james.smtpserver.SMTPSession)
public JunkHandlerData getJunkHandlerData(SMTPSession session)
AbstractJunkHandler
getJunkHandlerData
in class AbstractJunkHandler
session
- the SMTPSession
AbstractJunkHandler.getJunkHandlerData(org.apache.james.smtpserver.SMTPSession)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |