X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=philter%2Fphilter%2Finclude%2Ffilter.inc.php;h=088d2124ce9de18dda78d8899e3ea6d2c8d199c3;hb=583e7202be36c4b1bc34fa1728be0f8fbb80c37a;hp=b46a255451691a7dc4a3b0b9e7f676863b4c5009;hpb=ca0523711dc4ec02f2effb2ccfd3f6b176a325d0;p=old-projects.git diff --git a/philter/philter/include/filter.inc.php b/philter/philter/include/filter.inc.php index b46a255..088d212 100644 --- a/philter/philter/include/filter.inc.php +++ b/philter/philter/include/filter.inc.php @@ -48,6 +48,7 @@ class Filter { } function to_string() { + global $mail_pool,$philter; $res = ":0 f\n" . "|formail -I'X-Philter-Or'\n" . "\n"; @@ -55,8 +56,17 @@ class Filter { 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) {