NobGit
public nobgit read

NobMail

Based on mailcow: dockerized

Languages

Repository composition by tracked source files.

PHP
PHP 49% JavaScript 35% HTML 9% CSS 4% Shell 2% Python 1% Lua 0% Perl 0% Ruby 0% SCSS 0%
Create file Wiki Documentation
Clone
https://nobgit.com/orgs/nobgit/nobmail.git
ssh://[email protected]:2222/orgs/nobgit/nobmail.git

Commit

Keep format

b3a161f9
andryyy <[email protected]> 9 years ago
data/conf/rspamd/dynmaps/settings.php | 22 ++++++++++++++++------
 1 file changed, 16 insertions(+), 6 deletions(-)

Diff

diff --git a/data/conf/rspamd/dynmaps/settings.php b/data/conf/rspamd/dynmaps/settings.php
index 098ffbd9..0b563b70 100644
--- a/data/conf/rspamd/dynmaps/settings.php
+++ b/data/conf/rspamd/dynmaps/settings.php
@@ -32,6 +32,11 @@ catch (PDOException $e) {
 ?>
 settings {
 <?php
+
+/*
+// Start whitelist for forwarding hosts
+*/
+
 try {
 	$stmt = $pdo->query("SELECT `host` FROM `forwarding_hosts`");
 	$rows = $stmt->fetchAll(PDO::FETCH_COLUMN);
@@ -39,16 +44,16 @@ try {
 catch (PDOException $e) {
 	$rows = array();
 }
-
-if ($rows)
-{
+if (!empty($rows)) {
 ?>
 	whitelist_forwarding_hosts {
 		priority = high;
 <?php
-foreach ($rows as $host) {
-	echo "\t\t" . 'ip = "' . $host . '";' . "\n";
-}
+foreach ($rows as $host):
+?>
+		ip = "<?=$host;?>";
+<?php
+endforeach;
 ?>
 		apply "default" {
 			actions {
@@ -61,6 +66,11 @@ foreach ($rows as $host) {
 	}
 <?php
 }
+
+/*
+// Start custom scores for users
+*/
+
 $stmt = $pdo->query("SELECT DISTINCT `object` FROM `filterconf` WHERE `option` = 'highspamlevel' OR `option` = 'lowspamlevel'");
 $rows = $stmt->fetchAll(PDO::FETCH_ASSOC);