You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Phillip Rhodes <rh...@gmail.com> on 2012/02/28 01:02:20 UTC
matcher config in v3?
Hi everyone,
I am trying to configure a matcher and a mailet in mailetcontainer.xml
and james is throwing an exception with my matcher:
Caused by: org.apache.mailet.MailetException: Could not load mailet
(com.spotmouth.james.MailingListMatcher);
nested exception is:
java.lang.ClassCastException: com.spotmouth.james.MailingListMatcher
cannot be cast to org.apache.mailet.Mailet
I would super-appreciate a simple example of this configuration.
Thanks for your help
Phillip
Here are some other facts.
com.spotmouth.james.MailingListMailet extends GenericMailet
com.spotmouth.james.MailingListMatcher extends GenericMatcher
Matcher:
<processors>
<processor state="root" enableJmx="true">
<mailet match="All" class="com.spotmouth.james.MailingListMatcher"/>
<snip!>
</processor>
</processors>
Mailet:
<processor state="transport" enableJmx="true">
<mailet match="MailingListMatcher"
class="com.spotmouth.james.MailingListMailet"/>
<snip!>
</processor>
</processors>
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org
Re: matcher config in v3?
Posted by Phillip Rhodes <rh...@gmail.com>.
Thanks.
Here is how I got it to load (work)
<processor state="transport" enableJmx="true">
<mailet match="com.spotmouth.james.MailingListMatcher"
class="com.spotmouth.james.MailingListMailet"/>
....
On Tue, Feb 28, 2012 at 5:28 AM, Eric Charles <er...@apache.org> wrote:
> Hi,
>
> <mailet match="All" class="com.spotmouth.james.MailingListMatcher"/>
> is not good.
>
> The class attribute must be a Mailet, no a Matcher (so read the mailet class
> is applied for mails matching the defined matcher).
>
> Thx,
> Eric
>
> On 28/02/12 01:02, Phillip Rhodes wrote:
>>
>> Hi everyone,
>> I am trying to configure a matcher and a mailet in mailetcontainer.xml
>> and james is throwing an exception with my matcher:
>> Caused by: org.apache.mailet.MailetException: Could not load mailet
>> (com.spotmouth.james.MailingListMatcher);
>> nested exception is:
>> java.lang.ClassCastException:
>> com.spotmouth.james.MailingListMatcher
>> cannot be cast to org.apache.mailet.Mailet
>>
>>
>> I would super-appreciate a simple example of this configuration.
>> Thanks for your help
>> Phillip
>>
>>
>> Here are some other facts.
>> com.spotmouth.james.MailingListMailet extends GenericMailet
>>
>> com.spotmouth.james.MailingListMatcher extends GenericMatcher
>>
>>
>> Matcher:
>> <processors>
>> <processor state="root" enableJmx="true">
>> <mailet match="All" class="com.spotmouth.james.MailingListMatcher"/>
>>
>> <snip!>
>> </processor>
>> </processors>
>>
>>
>> Mailet:
>> <processor state="transport" enableJmx="true">
>> <mailet match="MailingListMatcher"
>> class="com.spotmouth.james.MailingListMailet"/>
>> <snip!>
>> </processor>
>> </processors>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>> For additional commands, e-mail: server-user-help@james.apache.org
>>
>
> --
> eric | http://about.echarles.net | @echarles
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org
Re: matcher config in v3?
Posted by Eric Charles <er...@apache.org>.
Hi,
<mailet match="All" class="com.spotmouth.james.MailingListMatcher"/>
is not good.
The class attribute must be a Mailet, no a Matcher (so read the mailet
class is applied for mails matching the defined matcher).
Thx,
Eric
On 28/02/12 01:02, Phillip Rhodes wrote:
> Hi everyone,
> I am trying to configure a matcher and a mailet in mailetcontainer.xml
> and james is throwing an exception with my matcher:
> Caused by: org.apache.mailet.MailetException: Could not load mailet
> (com.spotmouth.james.MailingListMatcher);
> nested exception is:
> java.lang.ClassCastException: com.spotmouth.james.MailingListMatcher
> cannot be cast to org.apache.mailet.Mailet
>
>
> I would super-appreciate a simple example of this configuration.
> Thanks for your help
> Phillip
>
>
> Here are some other facts.
> com.spotmouth.james.MailingListMailet extends GenericMailet
>
> com.spotmouth.james.MailingListMatcher extends GenericMatcher
>
>
> Matcher:
> <processors>
> <processor state="root" enableJmx="true">
> <mailet match="All" class="com.spotmouth.james.MailingListMatcher"/>
>
> <snip!>
> </processor>
> </processors>
>
>
> Mailet:
> <processor state="transport" enableJmx="true">
> <mailet match="MailingListMatcher"
> class="com.spotmouth.james.MailingListMailet"/>
> <snip!>
> </processor>
> </processors>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
--
eric | http://about.echarles.net | @echarles
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org