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 Brent Johnson <bl...@gmail.com> on 2004/06/23 21:21:14 UTC

Starting from another Java App

I'm trying to find a way to try and embed James as part of my Java
application (my app uses James as a POP3 proxy for spam filtering). 
Right now I just have james installed and configured as a completely
separate application.  I've written some of my own custom Bayesian
matchers and it works great.

But I can't expect my end users to be savvy enough to be able to
download James and configure it themself.  I'd like to write some
scripts to configure FetchMail to pull down POP3 data and then deliver
those to local POP accounts.  When my app starts it can simply kick
off James.. and when shutdown it can cleanly shut James down.

I've done the configuring manually and I've got it working as a proxy.
 But I was wondering if anyone has any pointers on how I should go
about starting/stopping james from my Java app.. and what files I need
to package together to get it to work... i.e. I wont need the bin
directory and some others.  Just not sure the minimal files I'll need
to do this.

Thanks,

- Brent

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


RE: Starting from another Java App

Posted by Intelekia <in...@intelekia.com>.
Hi Brent,

I don't think you can do that right now in an easy way (experts, please tell
if I am wrong). Precisely one of the hot topics in the development team
seems to be whether to head James towards a "service" (as you require) or
"single-application" type of architecture.

What I would suggest is turning the problem around: can you turn your
application into a service? That is, would it be interesting for you to
embed your application into James, either:
	- as a new mailet or series or mailets
	- as a new block or series of blocks 
	- separate, but using RMI or other for inter-process communication. 

I have done that myself and works fine and could give you pointers if
needed.

Br,

Isaac.

-----Original Message-----
From: Brent Johnson [mailto:bljohnson@gmail.com] 
Sent: miƩrcoles, 23 de junio de 2004 22:21
To: server-user@james.apache.org
Subject: Starting from another Java App

I'm trying to find a way to try and embed James as part of my Java
application (my app uses James as a POP3 proxy for spam filtering). 
Right now I just have james installed and configured as a completely
separate application.  I've written some of my own custom Bayesian
matchers and it works great.

But I can't expect my end users to be savvy enough to be able to
download James and configure it themself.  I'd like to write some
scripts to configure FetchMail to pull down POP3 data and then deliver
those to local POP accounts.  When my app starts it can simply kick
off James.. and when shutdown it can cleanly shut James down.

I've done the configuring manually and I've got it working as a proxy.
 But I was wondering if anyone has any pointers on how I should go
about starting/stopping james from my Java app.. and what files I need
to package together to get it to work... i.e. I wont need the bin
directory and some others.  Just not sure the minimal files I'll need
to do this.

Thanks,

- Brent

---------------------------------------------------------------------
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: Starting from another Java App

Posted by Brent Johnson <bl...@gmail.com>.
On Sat, 26 Jun 2004 21:46:13 -0700, Noel J. Bergman <no...@devtech.com> wrote:
> > I've written some of my own custom Bayesian matchers and it works great.
> 
> Anything you want to share?

If anyone's interested.. sure.  It's a matcher that uses Classifier4J
to classify email subject and body content as spam/ham... it's really
pretty simple.  But you'd have to figure out a way to classify the
emails (unless you want my whole app that does it).  I wrote a web
based app that uses the James JDBC stores to handle email.  It uses
James with Fetchmail to pull messages.. then applies a filter that
tests with a bayesian classifier (Classifier4J) and moves it to an
alternate local address if its matched.

The web app allows you to mark messages as spam and remove messages
that were shown as being spam (anything above a .9 bayes match gets
junked).  Also does the normal email stuff.. reading, composing,
deleting, etc.  From there all you have to do is fire up a POP3
client.. point it at the machine running the app.. and all the emails
get pulled.. spam free (if you do a good job at marking spam).

> > But I can't expect my end users to be savvy enough to be able to
> > download James and configure it themself.
> 
> Well, you could preconfigure it and have them download your distribution.
> You might also talk with Stephen McConnell about how Merlin might fit your
> needs, once future versions of James are able to run on it.

Yeah I was thinking of just bundling James with an "email-enabled"
version of my app.. a little larger but includes James with Fetchmail
to act as a pop3 proxy that can do a little spam matching.  I could
probably just write a web based module to manipulate the James config
files to add/remove/change pop3 information in the conf files.

Thanks,

- Brent

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


RE: Starting from another Java App

Posted by "Noel J. Bergman" <no...@devtech.com>.
> I'm trying to find a way to try and embed James as part of my Java
> application (my app uses James as a POP3 proxy for spam filtering).

See the existing documentation for running with Tomcat and JBoss.

> I've written some of my own custom Bayesian matchers and it works great.

Anything you want to share?

> But I can't expect my end users to be savvy enough to be able to
> download James and configure it themself.

Well, you could preconfigure it and have them download your distribution.
You might also talk with Stephen McConnell about how Merlin might fit your
needs, once future versions of James are able to run on it.

> I was wondering if anyone has any pointers on how I should go
> about starting/stopping james from my Java app.

java.lang.Runtime to start and java.net.Socket to stop.

	--- Noel


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