"") $passtime = $pkg_i['passtime']; if($pkg_i['identifier'] <> "") $identifier = " -n \"" . $pkg_i['identifier'] . "\""; if(isset($pkg_i['greylisting']) <> "") $greylisting = $pkg_i['greylisting']; if($pkg_i['maxblack'] <> "") $maxblack = " -B " . $pkg_i['maxblack']; if($pkg_i['maxcon'] <> "") $maxcon = " -c " . $pkg_i['maxcon']; if($pkg_i['stuttersecs'] <> "") $stuttersecs = " -S " . $pkg_i['stuttersecs']; if($pkg_i['delaysecs'] <> "") $delaysecs = " -s " . $pkg_i['delaysecs']; $start = "/usr/local/sbin/spamd-setup &\n" . "/sbin/pflogd &\n" . "/sbin/mount_fdescfs fdescfs /dev/fd\n" . "/usr/local/libexec/spamd -G {$passtime}{$identifier}{$greylisting}{$maxcon}{$maxblack} -b 127.0.0.1 &\n" . "sleep 1\n" . "/usr/local/libexec/spamlogd &\n"; $stop = "/usr/bin/killall spamd-setup\n" . "/usr/bin/killall spamd\n" . "/usr/bin/killall /sbin/pflogd\n" . "/usr/bin/killall mount_fdescfs\n" . "/usr/bin/killall spamlogd\n" . "sleep 2"; write_rcfile(array( "file" => "spamd.sh", "start" => $start, "stop" => $stop ) ); conf_mount_ro(); config_unlock(); restart_service("spamd"); } function custom_php_install_command() { global $config, $g; system("touch /var/db/whitelist.txt"); sync_package_spamd(); } function custom_php_deinstall_command() { global $config, $g; unlink_if_exists("/usr/local/pkg/pf/spamd_rules.php"); unlink_if_exists("/usr/local/www/spamd_rules.php"); unlink_if_exists("/usr/local/etc/rc.d/spamd.sh"); } ?>