Noel J. Bergman wrote:
I had been assuming BSF would be used to define how a new processor works. Right now we only have the LinearProcessor, which is defined a linear set of matcher/mailet pairs using XML. Nothing to do at all with per-user processing.Serge,In what context did you raise the issue of a matcher (or whatever) needing to split a Mail object with multiple recipients into multiple Mail objects? Are you skipping ahead to the issue of per-user mail processing? Just to do BSF, the Mail object could be exposed normally. With respect to per-user processing, my thought is that we could have a Mailet that looks at the recipient list and for each local recipient that has per-user configuration, posts a message clone for that user. That way we don't have do accommodate that behavior in all per-user matcher/mailet code, or have a base class with per-user behavior. But my initial reason for looking at BSF wasn't actually for per-user scripts. It was to allow mail admins more options for writing custom matchers/mailets. Sieve looks interesting. Has anyone implemented it in Java? Regardless of BSF integration, I could see how we might implement a SieveMailet. I don't think that we should replace our pipeline architecture with Sieve. Instead, if a site were to use Sieve extensively, they could simply have a smaller pipeline. I found GNU Sieve: http://www.gnu.org/software/mailutils/#sieve, and the "real" libSieve project: http://libsieve.sourceforge.net/. I suppose that we could look at porting the latter to Java. Sieve is definitely something to discuss regarding v3, as it might have some impact on the revised Mailet API. --- Noel
My pontification was because in the Mail processing, if a matcher "matches" only only a partial list of recipients, the processor has to duplicate the Mail object and split the recipient list across the two instances, according to who matched in the matcher. Theoretically, matchers are supposed to be allowed to return a Collection of recipient Collections, so then you would have to create triplicates, etc... of the message.
Yeah, I was thinking Sieve could be another kind of processor. For both BSF and Sieve, I was thinking you could define your matchers and mailets at the top of the processor with XML (like how you config servlets), and then use either BSF or Sieve to define the flow-control logic. While I think the extensibility is great, the flow-control logic with LinearProcessor is very limiting. Either BSF or Sieve would also let lots of "basic" matching and mailets to happen without needing to create code.
I haven't seen any implementations in the Java land... unfortunately most of these mail server-side things (including maildir, mdox, server-tailored javamail), etc... are all things (to my knowledge) we'll have to build ourselves. I know Eyebrowse can read maildir, and Danny said he knew someone who did a Java implementation of maildir, but I've yet to find very many people doing open source server-side mail stuff (outside of James).
--
Serge Knystautas
Loki Technologies - Unstoppable Websites
http://www.lokitech.com
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
