org.apache.james.protocols.smtp.core.fastfail
Class ValidSenderDomainHandler

java.lang.Object
  extended by org.apache.james.protocols.smtp.core.fastfail.ValidSenderDomainHandler
All Implemented Interfaces:
ProtocolHandler, Hook, MailHook

public class ValidSenderDomainHandler
extends Object
implements MailHook

Add MFDNSCheck feature to SMTPServer. This handler reject mail from domains which have not an an valid MX record.


Constructor Summary
ValidSenderDomainHandler()
           
 
Method Summary
protected  boolean check(SMTPSession session, org.apache.mailet.MailAddress senderAddress)
           
 HookResult doMail(SMTPSession session, org.apache.mailet.MailAddress sender)
          Return the HookResult after run the hook
 void setDNSService(DNSService dnsService)
          Sets the DNS service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValidSenderDomainHandler

public ValidSenderDomainHandler()
Method Detail

setDNSService

public final void setDNSService(DNSService dnsService)
Sets the DNS service.

Parameters:
dnsService - the dnsService to set

check

protected boolean check(SMTPSession session,
                        org.apache.mailet.MailAddress senderAddress)

doMail

public HookResult doMail(SMTPSession session,
                         org.apache.mailet.MailAddress sender)
Description copied from interface: MailHook
Return the HookResult after run the hook

Specified by:
doMail in interface MailHook
Parameters:
session - the SMTPSession
sender - the sender MailAddress
Returns:
HockResult
See Also:
MailHook.doMail(org.apache.james.protocols.smtp.SMTPSession, org.apache.mailet.MailAddress)


Copyright © 2010-2011 The Apache Software Foundation. All Rights Reserved.