Update of /cvsroot/mahogany/M/src/mail
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv22902/src/mail

Modified Files:
        SpamFilter.cpp 
Log Message:
don't even check the other spam filters if one of them has the message sender 
in its whitelist

Index: SpamFilter.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/mail/SpamFilter.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -b -u -2 -r1.15 -r1.16
--- SpamFilter.cpp      27 Feb 2005 14:24:37 -0000      1.15
+++ SpamFilter.cpp      25 Jun 2006 14:19:52 -0000      1.16
@@ -249,11 +249,17 @@
       //else: use all filters
 
-      if ( p->DoCheckIfSpam(msg, param, result) )
+      // DoCheckIfSpam() may return -1 in addition to true or false which is
+      // treated as "definiively false", i.e. not only this spam filter didn't
+      // recognize this message as spam but it shouldn't be even checked with
+      // the others (this is mainly used for whitelisting support)
+      int rc = p->DoCheckIfSpam(msg, param, result);
+      if ( rc != false )
       {
          if ( result )
             *result = name + _T(": ") + *result;
 
-         return true;
+         return rc != -1;
       }
+      //else: continue with the other filters checks
    }
 


Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Mahogany-cvsupdates mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to