diff --git a/data/conf/rspamd/dynmaps/settings.php b/data/conf/rspamd/dynmaps/settings.php index 23052d3f5..d6ca8a53f 100644 --- a/data/conf/rspamd/dynmaps/settings.php +++ b/data/conf/rspamd/dynmaps/settings.php @@ -47,7 +47,7 @@ function ucl_rcpts($object, $type) { $local = parse_email($row['address'])['local']; $domain = parse_email($row['address'])['domain']; if (!empty($local) && !empty($domain)) { - $rcpt[] = '/' . $local . '\+.*' . $domain . '/'; + $rcpt[] = '/' . $local . '\+.*' . $domain . '/i'; } $rcpt[] = $row['address']; } @@ -65,7 +65,7 @@ function ucl_rcpts($object, $type) { $local = parse_email($row['alias'])['local']; $domain = parse_email($row['alias'])['domain']; if (!empty($local) && !empty($domain)) { - $rcpt[] = '/' . $local . '\+.*' . $domain . '/'; + $rcpt[] = '/' . $local . '\+.*' . $domain . '/i'; } $rcpt[] = $row['alias']; } @@ -74,20 +74,20 @@ function ucl_rcpts($object, $type) { $local = parse_email($row['object'])['local']; $domain = parse_email($row['object'])['domain']; if (!empty($local) && !empty($domain)) { - $rcpt[] = '/' . $local . '\+.*' . $domain . '/'; + $rcpt[] = '/' . $local . '\+.*' . $domain . '/i'; } $rcpt[] = $object; } elseif ($type == 'domain') { // Domain self - $rcpt[] = '/.*@' . $object . '/'; + $rcpt[] = '/.*@' . $object . '/i'; $stmt = $pdo->prepare("SELECT `alias_domain` FROM `alias_domain` WHERE `target_domain` = :object"); - $stmt->execute(array(':object' => $row['object'])); + $stmt->execute(array(':object' => $object)); $alias_domains = $stmt->fetchAll(PDO::FETCH_ASSOC); array_filter($alias_domains); while ($row = array_shift($alias_domains)) { - $rcpt[] = '/.*@' . $row['alias_domain'] . '/'; + $rcpt[] = '/.*@' . $row['alias_domain'] . '/i'; } } if (!empty($rcpt)) { @@ -112,7 +112,7 @@ while ($row = array_shift($rows)) { score_ { priority = 4; rcpt = ""; fetchAll(PDO::FETCH_COLUMN); $value_sane = preg_replace("/\.\./", ".", (preg_replace("/\*/", ".*", $grouped_lists[0]))); ?> - from = "/()/"; + from = "/()/i"; priority = 5; rcpt = ""; priority = 6; + rcpt = ""; + + apply "default" { + MAILCOW_WHITE = -999.0; + } + symbols [ + "MAILCOW_WHITE" + ] + } + whitelist_header_ { +prepare("SELECT GROUP_CONCAT(REPLACE(`value`, '*', '.*') SEPARATOR '|') AS `value` FROM `filterconf` + WHERE `object`= :object + AND `option` = 'whitelist_from'"); + $stmt->execute(array(':object' => $row['object'])); + $grouped_lists = $stmt->fetchAll(PDO::FETCH_COLUMN); + $value_sane = preg_replace("/\.\./", ".", (preg_replace("/\*/", ".*", $grouped_lists[0]))); +?> + request_header = { + "From" = "()"; + } + + priority = 5; + + rcpt = ""; + + priority = 6; + rcpt = ""; fetchAll(PDO::FETCH_COLUMN); $value_sane = preg_replace("/\.\./", ".", (preg_replace("/\*/", ".*", $grouped_lists[0]))); ?> - from = "/()/"; + from = "/()/i"; priority = 5; rcpt = ""; priority = 6; + rcpt = ""; + + apply "default" { + MAILCOW_BLACK = 999.0; + } + symbols [ + "MAILCOW_BLACK" + ] + } + blacklist_header_ { +prepare("SELECT GROUP_CONCAT(REPLACE(`value`, '*', '.*') SEPARATOR '|') AS `value` FROM `filterconf` + WHERE `object`= :object + AND `option` = 'blacklist_from'"); + $stmt->execute(array(':object' => $row['object'])); + $grouped_lists = $stmt->fetchAll(PDO::FETCH_COLUMN); + $value_sane = preg_replace("/\.\./", ".", (preg_replace("/\*/", ".*", $grouped_lists[0]))); +?> + request_header = { + "From" = "()"; + } + + priority = 5; + + rcpt = ""; + + priority = 6; + rcpt = "";