Important fix for Rspamd score settings, LUA tag handling changes
This commit is contained in:
		@@ -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 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');
 | 
			
		||||
require_once "vars.inc.php";
 | 
			
		||||
 | 
			
		||||
ini_set('error_reporting', 0);
 | 
			
		||||
 | 
			
		||||
$dsn = $database_type . ':host=' . $database_host . ';dbname=' . $database_name;
 | 
			
		||||
$opt = [
 | 
			
		||||
    PDO::ATTR_ERRMODE            => PDO::ERRMODE_EXCEPTION,
 | 
			
		||||
@@ -38,10 +38,17 @@ while ($row = array_shift($rows)) {
 | 
			
		||||
		WHERE (`object`= :object OR `object`= :object_domain)
 | 
			
		||||
			AND (`option` = 'blacklist_from' OR `option` = 'whitelist_from')");
 | 
			
		||||
	$stmt->execute(array(':object' => $row['object'], ':object_domain' => substr(strrchr($row['object'], "@"), 1)));
 | 
			
		||||
	$grouped_lists = $stmt->fetchAll(PDO::FETCH_COLUMN);
 | 
			
		||||
	$value_sane = preg_replace("/\.\./", ".", (preg_replace("/\*/", ".*", $grouped_lists[0])));
 | 
			
		||||
	$grouped_lists = $stmt->fetchAll(PDO::FETCH_ASSOC);
 | 
			
		||||
	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;?>).)*$/";
 | 
			
		||||
<?php
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
?>
 | 
			
		||||
		rcpt = "<?=$row['object'];?>";
 | 
			
		||||
<?php
 | 
			
		||||
	$stmt = $pdo->prepare("SELECT `address` FROM `alias` WHERE `goto` = :object_goto AND `address` NOT LIKE '@%' AND `address` != :object_address");
 | 
			
		||||
 
 | 
			
		||||
@@ -25,6 +25,10 @@ local auth_domain_map = rspamd_config:add_map({
 | 
			
		||||
 | 
			
		||||
rspamd_config.ADD_DELIMITER_TAG = {
 | 
			
		||||
  callback = function(task)
 | 
			
		||||
	tag = nil
 | 
			
		||||
	local tag_env = nil
 | 
			
		||||
	local tag_to = nil
 | 
			
		||||
 | 
			
		||||
    local util = require("rspamd_util")
 | 
			
		||||
    local rspamd_logger = require "rspamd_logger"
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user