[Web] Also show alias domains handled by domain admin in quarantaine

master
andre.peters 2018-01-18 09:14:06 +01:00
parent c2f74ab75c
commit 9ba0786fbf
1 changed files with 4 additions and 3 deletions

View File

@ -224,9 +224,10 @@ function quarantaine($_action, $_data = null) {
} }
} }
else { else {
foreach (mailbox('get', 'mailboxes') as $mbox) { $domains = array_merge(mailbox('get', 'domains'), mailbox('get', 'alias_domains'));
$stmt = $pdo->prepare('SELECT `id`, `qid`, `rcpt`, `sender`, UNIX_TIMESTAMP(`created`) AS `created` FROM `quarantaine` WHERE `rcpt` = :mbox'); foreach ($domains as $domain) {
$stmt->execute(array(':mbox' => $mbox)); $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); $rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
while($row = array_shift($rows)) { while($row = array_shift($rows)) {
$q_meta[] = $row; $q_meta[] = $row;