diff options
Diffstat (limited to 'packages')
-rw-r--r-- | packages/spamd.inc | 11 |
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 &"); $start = "/usr/local/sbin/spamd-setup &\n" . - "/usr/local/libexec/spamd -G 25:4:864\n" . + "/sbin/pflogd" . + "/sbin/mount_fdescfs fdescfs /dev/fd" . "/usr/local/libexec/spamlogd &"; + "/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"); |