Rspamd user settings: fix matching From header

master
Michael Kuron 2017-09-16 18:46:28 +02:00
parent c6f81fe67b
commit e4f13568d1
2 changed files with 5 additions and 5 deletions

View File

@ -191,8 +191,8 @@ while ($row = array_shift($rows)) {
$grouped_lists = $stmt->fetchAll(PDO::FETCH_COLUMN); $grouped_lists = $stmt->fetchAll(PDO::FETCH_COLUMN);
$value_sane = preg_replace("/\.\./", ".", (preg_replace("/\*/", ".*", $grouped_lists[0]))); $value_sane = preg_replace("/\.\./", ".", (preg_replace("/\*/", ".*", $grouped_lists[0])));
?> ?>
request_header = { header = {
"From" = "(<?=$value_sane;?>)"; "From" = "/(<?=$value_sane;?>)/i";
} }
<?php <?php
if (!filter_var(trim($row['object']), FILTER_VALIDATE_EMAIL)) { if (!filter_var(trim($row['object']), FILTER_VALIDATE_EMAIL)) {
@ -283,8 +283,8 @@ while ($row = array_shift($rows)) {
$grouped_lists = $stmt->fetchAll(PDO::FETCH_COLUMN); $grouped_lists = $stmt->fetchAll(PDO::FETCH_COLUMN);
$value_sane = preg_replace("/\.\./", ".", (preg_replace("/\*/", ".*", $grouped_lists[0]))); $value_sane = preg_replace("/\.\./", ".", (preg_replace("/\*/", ".*", $grouped_lists[0])));
?> ?>
request_header = { header = {
"From" = "(<?=$value_sane;?>)"; "From" = "/(<?=$value_sane;?>)/i";
} }
<?php <?php
if (!filter_var(trim($row['object']), FILTER_VALIDATE_EMAIL)) { if (!filter_var(trim($row['object']), FILTER_VALIDATE_EMAIL)) {

View File

@ -75,7 +75,7 @@ services:
- clamd - clamd
rspamd-mailcow: rspamd-mailcow:
image: mailcow/rspamd:1.6 image: mailcow/rspamd:1.7
build: ./data/Dockerfiles/rspamd build: ./data/Dockerfiles/rspamd
command: "/usr/bin/rspamd -f -u _rspamd -g _rspamd" command: "/usr/bin/rspamd -f -u _rspamd -g _rspamd"
depends_on: depends_on: