From 1cebd0dec21d51ee214770e0f581c02a1bfb615b Mon Sep 17 00:00:00 2001 From: PiBa-NL Date: Sat, 8 Aug 2015 19:27:07 +0200 Subject: spamd, following the coding guidelines more closely. --- config/spamd/spamd.inc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/config/spamd/spamd.inc b/config/spamd/spamd.inc index fd09837c..dffdb461 100644 --- a/config/spamd/spamd.inc +++ b/config/spamd/spamd.inc @@ -202,13 +202,15 @@ function spamd_generate_rules($type) { $natrules .= "table persist\n"; $natrules .= "table persist\n"; $natrules .= "table persist\n"; - if(file_exists("/var/db/whitelist.txt")) - $natrules .= "table persist file \"/var/db/whitelist.txt\"\n"; + if(file_exists("/var/db/whitelist.txt")) { + $natrules .= "table persist file \"/var/db/whitelist.txt\"\n"; + } - if (is_array($config['installedpackages']['spamdsettings']['config'])) + if (is_array($config['installedpackages']['spamdsettings']['config'])) { $spamdconfig = $config['installedpackages']['spamdsettings']['config']['0']; - else + } else { $spamdconfig = $config['installedpackages']['spamdsettings']['config']; + } if($spamdconfig) { $nextmta = $spamdconfig['nextmta']; @@ -216,8 +218,9 @@ function spamd_generate_rules($type) { if (is_array($spamdbinds)) { foreach($spamdbinds as $interface) { $wanif = get_real_interface($interface); - if (!isset($wanif)) + if (!isset($wanif)) { continue; + } $natrules .= "rdr pass on {$wanif} proto tcp from to port smtp -> 127.0.0.1 port spamd\n"; $natrules .= "rdr pass on {$wanif} proto tcp from to port smtp -> 127.0.0.1 port spamd\n"; $natrules .= "rdr pass on {$wanif} proto tcp from ! to port smtp -> 127.0.0.1 port spamd\n"; -- cgit v1.2.3