aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-01-28 01:41:26 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-01-28 01:41:26 +0000
commit3ea4cf2cf53c525d6194a482ac13aef9d30cb981 (patch)
tree514e6f0903431fc026c31fe157f96fe477d2b6a9
parent8a33667263d3533e7d22aa0b1e18efce20e770bb (diff)
downloadpfsense-packages-3ea4cf2cf53c525d6194a482ac13aef9d30cb981.tar.gz
pfsense-packages-3ea4cf2cf53c525d6194a482ac13aef9d30cb981.tar.bz2
pfsense-packages-3ea4cf2cf53c525d6194a482ac13aef9d30cb981.zip
Whip spamd into shape for the NWO.
-rw-r--r--packages/spamd.inc11
1 files changed, 8 insertions, 3 deletions
diff --git a/packages/spamd.inc b/packages/spamd.inc
index e734a583..61c5cc74 100644
--- a/packages/spamd.inc
+++ b/packages/spamd.inc
@@ -1,9 +1,9 @@
<?php
function sync_package_spamd() {
+ global $config, $g;
conf_mount_rw();
config_lock();
- global $config;
$fd = fopen("/usr/local/etc/spamd.conf","w");
/* all header */
fwrite($fd, "# this file was automatically generated by the pfSense\n");
@@ -41,14 +41,18 @@ function sync_package_spamd() {
}
function custom_php_install_command() {
+ global $config, $g;
system("touch /var/mail/whitelist.txt");
system("/usr/local/libexec/spamd -G 25:4:864");
system("/usr/libexec/spamlogd 2>/dev/null &amp;");
$start = "/usr/local/sbin/spamd-setup &amp;\n" .
- "/usr/local/libexec/spamd -G 25:4:864\n" .
+ "/sbin/pflogd" .
+ "/sbin/mount_fdescfs fdescfs /dev/fd" .
"/usr/local/libexec/spamlogd &amp;";
+ "/usr/local/libexec/spamd -G 5:4:864 -g -d -b 127.0.0.1\n" .
$stop = "/usr/bin/killall spamd-setup\n" .
- "/usr/local/libexec/spamd\n" .
+ "/usr/bin/killall spamd\n" .
+ "/usr/bin/killall mount_fdescfs" .
"/usr/bin/killall spamlogd";
write_rcfile(array(
"file" => "spamd.sh",
@@ -60,6 +64,7 @@ function custom_php_install_command() {
}
function custom_php_deinstall_command() {
+ global $config, $g;
unlink_if_exists("/usr/local/pkg/spamd.sh");
unlink_if_exists("/usr/local/pkg/pf/spamd_rules.php");
unlink_if_exists("/usr/local/www/spamd_rules.php");