org.apache.james.protocols.smtp.core.fastfail
Class SpamTrapHandler
java.lang.Object
org.apache.james.protocols.smtp.core.fastfail.SpamTrapHandler
- All Implemented Interfaces:
- ProtocolHandler, Hook, RcptHook
public class SpamTrapHandler
- extends Object
- implements RcptHook
This handler can be used for providing a spam trap. IPAddresses which send emails to the configured
recipients will get blacklisted for the configured time.
|
Field Summary |
protected long |
blockTime
Default blocktime 12 hours |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
blockTime
protected long blockTime
- Default blocktime 12 hours
SpamTrapHandler
public SpamTrapHandler()
setSpamTrapRecipients
public void setSpamTrapRecipients(Collection<String> spamTrapRecips)
setBlockTime
public void setBlockTime(long blockTime)
doRcpt
public HookResult doRcpt(SMTPSession session,
org.apache.mailet.MailAddress sender,
org.apache.mailet.MailAddress rcpt)
- Description copied from interface:
RcptHook
- Return the HookResult after run the hook
- Specified by:
doRcpt in interface RcptHook
- Parameters:
session - the SMTPSessionsender - the sender MailAddressrcpt - the recipient MailAddress
- Returns:
- HookResult
- See Also:
RcptHook.doRcpt(org.apache.james.protocols.smtp.SMTPSession, org.apache.mailet.MailAddress, org.apache.mailet.MailAddress)
Copyright © 2010-2011 The Apache Software Foundation. All Rights Reserved.