"") $nextmta = $ss['nextmta']; if($ss['greylistingparms'] <> "") $passtime = " -G " . $ss['greylistingparms']; if($ss['identifier'] <> "") $identifier = " -n \"" . $ss['identifier'] . "\""; if(isset($ss['greylisting']) <> "") $greylisting = " -g"; if($ss['maxblack'] <> "") $maxblack = " -B " . $ss['maxblack']; if($ss['maxcon'] <> "") $maxcon = " -c " . $ss['maxcon']; if($ss['stuttersecs'] <> "") $stuttersecs = " -S " . $ss['stuttersecs']; if($ss['delaysecs'] <> "") $delaysecs = " -s " . $ss['delaysecs']; if($ss['window'] <> "") $window = " -w " . $ss['window']; if($ss['replysmtperror'] <> "") $replysmtperror = " -r " . $ss['replysmtperror']; if($ss['passtime'] <> "") $passtime = $ss['passtime']; if($ss['greyexp'] <> "") $greyexp = $ss['greyexp']; if($ss['whiteexp'] <> "") $whiteexp = $ss['whiteexp']; } } $greyparms = " -G {$passtime}:{$greyexp}:{$whiteexp}"; $start = "/usr/local/sbin/spamd-setup &\n" . "/sbin/pflogd &\n" . "/sbin/mount_fdescfs fdescfs /dev/fd\n" . "/usr/local/libexec/spamd {$greyparms}{$identifier}{$greylisting}{$maxcon}{$maxblack}{$window}{$replysmtperror} -b 127.0.0.1 &\n" . "/usr/local/libexec/spamlogd\n"; $stop = "/usr/bin/killall spamd-setup\n" . "/usr/bin/killall spamlogd\n" . "/usr/bin/killall spamd\n" . "/usr/bin/killall pflogd\n" . "sleep 2"; write_rcfile(array( "file" => "spamd.sh", "start" => $start, "stop" => $stop ) ); conf_mount_ro(); config_unlock(); stop_service("spamd"); sleep(1); start_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"); } ?>