trying maildrop
[old-projects.git] / philter / philter / include / plugin_bogofilter.inc.php
index a8b6fa8..6abe378 100644 (file)
@@ -18,18 +18,15 @@ class BogoPlugin extends MatchPlugin {
     function to_string($_data) {
         global $philter;
         $bogo = $philter->config['path']['bogofilter'];
-        if($_data[1]==1)
-            return ":0 fw\n"
-                .  "| $bogo -u -e -p\n"
-                .  ":0 e\n"
-                .  "{ EXITCODE=75 HOST }\n"
-                .  "\n";
         
+        if($_data[1]==1)
+            return "xfilter \"$bogo -u -e -p\"\n\n";
+
         if($_data[1]==2)
-            return ":0 HB:\n"
-                .  "* ? $bogo\n"
-                .  "/dev/null\n";
-            
+            return "xfilter \"$bogo -u -e -p\"\n"
+                .  "if (/^X-Bogosity: Yes, tests=bogofilter/)\n"
+                .  "    exit\n\n";
+        
         return "";
     }