>What methods if any do users of declude have to create there own tests.
>We're thinking about creating a "Repetition and Prediction" test  using a
>custom engine.
>
>Could you provide some details on how Declude would call a test and what it
>would expect back?

There are two ways that you can do this.  One is using DNS, like many of 
the other spam tests.  You can accept the IP address of a remote mail 
server, or domain that the E-mail was received from, and return a value to 
determine whether or not it is considered spam.

The other option (which looks like what you are considering) is to use 
Declude's (undocumented) "external" test type:

---

Here's what you need to do:

Step 1:  Create a program.  Declude will send it the name of the spool file 
as a parameter, and the program needs to return an exit code of "0" if the 
E-mail is not spam, or any other code if it is spam.

Step 2:  Define one or more tests in Declude.  To do this, add a line in 
\IMail\Declude\global.cfg in the format "TESTNAME external c:\filename.exe 
nonzero".  TESTNAME is the name of the test, "external" lets Declude know 
that you want an external program run, then you have the path/name of the 
file (with no spaces in it), and then "nonzero" to indicate that any exit 
code besides 0 indicates that the E-mail is spam (or, you can give declude 
a specific exit code to look for, for example, "TESTNAME external 
c:\filename.exe 1").

Step 3:  Decide what action to use on the spam.  Add a line to 
\IMail\Declude\$default$.JunkMail such as "TESTNAME      LOG".  You can use 
any Declude actions here.

If you want a simple way to test it, you can write a 1-line batch file 
'find "teststring" %1', which returns 0 if it finds the string, and 1 if it 
doesn't.  Save it as c:\test.bat.  You can then define a test "MYTEST 
external c:\test.bat 0", which will mark the E-mail as spam if it contains 
"teststring" in it (a return code of 0).  Note that this is likely the 
opposite of what your program would return (normally your program would 
return 0 if it was not spam).
                                                                   -Scott

---

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".  You can E-mail
[EMAIL PROTECTED] for assistance.  You can visit our web
site at http://www.declude.com .

Reply via email to