aboutsummaryrefslogtreecommitdiffstats
path: root/packages/spamd.inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-01-28 05:46:38 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-01-28 05:46:38 +0000
commit7235086ba6d12cd2899be080c4e3cea5db575fa6 (patch)
tree6610b19ce080e199177045bf64dcf6cba4576b89 /packages/spamd.inc
parent2152dafe9b59fd558b17ce4b24bb55770232bf63 (diff)
downloadpfsense-packages-7235086ba6d12cd2899be080c4e3cea5db575fa6.tar.gz
pfsense-packages-7235086ba6d12cd2899be080c4e3cea5db575fa6.tar.bz2
pfsense-packages-7235086ba6d12cd2899be080c4e3cea5db575fa6.zip
* Dont process empty items
* Misc changes Now works out of the box
Diffstat (limited to 'packages/spamd.inc')
-rw-r--r--packages/spamd.inc14
1 files changed, 8 insertions, 6 deletions
diff --git a/packages/spamd.inc b/packages/spamd.inc
index 211c2ff1..e2fc15c0 100644
--- a/packages/spamd.inc
+++ b/packages/spamd.inc
@@ -20,12 +20,14 @@ function sync_package_spamd() {
fwrite($fd, "\n# begin of user created entries\n");
if($config['installedpackages']['spamd']['config'] != "") {
foreach($config['installedpackages']['spamd']['config'] as $spamd) {
- fwrite($fd, rtrim($spamd['providername']) . ":\\\n");
- fwrite($fd, "\t:" . rtrim($spamd['providertype']) . ":\\\n");
- fwrite($fd, "\t:msg=\"" . rtrim($spamd['rejectmessage']) . "\":\\\n");
- fwrite($fd, "\t:method=" . rtrim($spamd['providermethod']) . ":\\\n");
- fwrite($fd, "\t:" . rtrim($spamd['providermethod']) . ":\\\n");
- fwrite($fd, "\t:file=" . rtrim($spamd['providerurl']) . ":\n\n");
+ if(rtrim($spamd['providername'])) {
+ fwrite($fd, rtrim($spamd['providername']) . ":\\\n");
+ fwrite($fd, "\t:" . rtrim($spamd['providertype']) . ":\\\n");
+ fwrite($fd, "\t:msg=\"" . rtrim($spamd['rejectmessage']) . "\":\\\n");
+ fwrite($fd, "\t:method=" . rtrim($spamd['providermethod']) . ":\\\n");
+ fwrite($fd, "\t:" . rtrim($spamd['providermethod']) . ":\\\n");
+ fwrite($fd, "\t:file=" . rtrim($spamd['providerurl']) . ":\n\n");
+ }
}
}
fclose($fd);