Hi, I am sure the customized class can be found by mailet container, because we did not see the ClassNotFoundException, but the NullPointerException was threw out.
Maybe I need to override other methods in AbstractStorageQuota? I just simply implement one method getQuota(). Thanks, Barry 2011-02-13 Barry Bai 发件人: agks mehx 发送时间: 2011-02-13 14:10:03 收件人: James Users List 抄送: 主题: Re: Re: How to do limitation space of mailbox The error log did not come through on the list so I can't see what's wrong. But can you try putting the full name of the matcher class, something like: com.yourcompany.something.StorageQuotaFixed? Also, please make sure that the jar file containing the "StorageQuotaFixed" class is copied to name_of_james_folder/conf/lib/name_of_jar_file.jar 2011/2/11 Barry Bai <[email protected]> > Hi Norman, I have simply extended from the class AbstractStorageQuota you > specified. After configured it in mailetcontainer.xml as below: > <mailet match="StorageQuotaFixed" class="ToProcessor"> > <processor>transport</processor> > </mailet> > But I met some errors as the error.log attached. > > I don't know where I made, could you please help me to point? > > Thanks. > > 2011-02-12 > ------------------------------ > Barry Bai > ------------------------------ > *发件人:* Norman Maurer > *发送时间:* 2011-02-11 18:32:44 > *收件人:* James Users List > *抄送:* > *主题:* Re: How to do limitation space of mailbox > Sorry I was wrong,, > there is an Abstract base class you could extend to build in such > aStorageQuotaFixed.java > > Matcher. But its far from optimal ... > > http://svn.apache.org/viewvc/james/server/trunk/mailets/src/main/java/org/apache/james/transport/matchers/AbstractStorageQuota.java?view=markup > Bye, > Norman > 2011/2/11 Eric Charles <[email protected]>: > > I suppose RecipientIsOverFixedQuota was not taken in trunk due to non > > optimal implementation (count on every call). > > But this could be a start for users who want to try and ameliorate it. > > > > So, Barry, simply take the 2.3.2 RecipientIsOverFixedQuota as an > > additional jar, configure the mailetcontainer.xml (which extends > > AbstractStorageQuota which extends AbstractQuotaMatcher), and tell us if > > this works for you :) > > > > Tks, > > > > Eric > > > > > > Do we need to simply use the 2.3.2 RecipientIsOverFixedQuota > > > > On 11/02/2011 07:10, Norman Maurer wrote: > >> Hi Eric, > >> > >> RecipeintIsOverFixedQuota is working with trunk.. Well to be exact, > >> kind of ;) It only respect messages in the INBOX and not in the > >> subfolders. It it need to count the size on every call so its > >> ultra-inefficent. > >> > >> Bye, > >> Norman > >> > >> 2011/2/11 Eric Charles <[email protected]>: > >>> (btw, 2.3.2 RecipientIsOverFixedQuota won't help you much - you really > >>> need to develop it from scratch). > >>> > >>> > >>> On 11/02/2011 06:54, Eric Charles wrote: > >>>> Hi, > >>>> > >>>> The documentation to develop custom mailet/matcher is here > >>>> http://james.apache.org/server/3/dev-extend-mailet.html > >>>> http://james.apache.org/server/3/dev-extend-matcher.html > >>>> (see also http://markmail.org/thread/346wzxsksdvhlnee for the mailet > >>>> package specification change in M3) > >>>> > >>>> The mailet/matcher configuration occurs in mailtecontainer.xml > >>>> http://james.apache.org/server/3/config-mailetcontainer.html > >>>> > >>>> The RecipientIsOverFixedQuota matcher is mentioned on > >>>> http://james.apache.org/server/3/dev-provided-matchers.html but is no > >>>> more in 3.0 trunk. > >>>> You can view RecipientIsOverFixedQuota 2.3.2 source on > >>>> > >>>> > >>>> Hope this helps, > >>>> > >>>> Eric > >>>> > >>>> > >>>> On 11/02/2011 03:42, Barry Bai wrote: > > >>>>> I have seen some examples with the url you provided, but I can't still > >>>>> make clear the process of mailet and matcher or how to invoke them, > >>>>> etc. I am looking foward your details. > >>>>> > > >>>>> I am trying to write a "quota matcher" of James3 for per user, it is > >>>>> mentioned by Eric. it is very urgent for me, so I just do some > >>>>> researching on it. > >>>>> > >>>>> Thanks. > >>>>> 2011-02-11 > >>>>> > >>>>> > >>>>> > >>>>> Barry Bai > >>>>> > >>>>> > >>>>> > >>>>> 发件人: agks mehx > >>>>> 发送时间: 2011-02-11 10:20:38 > >>>>> 收件人: James Users List > >>>>> 抄送: > >>>>> 主题: Re: Re: How to do limitation space of mailbox > >>>>> > > >>>>> A bit difficult to read but if you work through these examples should > >>>>> give > >>>>> you everything you need: > >>>>> > http://svn.apache.org/viewvc/james/server/trunk/mailets/src/main/java/org/apache/james/transport/mailets/ > > >>>>> If you need help with configuration see emails about mailets on this > >>>>> list in > >>>>> the last couple of days. > > >>>>> I'm sure eventually there will be better documentation/tutorials but > >>>>> for now > >>>>> this is all I am aware of. > >>>>> On Thu, Feb 10, 2011 at 3:37 PM, Barry Bai <[email protected] > > wrote: > > >>>>>> Hi Eirc, could you please provide some tutorial or other material about > > >>>>>> developing customized mailet and matcher in James 3.0? I can just find > >>>>>> some > > >>>>>> technical material for James 2 in the official website and they should > >>>>>> not > >>>>>> be applicable for James 3, right? > >>>>>> > >>>>>> Thanks > >>>>>> 2011-02-11 > >>>>>> > >>>>>> > >>>>>> > >>>>>> Barry Bai > >>>>>> > >>>>>> > >>>>>> > >>>>>> 发件人: Eric Charles > >>>>>> 发送时间: 2011-02-10 15:36:40 > >>>>>> 收件人: James Users List > >>>>>> 抄送: > >>>>>> 主题: Re: How to do limitation space of mailbox > >>>>>> > >>>>>> Hi, > > >>>>>> There was a "quota matcher" developed for James 2.2, but that is not > >>>>>> supported in james 3.0 mailbox (the way mails are persisted in > >>>>>> completely different in 3.0). > >>>>>> To my knowledge, we don't have an out-of-the-box solution to support > >>>>>> quota in 3.0. > >>>>>> You could open a JIRA, trying to express your requirements : is it > > >>>>>> quota per user or per mailbox (or both?), do you see it more as part of > >>>>>> the mailbox or the server project, is there a default value always > >>>>>> applicable,... > > >>>>>> If you don't have a more precise idea, simply open it without detail. > >>>>>> Tks, > >>>>>> Eric > >>>>>> On 9/02/2011 10:25, Barry Bai wrote: > >>>>>>> Hi, in James V3, how to limit space of mailbox for one user? > >>>>>>> > >>>>>>> Thanks a lot. > >>>>>>> > >>>>>>> 2011-02-09 > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> Barry Bai > >>>>>>> > > >>>>>> --------------------------------------------------------------------- > >>>>>> To unsubscribe, e-mail: [email protected] > >>>>>> For additional commands, e-mail: [email protected] > >>>>>> > >>> > >>> --------------------------------------------------------------------- > >>> To unsubscribe, e-mail: [email protected] > >>> For additional commands, e-mail: [email protected] > >>> > >>> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: [email protected] > >> For additional commands, e-mail: [email protected] > >> > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [email protected] > > For additional commands, e-mail: [email protected] > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] >
