Hi,

Steve Brewin, you beat me with your HasMailAttributeWithValue by half an hour 
this friday ;-(
Well Vincenco also requested this one, so here goes.

HasMailAttributeWithValueRegex
<mailet match="HasMailAttributeWithValueRegex=attrName,<perl5 regex>" 
class="Null"/>

This matcher allows matching attribute values against a Perl5 style regular 
expression. All recipients are returned if a value is set for the specified 
attribute and that value matches the specified regular expression. A comma is 
used to separate the name of the atribute from the regular expression. Note: 
toString is called on the returned value object prior to matching against the 
specified pattern.

provided_matchers_2_1.xml.patch is a patch of the matchers description.
matcher.zip has the new file.

--S�ren

-- 
S�ren Hilmer, M.Sc.
R&D manager             Phone:  +45 70 27 64 00
TietoEnator IT+ A/S     Fax:    +45 70 27 64 40
Ved Lunden 12           Direct: +45 87 46 64 57
DK-8230 �byh�j          Email:  [EMAIL PROTECTED]
Index: src/xdocs/provided_matchers_2_1.xml
===================================================================
RCS file: /home/cvspublic/james-server/src/xdocs/provided_matchers_2_1.xml,v
retrieving revision 1.4
diff -u -w -b -r1.4 provided_matchers_2_1.xml
--- src/xdocs/provided_matchers_2_1.xml	19 Sep 2003 14:52:22 -0000	1.4
+++ src/xdocs/provided_matchers_2_1.xml	22 Sep 2003 07:42:57 -0000
@@ -73,6 +73,21 @@
 </code></pre>
 </p>
 </subsection>
+<subsection name="HasMailAttributeWithValueRegex">
+<p>Description: Matches mails that have the specified Mail Attribute and 
+a MailAttribute value that matches the specified regular expression.
+All recipients are returned.</p>
+<p>MailAttributes are types of Object whereas the value specified in the Matcher
+condition is of type String. The toString() method is used to obtain a String
+representation of the Mail Attribute value for matching. The regular
+expression must follow Perl5 syntax.</p>
+<p>Configuration string: The name of the Mail Attribute to be matched,  a comma
+and then the regular expression used to match the value against. For example:<br/>
+<pre><code>
+&lt;mailet match="HasMailAttributeWithValueRegex=name, regex" class=&quot;&lt;any-class&gt;&quot;&gt;
+</code></pre>
+</p>
+</subsection>
 <subsection name="HostIs">
 <p>Description: Matches mails that are sent to email addresses on hosts that are in the configuration list.  Only 
 recipients that are on one of the hosts are returned.</p>

Attachment: matcher.zip
Description: Zip archive

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to