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

spamtestbis - percent range

2005-03-14 13:33:15

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


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