aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPiBa-NL <pba_2k3@yahoo.com>2015-08-08 19:27:07 +0200
committerPiBa-NL <pba_2k3@yahoo.com>2015-08-08 19:27:07 +0200
commit1cebd0dec21d51ee214770e0f581c02a1bfb615b (patch)
tree48f38e0665c6b1f72c322e2d64bf82c95983f883
parentc58cd3009ae4dc2a612864ba3cc8c332440f6be5 (diff)
downloadpfsense-packages-1cebd0dec21d51ee214770e0f581c02a1bfb615b.tar.gz
pfsense-packages-1cebd0dec21d51ee214770e0f581c02a1bfb615b.tar.bz2
pfsense-packages-1cebd0dec21d51ee214770e0f581c02a1bfb615b.zip
spamd, following the coding guidelines more closely.
-rw-r--r--config/spamd/spamd.inc13
1 files 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 <whitelist> persist\n";
$natrules .= "table <blacklist> persist\n";
$natrules .= "table <spamd> persist\n";
- if(file_exists("/var/db/whitelist.txt"))
- $natrules .= "table <spamd-white> persist file \"/var/db/whitelist.txt\"\n";
+ if(file_exists("/var/db/whitelist.txt")) {
+ $natrules .= "table <spamd-white> 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 <blacklist> to port smtp -> 127.0.0.1 port spamd\n";
$natrules .= "rdr pass on {$wanif} proto tcp from <spamd> to port smtp -> 127.0.0.1 port spamd\n";
$natrules .= "rdr pass on {$wanif} proto tcp from !<spamd-white> to port smtp -> 127.0.0.1 port spamd\n";