org.apache.james.transport.matchers
Class RecipientIsRegex

java.lang.Object
  extended by org.apache.mailet.base.GenericMatcher
      extended by org.apache.mailet.base.GenericRecipientMatcher
          extended by org.apache.james.transport.matchers.RecipientIsRegex
All Implemented Interfaces:
org.apache.mailet.Matcher, org.apache.mailet.MatcherConfig

public class RecipientIsRegex
extends org.apache.mailet.base.GenericRecipientMatcher

Matches recipients whose address matches a regular expression.

Is equivalent to the SenderIsRegex matcher but matching on the recipient.

Configuration string: a regular expression.


 <mailet match="RecipientIsRegex=<regular-expression>" class="<any-class>">
 

The example below will match any recipient in the format user@log.anything


 <mailet match="RecipientIsRegex=(.*)@log\.(.*)" class="<any-class>">
 </mailet>
 

Version:
CVS $Revision: 717869 $ $Date: 2008-11-15 15:56:18 +0000 (Sat, 15 Nov 2008) $

Constructor Summary
RecipientIsRegex()
           
 
Method Summary
 void init()
           
 boolean matchRecipient(org.apache.mailet.MailAddress recipient)
           
 
Methods inherited from class org.apache.mailet.base.GenericRecipientMatcher
match
 
Methods inherited from class org.apache.mailet.base.GenericMatcher
destroy, getCondition, getMailetContext, getMatcherConfig, getMatcherInfo, getMatcherName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RecipientIsRegex

public RecipientIsRegex()
Method Detail

init

public void init()
          throws javax.mail.MessagingException
Overrides:
init in class org.apache.mailet.base.GenericMatcher
Throws:
javax.mail.MessagingException

matchRecipient

public boolean matchRecipient(org.apache.mailet.MailAddress recipient)
Specified by:
matchRecipient in class org.apache.mailet.base.GenericRecipientMatcher


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