org.apache.james.mailet.standard.matchers
Class SenderHostIs

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

public class SenderHostIs
extends GenericMatcher

Checkes the sender's displayed domain name against a supplied list.

Sample configuration:


 <mailet match="SenderHostIs=domain.com" class="ToProcessor">
   <processor> spam </processor>
 </mailet>
 

Version:
1.0.0, 2002-09-10

Constructor Summary
SenderHostIs()
           
 
Method Summary
 void init()
          Initialize the mailet.
 Collection<MailAddress> match(Mail mail)
          Takes the message and checks the sender (if there is one) against the vector of host names.
 
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

SenderHostIs

public SenderHostIs()
Method Detail

init

public void init()
Initialize the mailet.

Overrides:
init in class GenericMatcher

match

public Collection<MailAddress> match(Mail mail)
Takes the message and checks the sender (if there is one) against the vector of host names. Returns the collection of recipients if there's a match.

Specified by:
match in interface Matcher
Specified by:
match in class GenericMatcher
Parameters:
mail - the mail being processed
Returns:
java.util.Collection - the recipients that the mailet container should have the mailet affect.


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