Gre7g Luterman <[EMAIL PROTECTED]> writes:
> On Mon, 02 Dec 2002 13:59:03 -0700, "Jason R. Mastaler"
> <[EMAIL PROTECTED]> wrote:
>
> > Is there something that you feel is missing from the current language?
>
> Err, umm, heh heh...
<grin>
> Please, everyone, do not jump all over my back for saying this.
No back jumping in this forum.
> Could the filters be done in Python code instead of a proprietary
> script syntax?
>
> I think it would be neat to write:
>
> if from-file("~/.tmda/lists/work"):
> deliver(dir="~/Maildir-work/")
>
> instead of:
>
> from-file ~/.tmda/lists/work deliver=~/Maildir-work/
It would be neat for you and me and other Python coders, but would be,
I think, noticeably more difficult for non-coders. Python, as clean
as it is, still has certain syntactic elements that don't really make
sense to non-coders, such as indentation and trailing colons. The
filter language today doesn't have conditionals, or nested block
structures, etc. and seems to be relatively easy for non-coders to
pick up. I'm not sure we want to require entry level Python skills
just to use TMDA.
> Plus we could check multiple conditions instead of just one.
I've been thinking about this for a while, but it hasn't been a
priority. I may have even mentioned it in the archives. I didn't
have any good reason to do this. It's definitely a possibility,
though.
> We could even do multiple things instead of just one thing, like
> perhaps deliver a message and bounce back a vacation message.
Multiple rule matches would allow exactly this.
> If it was done in Python, there would be no limit to how flexible it
> could be and what configuration variables we could test.
For the reasons above, I lean against requiring Python code, but ideas
on how to enhance the filter language have always been welcome. We
usually bash them around a bit in order to make sure we have the most
complete, simplest way to solve the problem, but the filter language
is not set in stone.
Tim
_________________________________________________
tmda-workers mailing list ([EMAIL PROTECTED])
http://tmda.net/lists/listinfo/tmda-workers