Re: spam protection for user notes
| From: | Sean Coates | Date: | Sun, 26 Feb 2006 01:18:33 +0000 |
| Subject: | Re: spam protection for user notes | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969372104@lists.php.net to get a copy of this message | ||
> actually its not a config file, its a config dir :)
> I have many files in /usr/share/spamassassin, although not all are
> needed for us.
Ok.. what directives are you using? (-:
> Anyway, I think the best thing to do now is to implement a function to
> pass the note through spamassassin and display the result (X-Spam-Status
> line) in the e-mail that is sent to the notes list, so that we can check
> if we need to tweak the configuration.
I did something like this in my quick tests:
$d = array(
0 => array("pipe", "r"), // stin
1 => array("pipe", "w"), // stdout
2 => array("pipe", "w") // stderr
);
$proc = proc_open('/path/to/spamassassin -L -e 8', $d, $p);
fclose($p[2]); // keep it open if you want to read stderr
fwrite($p[0], $originalNoteText);
fclose($p0]);
$noteWithHeaders = stream_get_contents($p[1]);
fclose($p[1]);
S