1
0
mirror of https://github.com/mailcow/mailcow-dockerized.git synced 2024-12-02 09:02:42 +02:00

Merge pull request #3131 from gamalan/list-mailbox-alias-by-domain

List mailbox, alias/forwarder by domain using extra parameter
This commit is contained in:
André Peters 2019-11-09 09:59:15 +01:00 committed by GitHub
commit 51d1fdcd3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -601,7 +601,12 @@ if (isset($_SESSION['mailcow_cc_role']) || isset($_SESSION['pending_mailcow_cc_u
case "mailbox":
switch ($object) {
case "all":
$domains = mailbox('get', 'domains');
if (empty($extra)) {
$domains = mailbox('get', 'domains');
}
else {
$domains = array($extra);
}
if (!empty($domains)) {
foreach ($domains as $domain) {
$mailboxes = mailbox('get', 'mailboxes', $domain);
@ -940,7 +945,12 @@ if (isset($_SESSION['mailcow_cc_role']) || isset($_SESSION['pending_mailcow_cc_u
case "alias":
switch ($object) {
case "all":
$domains = array_merge(mailbox('get', 'domains'), mailbox('get', 'alias_domains'));
if (empty($extra)) {
$domains = array_merge(mailbox('get', 'domains'), mailbox('get', 'alias_domains'));
}
else {
$domains = array($extra);
}
if (!empty($domains)) {
foreach ($domains as $domain) {
$aliases = mailbox('get', 'aliases', $domain);