diff options
Diffstat (limited to 'packages/spamd.inc')
-rw-r--r-- | packages/spamd.inc | 14 |
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); |