public class JDBCGreylistHandler extends org.apache.james.protocols.smtp.core.fastfail.AbstractGreylistHandler implements InitializingLifecycleAwareProtocolHandler
| Constructor and Description |
|---|
JDBCGreylistHandler() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
cleanupAutoWhiteListGreyList(long time) |
protected void |
cleanupGreyList(long time) |
void |
destroy() |
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) |
FileSystem |
getFileSystem()
Gets the file system service.
|
protected Iterator<String> |
getGreyListData(String ipAddress,
String sender,
String recip) |
protected NetMatcher |
getWhiteListedNetworks() |
void |
init(org.apache.commons.configuration.Configuration handlerConfiguration)
Init with the given
Configuration |
protected void |
insertTriplet(String ipAddress,
String sender,
String recip,
int count,
long createTime) |
void |
setAutoWhiteListLifeTime(String autoWhiteListLifeTime)
Setup the autowhitelist lifetime for which we should whitelist a triplet.
|
void |
setDataSource(DataSource datasource)
Set the datasources.
|
void |
setDNSService(DNSService dnsService) |
void |
setFileSystem(FileSystem system)
Sets the filesystem service
|
void |
setLog(org.slf4j.Logger log) |
void |
setSqlFileUrl(String sqlFileUrl)
Set the sqlFileUrl to use for getting the sqlRessource.xml file
|
void |
setTempBlockTime(String tempBlockTime)
Setup the temporary blocking time
|
void |
setUnseenLifeTime(String unseenLifeTime)
Set up the liftime of only once seen triplet.
|
void |
setWhiteListedNetworks(NetMatcher wNetworks) |
protected void |
updateTriplet(String ipAddress,
String sender,
String recip,
int count,
long time) |
public final FileSystem getFileSystem()
public void setFileSystem(FileSystem system)
system - The filesystem servicepublic void setDataSource(DataSource datasource)
datasource - The datasourcepublic void setSqlFileUrl(String sqlFileUrl)
sqlFileUrl - The fileUrlpublic void setTempBlockTime(String tempBlockTime)
tempBlockTime - The temporary blocking timepublic void setAutoWhiteListLifeTime(String autoWhiteListLifeTime)
autoWhiteListLifeTime - The lifeTimepublic void setUnseenLifeTime(String unseenLifeTime)
unseenLifeTime - The lifetimepublic final void setDNSService(DNSService dnsService)
public void setWhiteListedNetworks(NetMatcher wNetworks)
protected NetMatcher getWhiteListedNetworks()
protected Iterator<String> getGreyListData(String ipAddress, String sender, String recip) throws SQLException
getGreyListData in class org.apache.james.protocols.smtp.core.fastfail.AbstractGreylistHandlerSQLExceptionAbstractGreylistHandler.getGreyListData(java.lang.String,
java.lang.String, java.lang.String)protected void insertTriplet(String ipAddress, String sender, String recip, int count, long createTime) throws SQLException
insertTriplet in class org.apache.james.protocols.smtp.core.fastfail.AbstractGreylistHandlerSQLExceptionAbstractGreylistHandler.insertTriplet(java.lang.String,
java.lang.String, java.lang.String, int, long)protected void updateTriplet(String ipAddress, String sender, String recip, int count, long time) throws SQLException
updateTriplet in class org.apache.james.protocols.smtp.core.fastfail.AbstractGreylistHandlerSQLExceptionAbstractGreylistHandler.updateTriplet(java.lang.String,
java.lang.String, java.lang.String, int, long)protected void cleanupAutoWhiteListGreyList(long time)
throws SQLException
cleanupAutoWhiteListGreyList in class org.apache.james.protocols.smtp.core.fastfail.AbstractGreylistHandlerSQLExceptionAbstractGreylistHandler.cleanupAutoWhiteListGreyList(long)protected void cleanupGreyList(long time)
throws SQLException
cleanupGreyList in class org.apache.james.protocols.smtp.core.fastfail.AbstractGreylistHandlerSQLExceptionAbstractGreylistHandler.cleanupGreyList(long)public 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.RcptHookdoRcpt in class org.apache.james.protocols.smtp.core.fastfail.AbstractGreylistHandlerorg.apache.james.protocols.smtp.core.fastfail.AbstractGreylistHandler#doRcpt(org.apache.james.protocols.smtp.SMTPSession,
org.apache.mailet.MailAddress, org.apache.mailet.MailAddress)public void setLog(org.slf4j.Logger log)
LogEnabled.setLog(Logger)public void init(org.apache.commons.configuration.Configuration handlerConfiguration)
throws org.apache.commons.configuration.ConfigurationException
InitializingLifecycleAwareProtocolHandlerConfigurationinit in interface InitializingLifecycleAwareProtocolHandlerorg.apache.commons.configuration.ConfigurationExceptionpublic void destroy()
destroy in interface org.apache.james.protocols.api.handler.LifecycleAwareProtocolHandlerCopyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.