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

Re: spamtest vs. "relational" extension

2002-07-29 06:13:22

I have one general question here: if the result of a test is a numeric
type
('size' being the best example right now) then should relational be used
or
should we have a set of numeric comparators? Obvously 'size' has a set of
comparators already, and I was basing spamtest on that. However, the
existing set of comparators (':over' ':under') did not seem sufficient for
the type of tests one would want to do with spamtest results, hence I
introduced a new set.

Initially I found over/under a pain in the ass, but you can actually do all
you need to with over and under, so perhaps we should just stick with over
and under rather than have over/under for size, then gt/lt/eq/etc for
spamtest/virustest?

if (spamtest :gt 3) => if spamtest :over 3
if (spamtest :ge 3) => if not spamtest :under 3
if (spamtest :lt 3) => if spamtest :under 3
if (spamtest :le 3) => if not spamtest :over 3
if (spamtest :eq 3) => if allof (not spamtest :over 3, not spamtest :under
3)
if (spamtest :ne 3) => if not allof (not spamtest :over 3, not spamtest
:under 3)

Clearly the last two are the most grubby, and I'd happily add some :equals
syntax (which would also be available to size), but we can use the not
operator to reverse the gt/le, ge/lt, eq/ne pairs.  Having 6 new syntactical
elements seems overkill...

(Incidentally, the example in the doc has () round the test, which doesn't
seem to be Grammatical Sieve...)

Personally I would prefer to stick with the numeric tests to avoid
complexity or dependence on relational. I think Jutta's argument for
having
some kind of 'null' result rather than assigning a numeric value for that
does have merit - so maybe that does justify use of relational.

I think I'd prefer it to be numeric.  Otherwise testing becomes too messy.

Perhaps a separate symbol should be made availalbe describing the evidence
for why the spam/virus code was given, ie it might say "Body part 2 contains
Klez virus", or "No to field present" etc.  This string could be used in the
reject message if required, or tested against when/if we get round to
implementing a variable mechanism that has been discussed in the imap flags
thread?

I agree that we definately need to have some way of saying "service is not
available or malfunctioning".  We need to know if the spam/virus service is
up, if it is not, then the script can decide to 4xx the mail or 5xx the
mail.  Which kinda points out that we have no action to "4xx" the mail?  Or
are we better off handling this before we execute the Sieve engine?

I've been going through stress in this very area with our Virus Scanner
integration, and it seems we need to know when the scan failed, if the scan
failed due to transient error (and we should retry later), or if the scan
failed due to permanent error (bug in scanner, content is unscannable).
Then for either case, the administrator would like to have control over what
to do in each case, to 2xx/4xx/5xx.  Currently these options are having to
go in the general config, but it seems like it might be possible to put this
in the Sieve script too?  If you don't virus scan your mail, then you don't
care if the virus scanning service is down, so don't want your mail being
4xxed until it comes back up?

Nigel