[Rspamd] Pushover: Fixes
This commit is contained in:
parent
47a15c21aa
commit
35d3586950
@ -202,12 +202,21 @@ foreach ($rcpt_final_mailboxes as $rcpt_final) {
|
|||||||
$senders = explode(',', $api_data['senders']);
|
$senders = explode(',', $api_data['senders']);
|
||||||
$senders = array_filter($senders);
|
$senders = array_filter($senders);
|
||||||
$senders_regex = $api_data['senders_regex'];
|
$senders_regex = $api_data['senders_regex'];
|
||||||
$sender_validated = true;
|
$sender_validated = false;
|
||||||
if (!empty($senders_regex) && !preg_match($senders_regex, $sender)) {
|
if (empty($senders) && empty($senders_regex)) {
|
||||||
$sender_validated = false;
|
$sender_validated = true;
|
||||||
}
|
}
|
||||||
if (!empty($senders) && !in_array($sender, $senders)) {
|
else {
|
||||||
$sender_validated = false;
|
if (!empty($senders)) {
|
||||||
|
if (in_array($sender, $senders)) {
|
||||||
|
$sender_validated = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!empty($senders_regex) && $sender_validated !== true) {
|
||||||
|
if (preg_match($senders_regex, $sender)) {
|
||||||
|
$sender_validated = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ($sender_validated === false) {
|
if ($sender_validated === false) {
|
||||||
error_log("NOTIFY: pushover pipe: skipping unwanted sender " . $sender);
|
error_log("NOTIFY: pushover pipe: skipping unwanted sender " . $sender);
|
||||||
|
Loading…
Reference in New Issue
Block a user