[Web] Quarantine list adjustments

This commit is contained in:
FreddleSpl0it committed 2026-10-28 16:16:00 +01:00
1 parent d5e3de3ae8
commit 9eb3a79f3b
1 file changed
+3 -2
+3 -2
View File
@@ -767,8 +767,9 @@ function quarantine($_action, $_data = null) {
else { else {
$domains = array_merge(mailbox('get', 'domains'), mailbox('get', 'alias_domains')); $domains = array_merge(mailbox('get', 'domains'), mailbox('get', 'alias_domains'));
foreach ($domains as $domain) { foreach ($domains as $domain) {
$stmt = $pdo->prepare('SELECT `id`, `qid`, `subject`, LOCATE("VIRUS_FOUND", `symbols`) AS `virus_flag`, `score`, `rcpt`, `sender`, `action`, UNIX_TIMESTAMP(`created`) AS `created`, `notified` FROM `quarantine` WHERE `rcpt` REGEXP :domain'); // Compare the domain part exactly, a regex would treat dots in the domain as wildcards
$stmt->execute(array(':domain' => '@' . $domain . '$')); $stmt = $pdo->prepare('SELECT `id`, `qid`, `subject`, LOCATE("VIRUS_FOUND", `symbols`) AS `virus_flag`, `score`, `rcpt`, `sender`, `action`, UNIX_TIMESTAMP(`created`) AS `created`, `notified` FROM `quarantine` WHERE SUBSTRING_INDEX(`rcpt`, "@", -1) = :domain');
$stmt->execute(array(':domain' => $domain));
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC); $rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
while($row = array_shift($rows)) { while($row = array_shift($rows)) {
$q_meta[] = $row; $q_meta[] = $row;