org.apache.james.smtpserver.core.filter.fastfail
Class ValidRcptMX

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.james.smtpserver.core.filter.fastfail.AbstractJunkHandler
          extended by org.apache.james.smtpserver.core.filter.fastfail.ValidRcptMX
All Implemented Interfaces:
org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.logger.LogEnabled, org.apache.avalon.framework.service.Serviceable, CommandHandler

public class ValidRcptMX
extends AbstractJunkHandler
implements CommandHandler, org.apache.avalon.framework.service.Serviceable

This class can be used to reject email with bogus MX which is send from a authorized user or an authorized network.


Constructor Summary
ValidRcptMX()
           
 
Method Summary
protected  boolean check(SMTPSession session)
          All checks must be done in this method
 void configure(org.apache.avalon.framework.configuration.Configuration arg0)
           
 java.util.Collection getImplCommands()
          Return a Collection of implemented commands
 JunkHandlerData getJunkHandlerData(SMTPSession session)
          Get the JunkHandlerData to work with
 void onCommand(SMTPSession session)
          Handle the command
 void service(org.apache.avalon.framework.service.ServiceManager arg0)
           
 void setBannedNetworks(java.util.Collection networks, DNSService dnsServer)
          Set the banned networks
 void setDNSServer(DNSService dnsServer)
          Set the DNSService
 
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
 

Constructor Detail

ValidRcptMX

public ValidRcptMX()
Method Detail

configure

public void configure(org.apache.avalon.framework.configuration.Configuration arg0)
               throws org.apache.avalon.framework.configuration.ConfigurationException
Specified by:
configure in interface org.apache.avalon.framework.configuration.Configurable
Overrides:
configure in class AbstractJunkHandler
Throws:
org.apache.avalon.framework.configuration.ConfigurationException
See Also:
AbstractJunkHandler.configure(org.apache.avalon.framework.configuration.Configuration)

setBannedNetworks

public void setBannedNetworks(java.util.Collection networks,
                              DNSService dnsServer)
Set the banned networks

Parameters:
networks - Collection of networks
dnsServer - The DNSService

service

public void service(org.apache.avalon.framework.service.ServiceManager arg0)
             throws org.apache.avalon.framework.service.ServiceException
Specified by:
service in interface org.apache.avalon.framework.service.Serviceable
Throws:
org.apache.avalon.framework.service.ServiceException
See Also:
Serviceable.service(ServiceManager)

getImplCommands

public java.util.Collection getImplCommands()
Description copied from interface: CommandHandler
Return a Collection of implemented commands

Specified by:
getImplCommands in interface CommandHandler
Returns:
Collection which contains implemented commands
See Also:
CommandHandler.getImplCommands()

onCommand

public void onCommand(SMTPSession session)
Description copied from interface: CommandHandler
Handle the command

Specified by:
onCommand in interface CommandHandler
See Also:
CommandHandler.onCommand(SMTPSession)

setDNSServer

public void setDNSServer(DNSService dnsServer)
Set the DNSService

Parameters:
dnsServer - The dnsServer

check

protected boolean check(SMTPSession session)
Description copied from class: AbstractJunkHandler
All checks must be done in this method

Specified by:
check in class AbstractJunkHandler
Parameters:
session - the SMTPSession
Returns:
true if the check match
See Also:
AbstractJunkHandler.check(org.apache.james.smtpserver.SMTPSession)

getJunkHandlerData

public JunkHandlerData getJunkHandlerData(SMTPSession session)
Description copied from class: AbstractJunkHandler
Get the JunkHandlerData to work with

Specified by:
getJunkHandlerData in class AbstractJunkHandler
Parameters:
session - the SMTPSession
Returns:
junkHandlerData
See Also:
AbstractJunkHandler.getJunkHandlerData(org.apache.james.smtpserver.SMTPSession)


Copyright ? 2002-2009 The Apache Software Foundation. All Rights Reserved.