Stefano Mazzocchi wrote:
> my proposal? much flatter with the use of <continue/> and <stop/>
>
> <mailmap>
>
> <mailbox name="*">
> <match id="spam">
> <stop/>
> </match>
> <match id="local">
> <continue/>
> </match>
> <mailet id="remoteDelivery"/>
> </mailbox>
I afraid I don't like the looks of any of this... I don't think you
should put much of any programming (procedural or declarative) in the
conf file, but as long as I can still do it my way, I don't care. I do
like the simpler look of Stefano's posting, probably because it is
pretty much what we have now. I think there are two main differences:
1. Stefano uses mailbox name="*" instead of matchClassname[=parameter],
which is removing the matching flexibility/hack (depending on your point
of view). I agree that with Stefano (and I guess Federico believes this
too) that I don't want any scripting language with OR or AND logic. In
fact, I would say I don't want any programmability in a conf file...
procedural or declarative...is this kind of programming really best
placed in conf files for a sysadmin to use?... this seems like a coders
stuff. Stefano's proposal though really constricts you. A good
situation the current conf file handles well is RecipientIsLocal.
Elsewhere in the mail server conf, you can define what domains are
"local" (i.e., if the server can't map the recipient to something, it's
an invalid recipient). This is half a dozen domains for me, and I'm
sure a decent ISP could have a few hundred. I'd hate to put this within
the servlet mailbox name="*@domain1.org,*@domain2.org,etc..." Also, it
might not be frequent, but you *might* want to check a different
attribute of the message than the recipient. I guess we could always
send it on * recipients and let the servlet do the processing, but I
prefer the current solution. IMO, you don't need nested structure...
one approach is to have servlets set their own flags and then have the
match conditions check for this... my first 4 mail servlets determine
whether this is a piece of SPAM, and if so, set the SPAM flag. I also
have a collection of actions to take on spam... I could send it to
/dev/null, put it in the SPAM folder of the recipient (assuming IMAP),
send it to [EMAIL PROTECTED], or whatever. In the conf file I
could match the servlet I wanted that day (depending on my mood) to
whether the SPAM flag was set. For the nested logic, it really seems
like something like a JAMES equivalent of a RequestDispatcher might be
appropriate... you want 1 servlet to forward the message to another
servlet. Any idea on how this would work? I guess it would have to
follow a similar model to this.
2. The other thing change is that it puts control for continued
execution in the hands of the conf file, rather than the servlets. I
don't really like the fact that mail servlets return Mail... I think
they should return a boolean, indicating whether or not the event has
been handled. I think it you want to reply to a message, instead of
sending a different Mail message out, you should add it to JAMES
(whether this is an easy method through the Mail API, I don't know if
you really need that). I don't think you should be able to insert a
message half way through the matching process (which is what happens
when you return a different Mail object).
I'm sorry I haven't been able to come up with any spam prevention use
cases, but I've been busy with work <whine>and somewhat discouraged
about JAMES because of the recently introduced bug that appends "." to
the end of messages.</whine> Dino has sent me some additional matches
and servlets to add to the CVS tree, and I'll get to those shortly.
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]