james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Serge Knystautas <ser...@lokitech.com>
Subject Re: JAMES SMTP API sub-project proposal
Date Sat, 23 Nov 2002 02:49:52 GMT
Aaron.Knauf@vodafone.co.nz wrote:
> Hi all,
> I have come across several projects with requirements to receive and
> process inbound mail.  Currently, the options for implementing this (in
> java) are a JAMES mailet, or some kind of POP3/IMAP client.  However, I
> would like to have a third option of embedding a SMTP listener into my
> application.


I'd like to step back for a moment to make sure I understand what you're 
going for.  From what I can tell, the mailet API is exactly what you 
want, and James is (almost) what you need as-is.

Before I get into the embedded issue, I think you should consider how 
just an SMTP listener is not appropriate.  An SMTP listener pattern ties 
the processing of a message to the same thread as the incoming socket 
handler.  It would be better to use a socket handler in one thread 
receiving the message, and then notify another thread to start 
processing.  Pragmatically this means the socket handler receives the 
message and stores it in a spool and then triggers a processing thread. 
  This is (at a high level) how James works.

Also, SMTP is inherently asynchronous, so building an SMTP listener 
model that tries to require immediate processing is a bit unnecessary. 
If you need an immediate response from a request, a protocol like HTTP 
would probably serve you better.

So again from what I can tell, you want exactly James (minus possibly 
POP3, NNTP and future IMAP), except that you want to embed it into 
another application (much like how you could embed JBoss to get EJB 
support).  Unfortunately this is a limitation of the Avalon framework, 
and would be something I would like to see changed in Avalon.  I don't 
think it's worth building a new codebase to have an embedded mailet 
container, and I don't think James is heavy-weight... you just have to 
change/fix Avalon to be embeddable.

Serge Knystautas
Loki Technologies

To unsubscribe, e-mail:   <mailto:james-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:james-dev-help@jakarta.apache.org>

View raw message