more modules
[old-projects.git] / philter / philter / include / plugin_autoreply.inc.php
index e068ce1..25a9788 100644 (file)
@@ -33,10 +33,11 @@ EOF;
         $uid = get_user_id();
         $text = explode("\n",$_data[1]);
         $res = "    :0 hc\n"
-            .  "    *X-Philter-Autoreply: $uid"
-            .  "    | ( formail -rA'X-Philter-Autoreply: $uid; \ \n";
+            .  "    * !^FROM_DAEMON\n"
+            .  "    * !^X-Philter-Autoreply: $uid\n"
+            .  "    | ( formail -rI'Precedence: junk' -A'X-Philter-Autoreply: $uid; \ \n";
         foreach($text as $line)
-            $res .= "        echo ".escapeshellarg($line)."; \ \n";
+            $res .= "        echo ".escapeshellarg(chop($line))."; \ \n";
         $res.= "      ) | $"."SENDMAIL -oi -t\n";
         return $res;
     }