MatchPlugin($_glob); } function rtti() { return 1; } function name() { return "AntiSpam"; } /* the plugin is only global */ function is_global() { return true; } function sql_store($_uid, $_rid, $_data) { return "INSERT INTO matches SET uid='$_uid',rid='$_rid',pid='".$this->rtti()."',data='{$_data['data']}';\n"; } function to_string($_data) { if($_data['data']=='off') return ""; $res = ":0 HB\n" . "* ? bogofilter\n" . "{\n" . " :0 c\n" . " /var/mail/spam/\n" . " :0 h\n" . " SUBJECT=| formail -xSubject:\n" . " :0 fhW\n" . " | formail -I \"X-Spam-Flag: YES\" -i \"Subject: [Xorg:SPAM]$"."SUBJECT\"\n" . ($_data["data"] == "drop" ? " :0\n /dev/null\n" : "") . "}\n" . ":0 Ec\n" . "/var/mail/nonspam/\n" . "\n"; return $res; } function to_form() { $res = "\n" . "\n"; $res .= "\n"; $res .= "\n" . "
BogoFilterTODO
\n"; return $res; } } /******************************************************************************** * $Id$ * vim: set expandtab shiftwidth=4 tabstop=4 softtabstop=4 textwidth=100: ********************************************************************************/ ?>