ietf-mta-filters
[Top] [All Lists]

Re: spamtestbis

2005-02-08 13:26:46

On Mon, Feb 07, 2005 at 02:19:47PM -0000, Nigel Swinson wrote:
BTW I think this is the kind of extension that could be solved with
better fundamental language elements and/or better coordination between
language extensions.

For example, one could build on the proposed "variables" extension by
imagining a new set of read-only variables within specific namespaces
(per the old namespace idea, a la dates and timezones).  Imagine:

   require "variables";
   require [ "relational", "comparator-i;ascii-numeric" ];

   set "spamval" "${spamtest::value}"
   set "spampct" "${spamtest::pctvalue}"
   set "spamtext" "${spamtest::text}"

   if string :value "ge"
             :comparator "i;ascii-numeric"
     "${spamval}" "3" { ... }
   if string :value "ge"
             :comparator "i;ascii-numeric"
             "${spamtest::pctvalue}" "30" { ... }

Time travel might be required though.

Or better still why not just refer to the variables direct in the string test?

    if string :value "ge"
              :comparator "i;ascii-numeric"
              "${spamtest.value}" "3" { ... }

My second example quoted above had that (but with improper namespace
syntax-- somehow I thought that namespaces had been removed and
completely glossed over them in the latest variables draft).


One problem here is that it costs resources to obtain the spam score
and virus score, and part of the reason you might be using sieve would
be to refine which messages would result in those resources being used
up.  So you might still want to somehow specify or recommend that the
implementation make the variables in the namespace available in a lazy
fashion.

Indeed, that's what I had in mind as well in that particular example.

mm


<Prev in Thread] Current Thread [Next in Thread>