From 9ba0786fbf8e00347f8982c5894125e7de46463a Mon Sep 17 00:00:00 2001 From: "andre.peters" Date: Thu, 18 Jan 2018 09:14:06 +0100 Subject: [PATCH] [Web] Also show alias domains handled by domain admin in quarantaine --- data/web/inc/functions.quarantaine.inc.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/data/web/inc/functions.quarantaine.inc.php b/data/web/inc/functions.quarantaine.inc.php index db4ae7c2..15b8b94f 100644 --- a/data/web/inc/functions.quarantaine.inc.php +++ b/data/web/inc/functions.quarantaine.inc.php @@ -224,9 +224,10 @@ function quarantaine($_action, $_data = null) { } } else { - foreach (mailbox('get', 'mailboxes') as $mbox) { - $stmt = $pdo->prepare('SELECT `id`, `qid`, `rcpt`, `sender`, UNIX_TIMESTAMP(`created`) AS `created` FROM `quarantaine` WHERE `rcpt` = :mbox'); - $stmt->execute(array(':mbox' => $mbox)); + $domains = array_merge(mailbox('get', 'domains'), mailbox('get', 'alias_domains')); + foreach ($domains as $domain) { + $stmt = $pdo->prepare('SELECT `id`, `qid`, `rcpt`, `sender`, UNIX_TIMESTAMP(`created`) AS `created` FROM `quarantaine` WHERE `rcpt` REGEXP :domain'); + $stmt->execute(array(':domain' => '@' . $domain . '$')); $rows = $stmt->fetchAll(PDO::FETCH_ASSOC); while($row = array_shift($rows)) { $q_meta[] = $row;