I've added a very simple servlet that returns the current time on the
server, back to the sender. Shows how to create a very simple response
type message. Possibly some of the code in this could be added to the
Mail object as a "respond()" method so it's easier to write this kind of
servlet (see for yourself... the code isn't complicated, but is a little
ugly).
Also, I looked in JamesSpoolManager, and it seems we don't conveniently
support using servlets from multiple packages. For instance, most of my
servlets might be in the default org.apache.james.transport.servlet
package, but a particular listserv I write might pull it's member list
from an internal relational database, so I would want to put that in a
com.lokitech.something package. I thought about supporting multiple
servlets rootpath="...", but the order of servlets is significant, so
this doesn't seem to work. Is the rootpath really helping things that
much? I think anybody using this beyond initial testing will want to
write their own servlets and end up removing the rootpath prefix.
What's even worse is that if I altogether remove the rootpath attribute,
JAMES crashes upon startup. Should we move to an aliasing approach
where we define what classes map to what names and parameters, and then
use aliases as we're defining routing information. As we start adding
numerous servlets to a mail server, it might be nice to keep servlet
configuration and ordering/matching separate. Any opinions?
One final note... I realized with the advent of these response servlets,
we'll need to develop the ability to block a clever DOS... This servlet
finds the sender and generates a message back to that sender. If I had
sneakly done MAIL FROM: <time@localhost>, RCPT TO: <time@localhost>, the
message would repeatedly deliver back on itself I suspect. Not sure the
best way to prevent this...
Serge Knystautas
Loki Technologies
http://www.lokitech.com/
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/>
Problems?: [EMAIL PROTECTED]