Important fix for Rspamd score settings, LUA tag handling changes
parent
d2b6912aab
commit
c21623b482
|
@ -4,11 +4,11 @@ The match section performs AND operation on different matches: for example, if y
|
||||||
then the rule matches only when from AND rcpt match. For similar matches, the OR rule applies: if you have multiple rcpt matches,
|
then the rule matches only when from AND rcpt match. For similar matches, the OR rule applies: if you have multiple rcpt matches,
|
||||||
then any of these will trigger the rule. If a rule is triggered then no more rules are matched.
|
then any of these will trigger the rule. If a rule is triggered then no more rules are matched.
|
||||||
*/
|
*/
|
||||||
ini_set('error_reporting', '0');
|
|
||||||
|
|
||||||
header('Content-Type: text/plain');
|
header('Content-Type: text/plain');
|
||||||
require_once "vars.inc.php";
|
require_once "vars.inc.php";
|
||||||
|
|
||||||
|
ini_set('error_reporting', 0);
|
||||||
|
|
||||||
$dsn = $database_type . ':host=' . $database_host . ';dbname=' . $database_name;
|
$dsn = $database_type . ':host=' . $database_host . ';dbname=' . $database_name;
|
||||||
$opt = [
|
$opt = [
|
||||||
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
|
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
|
||||||
|
@ -38,10 +38,17 @@ while ($row = array_shift($rows)) {
|
||||||
WHERE (`object`= :object OR `object`= :object_domain)
|
WHERE (`object`= :object OR `object`= :object_domain)
|
||||||
AND (`option` = 'blacklist_from' OR `option` = 'whitelist_from')");
|
AND (`option` = 'blacklist_from' OR `option` = 'whitelist_from')");
|
||||||
$stmt->execute(array(':object' => $row['object'], ':object_domain' => substr(strrchr($row['object'], "@"), 1)));
|
$stmt->execute(array(':object' => $row['object'], ':object_domain' => substr(strrchr($row['object'], "@"), 1)));
|
||||||
$grouped_lists = $stmt->fetchAll(PDO::FETCH_COLUMN);
|
$grouped_lists = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||||
$value_sane = preg_replace("/\.\./", ".", (preg_replace("/\*/", ".*", $grouped_lists[0])));
|
array_filter($grouped_lists);
|
||||||
|
while ($grouped_list = array_shift($grouped_lists)) {
|
||||||
|
$value_sane = preg_replace("/\.\./", ".", (preg_replace("/\*/", ".*", $grouped_list['value'])));
|
||||||
|
if (!empty($value_sane)) {
|
||||||
?>
|
?>
|
||||||
from = "/^((?!<?=$value_sane;?>).)*$/";
|
from = "/^((?!<?=$value_sane;?>).)*$/";
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
rcpt = "<?=$row['object'];?>";
|
rcpt = "<?=$row['object'];?>";
|
||||||
<?php
|
<?php
|
||||||
$stmt = $pdo->prepare("SELECT `address` FROM `alias` WHERE `goto` = :object_goto AND `address` NOT LIKE '@%' AND `address` != :object_address");
|
$stmt = $pdo->prepare("SELECT `address` FROM `alias` WHERE `goto` = :object_goto AND `address` NOT LIKE '@%' AND `address` != :object_address");
|
||||||
|
|
|
@ -26,6 +26,9 @@ local auth_domain_map = rspamd_config:add_map({
|
||||||
rspamd_config.ADD_DELIMITER_TAG = {
|
rspamd_config.ADD_DELIMITER_TAG = {
|
||||||
callback = function(task)
|
callback = function(task)
|
||||||
tag = nil
|
tag = nil
|
||||||
|
local tag_env = nil
|
||||||
|
local tag_to = nil
|
||||||
|
|
||||||
local util = require("rspamd_util")
|
local util = require("rspamd_util")
|
||||||
local rspamd_logger = require "rspamd_logger"
|
local rspamd_logger = require "rspamd_logger"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue