Consult mailetcontainer-template.xml in GIT to get some examples and hints.
Changes between 3.0-M2 and 3.0-beta3:
This configuration block is defined by the mailserver tag. All administrators need to adjust the mailserver block upon installation.
Consider the following simple mailet tag:
<mailet match="RemoteAddrNotInNetwork=127.0.0.1" class="ToProcessor">The mailet tag has two required attributes, match and class.
The match attribute is set to the value of the specific Matcher class to be instantiated with a an optional argument. If present, the argument is separated from the Matcher class name by an '='. Semantic interpretation of the argument is left to the particular mailet.
The class attribute is set to the value of the Mailet class that is to be instantiated.
Finally, the children of the mailet tag define the configuration that is passed to the Mailet. The tags used in this section should have no attributes or children. The names and bodies of the elements will be passed to the mailet as (name, value) pairs.
So in the example above, a Matcher instance of RemoteAddrNotInNetwork would be instantiated, and the value "127.0.0.1" would be passed to the matcher. The Mailet of the pair will be an instance of ToProcessor, and it will be passed the (name, value) pair of ("processor", "spam").
Apache James Server includes a number of pre-packaged Mailets and Matchers. A list of provided Mailets may be found here. A list of provided Matchers may be found here.