}
/** function that writes the procmailrc.
+ * @param &$procmail the string containing the procmail filter
+ * @param $filename the base filename of the procmailrc filter
* @return true if all is ok
*/
- function write_procmailrc() {
- // TODO
+ function write_procmailrc(&$procmail, $filename) {
+ $file = $philter->config['path']['spool']."/".$filename;
+ $f = fopen($file.".tmp", "w");
+ fwrite($f, $procmail, strlen($procmail));
+ fclose($f);
+ rename($file.".tmp", $file);
return true;
}