Subject: Re: Minor issue in draft-ietf-sieve-spamtestbis-02.txt

From: "Mark E. Mallett" <[email-masked]>
Date: Thu, 1 Jun 2006 16:33:10 -0400

On Tue, May 30, 2006 at 10:08:23AM -0700, Ned Freed wrote:
> 
> I just noticed that although the draft makes heavy use of the relational :value
> match type, it says nothing about how :count should be handled. I suggest
> adding a note to say that the "count value" is 1 if there's a spamtest or
> virustest result to check, 0 otherwise.

I like that... I could swear that had been suggested at some point but
can't find it, so probably not.

mm

---

From: Ned Freed <[email-masked]>
Date: Thu, 01 Jun 2006 14:07:26 -0700 (PDT)

> can't find it, so probably not.

Interesting. I too have a vague recollection that this came up before, but a
quick search of the list archives failed to find any references. Perhaps at a
WG meeting or bar-BOF?

				Ned

---

From: Cyrus Daboo <[email-masked]>
Date: Thu, 01 Jun 2006 19:53:27 -0400

Hi Ned,

--On June 1, 2006 2:07:26 PM -0700 Ned Freed <[email-masked]> wrote:

>> > I just noticed that although the draft makes heavy use of the
>> > relational :value match type, it says nothing about how :count should
>> > be handled. I suggest adding a note to say that the "count value" is 1
>> > if there's a spamtest or virustest result to check, 0 otherwise.
>
> Interesting. I too have a vague recollection that this came up before,
> but a quick search of the list archives failed to find any references.
> Perhaps at a WG meeting or bar-BOF?

Interesting - I can't ever recall that being discussed before, at least in 
my presence :-). But it does provide an interesting solution to the 
'untested' case which is somewhat awkward with the :percent option.

So here is a proposal: remove the current "untested" return value and 
instead require scripts to use :count to determine that case with the 
behavior of :count being defined as Ned suggested. An example:

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

           if spamtest :count "eq"
                       :comparator "i;ascii-numeric" "0"
           {
               fileinto "INBOX.unclassified";
           }
           elsif spamtest :value "lt"
                       :comparator "i;ascii-numeric" "37"
           {
               fileinto "INBOX.not-spam";
           }
           else
           {
               fileinto "INBOX.spam-trap";
           }

-- 
Cyrus Daboo

---

From: Alexey Melnikov <[email-masked]>
Date: Fri, 02 Jun 2006 14:25:29 +0100

Cyrus Daboo wrote:

> Interesting - I can't ever recall that being discussed before, at 
> least in my presence :-). But it does provide an interesting solution 
> to the 'untested' case which is somewhat awkward with the :percent 
> option.
>
> behavior of :count being defined as Ned suggested.

This looks fine to me.

Just to clarify: "spamtest :value" would return 0 for both "untested" 
and "definitely non spam" case?