james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Bagnara <apa...@bago.org>
Subject Re: Removing spam after 15 days
Date Thu, 27 Sep 2007 07:31:03 GMT
Kevin Jackson ha scritto:
> Hi Norman,
>> what about writing a "small" service which get wired via assembly.xml ?
>> So it will automatic startet via james and do the job until james is
>> stopped..
>> Does this sound better ?
> This does sound like the kind of thing we want, which apis should I be
> looking at (presumably not the mailet api)
>> If you have questions i can probaly assist you...
> Do you have a skeleton code for a service and the assembly wiring?
> Kev

Look at the fetchmail scheduler component:

This is the avalon component descriptor.
You notice that it declares
org.apache.avalon.cornerstone.services.scheduler.TimeScheduler as a

You will also have to add a dependency on the repository (or the store
that allow you to access the repository) if you want to work with mails.

Then in the code it takes the dependency and it use the TimeScheduler to
schedule its own tasks:

The it's added to the assembly to make it active and scheduling:

It's easier with an external cron and direct mysql commands, but this is
more integrated.


To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org

View raw message