custheader are OK (or should be)
}
function to_string() {
+ global $mail_pool,$philter;
$res = ":0 f\n"
. "|formail -I'X-Philter-Or'\n"
. "\n";
foreach($this->rules as $id=>$rule)
if($id)
$res .= $rule->to_string();
-
- return $res;
+ else
+ foreach($rule->matches as $id=>$match)
+ $res .= $philter->config['global_plugins'][$match[0]]->to_string($match);
+
+ $res .= ":0\n"
+ . "!";
+ foreach($mail_pool->emails as $mail)
+ if($mail->is_active())
+ $res .= ' '.$mail->email;
+
+ return $res."\n";
}
function delete_rule($_rid) {
function is_global() { return true; }
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";
-
+ $res = "\n";
return $res;
}