Rspamd user settings: fix From header match

The request_header regex appears to not be expected to be encapsulated in slashes and does not seem to accept flags.
This commit is contained in:
Michael Kuron 2017-08-28 20:27:53 +02:00 committed by GitHub
parent fcd8cfa4f4
commit 8383ba5e9c

View File

@ -192,7 +192,7 @@ while ($row = array_shift($rows)) {
$value_sane = preg_replace("/\.\./", ".", (preg_replace("/\*/", ".*", $grouped_lists[0])));
?>
request_header = {
"From" = "/(<?=$value_sane;?>)/i";
"From" = "(<?=$value_sane;?>)";
}
<?php
if (!filter_var(trim($row['object']), FILTER_VALIDATE_EMAIL)) {
@ -284,7 +284,7 @@ while ($row = array_shift($rows)) {
$value_sane = preg_replace("/\.\./", ".", (preg_replace("/\*/", ".*", $grouped_lists[0])));
?>
request_header = {
"From" = "/(<?=$value_sane;?>)/i";
"From" = "(<?=$value_sane;?>)";
}
<?php
if (!filter_var(trim($row['object']), FILTER_VALIDATE_EMAIL)) {