Markus Gufler wrote:

The only thing that would be usefull is, if we can differentiate between
positive and negative results. Or in other words: If we want to combine or
analyze SpamChk results it's not so important if the result was +10 or +40.
But it's a big difference if the result was -10 or +10.


If you were willing to define the weights to result codes within your app, you could generate both positive and negative weights with different test names using a bitmask. It all depends on how variable your weighting system is and whether or not it mattered to step them (which it likely would not). For instance, you could do the following:

SPAMCHK-PASS(5) bitmask -4 "C:\IMail\Declude\spamchk.exe" 0 -5
SPAMCHK-PASS(3) bitmask -2 "C:\IMail\Declude\spamchk.exe" 0 -3
SPAMCHK-PASS(1) bitmask -1 "C:\IMail\Declude\spamchk.exe" 0 -1
SPAMCHK-FAIL(1) bitmask 1 "C:\IMail\Declude\spamchk.exe" 1 0
SPAMCHK-FAIL(3) bitmask 2 "C:\IMail\Declude\spamchk.exe" 3 0
SPAMCHK-FAIL(5) bitmask 4 "C:\IMail\Declude\spamchk.exe" 5 0
...


This is different from how Sniffer would work because it sounds like you only desire one final result, but you want to have it return a weight plus an indication of pass or fail. You would create a routine that mapped the desired weights to a whole bit value in the result code.

The idea of weight- and weight+ would be more appropriate to your needs however, and it would require no change on your part. Sorry to have stolen your thread with an alternative idea. Implementing weight- and weight+ would be much easier to implement it would seem, but limited in applicability.

I'm not sure if signed variables could do this for us by using a bitmask
tecnique. And I'm also not sure if it's tecnicaly possible to use bitmasks
since the current interface for external tests is the DOS exit-code. As I
know a value between 0 and 255 ... nothing more.


I believe that this is only a limitation of batch files with the ERRORLEVEL variable. While that would give you potentially 8 values, I don't believe that the limitation is anywhere near as severe if it exists at all with other environments. WScript seems to support 4-byte integers, although they are half negative and half positive so that might limit them to being 16 bits/bitmap results without a function to remap these in Declude, but I'm not sure if that is required, and I don't think that 16 positive and 16 negative results would be a hindrance for people.

Matt

--
=====================================================
MailPure custom filters for Declude JunkMail Pro.
http://www.mailpure.com/software/
=====================================================

---
[This E-mail was scanned for viruses by Declude Virus (http://www.declude.com)]

---
This E-mail came from the Declude.JunkMail mailing list.  To
unsubscribe, just send an E-mail to [EMAIL PROTECTED], and
type "unsubscribe Declude.JunkMail".  The archives can be found
at http://www.mail-archive.com.

Reply via email to