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 Ajay Chitre <aj...@google.com> on 2008/07/22 20:32:37 UTC

Application architecture for a James based solution

Hello,

We are developing a business application based on James for which we are
considering the following architectural ideas/rules:

1)  Do not put any business logic in the Mailets, for the same reason as why
we don't put any business logic in the Servlets.
2)  When a Mailet is called, it will package the information from the
incoming Mail object into a special "Business Object" (BO).  The Mailet may
also retrieve data from some other sources, such as LDAP, and put it in the
BO.
3)  Once the BO is built, the Mailet will pass it on to a Bean.  This bean
will act as a Session Facade that will control the overall flow of the use
case.  It will provide services such as "Transaction Management" etc.
4)  This Bean will be instantiated as a Singleton.
5)  We will use EasyMock to create mock BOs so that we can write stand-alone
unit tests that don't require us to start/stop James.


I am assuming this is a fairly standard architecutre.  Any pros/cons?  Any
other ideas?

Thanks for your time.

RE: Bayesian Mailet

Posted by Carl Vorster <cc...@propartners.co.za>.
Hi,

No feedback for me?

Thanks

Carl

-----Original Message-----
From: Carl Vorster [mailto:ccnews@propartners.co.za] 
Sent: Wednesday, July 30, 2008 9:38 PM
To: 'James Users List'
Subject: Bayesian Mailet

Hi All,

I've got a couple of questions regarding the Bayesian Analysis Mailet and
process.

I've configured the BayesianAnalysisFeeder for ham and spam as well as the
BayesianAnalysis mailet.
I can feed ham and spam and I see data in the db tables.

The analysis mailet is also working as I can see mails in deadletter/spam.

My questions are:
1. What's the process being followed with the spam in deadletter/spam, do
you check in on a regular basis for mails that's being flagged as spam
that's not, or just delete everything on a regular basis, push it to null?

2. How do you get mail that's in deadletter/spam back to the user's inbox if
it's valid mail. Do you delete all the valid spam and use FromRepository to
get it out?

3. Can I create a spam mailbox for each user and push the spam into that
mailbox for them to browse if they want to; what's the best way to do this,
using a Forward mailet in the spam processor; is this a good idea at all?

4. When you feed ham and spam, you'll feed all mails that you receive and
wasn't picked up by the BayesianAnalysis mailet as spam to the spam feeder,
but how many and how often do you feed valid mails to the ham feeder, do you
initially feed all valid mails, or only some - are there best practices I
can follow here?

Any other tips, tricks and traps that I haven't thought off yet or ran into
will also be greatly appreciated.

Thanks

Carl








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


Re: Application architecture for a James based solution

Posted by Bernd Fondermann <bf...@brainlounge.de>.
Ajay Chitre wrote:
> Hello,
> 
> We are developing a business application based on James for which we are
> considering the following architectural ideas/rules:
> 
> 1)  Do not put any business logic in the Mailets, for the same reason as why
> we don't put any business logic in the Servlets.
> 2)  When a Mailet is called, it will package the information from the
> incoming Mail object into a special "Business Object" (BO).  The Mailet may
> also retrieve data from some other sources, such as LDAP, and put it in the
> BO.
> 3)  Once the BO is built, the Mailet will pass it on to a Bean.  This bean
> will act as a Session Facade that will control the overall flow of the use
> case.  It will provide services such as "Transaction Management" etc.
> 4)  This Bean will be instantiated as a Singleton.
> 5)  We will use EasyMock to create mock BOs so that we can write stand-alone
> unit tests that don't require us to start/stop James.
> 
> 
> I am assuming this is a fairly standard architecutre.  Any pros/cons?  Any
> other ideas?

Sounds pretty straightforward.

Additionally, you might want to execute your business logic in a 
different thread than the mail processing to avoid that the mailet 
processing is on hold as long as you BL is running - if the mailet does 
not depend on the result  the business logic is going to yield.

   Bernd


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


Bayesian Mailet

Posted by Carl Vorster <cc...@propartners.co.za>.
Hi All,

I've got a couple of questions regarding the Bayesian Analysis Mailet and
process.

I've configured the BayesianAnalysisFeeder for ham and spam as well as the
BayesianAnalysis mailet.
I can feed ham and spam and I see data in the db tables.

The analysis mailet is also working as I can see mails in deadletter/spam.

My questions are:
1. What's the process being followed with the spam in deadletter/spam, do
you check in on a regular basis for mails that's being flagged as spam
that's not, or just delete everything on a regular basis, push it to null?

2. How do you get mail that's in deadletter/spam back to the user's inbox if
it's valid mail. Do you delete all the valid spam and use FromRepository to
get it out?

3. Can I create a spam mailbox for each user and push the spam into that
mailbox for them to browse if they want to; what's the best way to do this,
using a Forward mailet in the spam processor; is this a good idea at all?

4. When you feed ham and spam, you'll feed all mails that you receive and
wasn't picked up by the BayesianAnalysis mailet as spam to the spam feeder,
but how many and how often do you feed valid mails to the ham feeder, do you
initially feed all valid mails, or only some - are there best practices I
can follow here?

Any other tips, tricks and traps that I haven't thought off yet or ran into
will also be greatly appreciated.

Thanks

Carl








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


Re: Application architecture for a James based solution

Posted by Danny Angus <da...@apache.org>.
> I am assuming this is a fairly standard architecutre.  Any pros/cons?  Any
> other ideas?

Alternatively you could package the information from the mail object
into a JMS message,publish it to a queue acessable by a J2EE server
and have it handled by a Message Driven Bean, this can be useful when
you want to incorporate email into a J2EE system, because it lets you
use James as the gateway, but keeps all of your processing logic in
your J2EE applications.

d.

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