org.apache.james.transport.matchers
Class CompareNumericHeaderValue

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

public class CompareNumericHeaderValue
extends GenericMatcher

Matches mails containing a header with a numeric value whose comparison with the specified value is true. If the header is missing in the message, there will be no match

Configuration string: The headerName, a comparison operator and the numeric headerValue to compare with, space or tab delimited.

The comparison operators are: <, <=, ==, >=, >; another set of operators is: LT, LE, EQ, GE, GT. Also the following operators are accepted: =<, =, =>.

Example:


    <mailet match="CompareNumericHeaderValue=X-MessageIsSpamProbability > 0.9" class="ToProcessor">
       <processor> spam </processor>
    </mailet>
 

Since:
2.2.0
Version:
CVS $Revision: 713949 $ $Date: 2008-11-14 07:40:21 +0000 (Fri, 14 Nov 2008) $

Constructor Summary
CompareNumericHeaderValue()
           
 
Method Summary
 void init()
           
 java.util.Collection match(Mail mail)
           
 
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

CompareNumericHeaderValue

public CompareNumericHeaderValue()
Method Detail

init

public void init()
          throws javax.mail.MessagingException
Overrides:
init in class GenericMatcher
Throws:
javax.mail.MessagingException
See Also:
GenericMatcher

match

public java.util.Collection match(Mail mail)
                           throws javax.mail.MessagingException
Specified by:
match in interface Matcher
Specified by:
match in class GenericMatcher
Throws:
javax.mail.MessagingException
See Also:
GenericMatcher


Copyright © 2008-2009 The Apache Software Foundation. All Rights Reserved.