From 97b095c2c8b4a5d37bd3f4112dff0b906038edcf Mon Sep 17 00:00:00 2001 From: Fernando Lemos Date: Fri, 2 Jun 2006 13:45:55 +0000 Subject: This was the first package I wrote, don't know how well it complies to the new pkg_edit.php, but it should do fine. Blacklist + whitelist + simple configuration. --- packages/sassassin.inc | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 packages/sassassin.inc (limited to 'packages/sassassin.inc') diff --git a/packages/sassassin.inc b/packages/sassassin.inc new file mode 100644 index 00000000..040f12ab --- /dev/null +++ b/packages/sassassin.inc @@ -0,0 +1,63 @@ + 0, 'attachment' => 1, 'plaintext' => 2); + $report_safe = $report_safe_array[$settings['send_spam']]; + + $local_cf = << 'wl', 'blacklist' => 'bl') as $list => $key) { + foreach ($config['installedpackages']["sassassin{$key}"]['config'] as $item) { + if (!empty($item)) + $local_cf .= "{$list}_from {$item['address']}\n"; + } + } + + file_put_contents('/usr/local/etc/mail/spamassassin/local.cf', $local_cf); + + restart_service('spamassassin'); + + if (get_pkg_id('p3scan') != -1) { + require_once('p3scan.inc'); + p3scan_resync(); + } +} + +function sassassin_validate_input($post, $input_errors) { + if (!is_numeric($post['threshold'])) + $input_errors[] = 'The field \'Spam threshold\' should contain a numeric value.'; +} +?> -- cgit v1.2.3