diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2006-10-10 03:53:59 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2006-10-10 03:53:59 +0000 |
commit | 973d066ca24d159693f5f40b9cfbcca546e51989 (patch) | |
tree | 955b53a24e1b3d133641481e1f9134b46693ab05 /packages/spamd.inc | |
parent | b5028e3ba56c22bb7ad5fabdf6f99b38d477f5d0 (diff) | |
download | pfsense-packages-973d066ca24d159693f5f40b9cfbcca546e51989.tar.gz pfsense-packages-973d066ca24d159693f5f40b9cfbcca546e51989.tar.bz2 pfsense-packages-973d066ca24d159693f5f40b9cfbcca546e51989.zip |
Do not process spamd package if it has not been configured.
Diffstat (limited to 'packages/spamd.inc')
-rw-r--r-- | packages/spamd.inc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/packages/spamd.inc b/packages/spamd.inc index 7f986a1b..1bc2b451 100644 --- a/packages/spamd.inc +++ b/packages/spamd.inc @@ -30,6 +30,8 @@ */ function sync_package_spamd() { global $config, $g; + if(!$config['installedpackages']['spamdsources']) + return; conf_mount_rw(); config_lock(); $fd = fopen("/etc/spamd.conf","w"); @@ -48,7 +50,7 @@ function sync_package_spamd() { fwrite($fd, "\t:black:\\\n"); fwrite($fd, "\t:msg=\"Sorry, you spammed us before.\":\\\n"); fwrite($fd, "\t:method=file:\\\n"); - fwrite($fd, "\t:file=/var/db/blacklist.txt:\n\n"); + fwrite($fd, "\t:file=/var/db/blacklist.txt:\n\n"); /* loop through each item and write out its configuration */ if($config['installedpackages']['spamdsources']['config'] != "") { foreach($config['installedpackages']['spamdsources']['config'] as $spamd) { @@ -90,7 +92,7 @@ function sync_package_spamd() { if($ss['identifier'] <> "") $identifier = " -n \"" . $ss['identifier'] . "\""; if(isset($ss['greylisting']) <> "") - $greylisting = " -g"; + $greylisting = " -g"; if($ss['maxblack'] <> "") $maxblack = " -B " . $ss['maxblack']; if($ss['maxcon'] <> "") @@ -108,7 +110,7 @@ function sync_package_spamd() { if($ss['greyexp'] <> "") $greyexp = $ss['greyexp']; if($ss['whiteexp'] <> "") - $whiteexp = $ss['whiteexp']; + $whiteexp = $ss['whiteexp']; } } $greyparms = " -G {$passtime}:{$greyexp}:{$whiteexp}"; @@ -120,7 +122,7 @@ function sync_package_spamd() { $stop = "/usr/bin/killall spamd-setup\n" . "/usr/bin/killall spamlogd\n" . "/usr/bin/killall spamd\n" . - "/usr/bin/killall pflogd\n" . + "/usr/bin/killall pflogd\n" . "sleep 2"; write_rcfile(array( "file" => "spamd.sh", |