Subject: spamtestbis - percent range

From: Cyrus Daboo <[email-masked]>
Date: Mon, 14 Mar 2005 15:33:12 -0500

At the meeting last week, in order to resolve the numeric range issue with 
the new ":percent" parameter, it was suggested that there be an alternative 
explicit test for messages that have not passed through a anti-spam tool. 
e.g. one could consider adding a new ":tested" parameter such that a 
spamtest with that argument returns false if the message has not been 
tested for spam:

    if not spamtest ":tested"
    {
        fileinto "INBOX.unclassified";
    }
    elsif spamtest :percent :value "ge"
                   :comparator "i;ascii-numeric" "30"
    {
        fileinto "INBOX.spam-trap";
    }

This ensures that the numeric range 0 - 100 can be used for messages that 
have been tested.

However, I believe the proposed ":tested" parameter is not needed, as the 
original spamtest test already returns a 'not tested' result for the 
numeric value "0". Thus a script can combine the non-percent test for "0", 
with a percent test:

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

Unless someone feels strongly that we need a ":tested" parameter, or 
proposes a different solution to the one above, I will make the proposed 
changes.

-- 
Cyrus Daboo

---

From: Alexey Melnikov <[email-masked]>
Date: Tue, 15 Mar 2005 09:43:39 +0000

Cyrus Daboo wrote:

> At the meeting last week, in order to resolve the numeric range issue 
> with the new ":percent" parameter, it was suggested that there be an 
> alternative explicit test for messages that have not passed through a 
> anti-spam tool. e.g. one could consider adding a new ":tested" 
> parameter such that a spamtest with that argument returns false if the 
> message has not been tested for spam:
>

I think :tested shouldn't be in quotes?

> This ensures that the numeric range 0 - 100 can be used for messages 
> that have been tested.
>
> However, I believe the proposed ":tested" parameter is not needed, as 
> the original spamtest test already returns a 'not tested' result for 
> the numeric value "0". Thus a script can combine the non-percent test 
> for "0", with a percent test:
>

I am not stuck on the idea of using ":tested", but it surely is more 
readable than that?

> proposes a different solution to the one above, I will make the 
> proposed changes.

---

From: Ken Murchison <[email-masked]>
Date: Tue, 15 Mar 2005 13:03:26 -0500

> I am not stuck on the idea of using ":tested", but it surely is more 

True, but presumably most folks will be using some sort of Sieve 
generator UI, not writing scripts by hand, so readability shouldn't be 
our main concern.  Just repeating what I've been told in the past.  ;)

-- 
Kenneth Murchison     Oceana Matrix Ltd.
Software Engineer     21 Princeton Place
716-662-8973 x26      Orchard Park, NY 14127
--PGP Public Key--    http://www.oceana.com/~ken/ksm.pgp

---

From: Tony Hansen <[email-masked]>
Date: Wed, 16 Mar 2005 08:14:06 -0500

Cyrus Daboo wrote:
> the original spamtest test already returns a 'not tested' result for the 
> numeric value "0". Thus a script can combine the non-percent test for 
> "0", with a percent test:

This should cover the case. How about adding a reminder note to this 
effect to the document?

	Tony Hansen
	[email-masked]

---

From: [email-masked]
Date: Wed, 16 Mar 2005 07:03:46 -0800 (PST)

> This should cover the case. How about adding a reminder note to this

Agreed. I have no problem with this test being somewhat obscure as long as the
specification talks about how to do it.

				Ned

---

From: Cyrus Daboo <[email-masked]>
Date: Wed, 16 Mar 2005 10:53:34 -0500

Hi [email-masked],

> specification talks about how to do it.

I tend to agree with this. Unless there are any strong arguments to the 
contrary I will go ahead and make this change. I will ensure that the issue 
of how best to handle 'untested' is clearly stated and will include 
examples.

-- 
Cyrus Daboo

---

From: "Mark E. Mallett" <[email-masked]>
Date: Fri, 18 Mar 2005 16:01:29 -0500

> specification talks about how to do it.

Seems reasonable to me too.

(On another note I'd still rather have something that maps the result to
a specified range, either in addition to :percent or as a replacement to
it.)

mm