list mailbox, alias/forwarder by domain using extra parameter
parent
15f3a664cd
commit
cf1e633b1a
|
@ -601,7 +601,12 @@ if (isset($_SESSION['mailcow_cc_role']) || isset($_SESSION['pending_mailcow_cc_u
|
||||||
case "mailbox":
|
case "mailbox":
|
||||||
switch ($object) {
|
switch ($object) {
|
||||||
case "all":
|
case "all":
|
||||||
$domains = mailbox('get', 'domains');
|
if(empty($extra)) {
|
||||||
|
$domains = mailbox('get', 'domains');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$domains = [ $extra ];
|
||||||
|
}
|
||||||
if (!empty($domains)) {
|
if (!empty($domains)) {
|
||||||
foreach ($domains as $domain) {
|
foreach ($domains as $domain) {
|
||||||
$mailboxes = mailbox('get', 'mailboxes', $domain);
|
$mailboxes = mailbox('get', 'mailboxes', $domain);
|
||||||
|
@ -940,7 +945,12 @@ if (isset($_SESSION['mailcow_cc_role']) || isset($_SESSION['pending_mailcow_cc_u
|
||||||
case "alias":
|
case "alias":
|
||||||
switch ($object) {
|
switch ($object) {
|
||||||
case "all":
|
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 = [ $extra ];
|
||||||
|
}
|
||||||
if (!empty($domains)) {
|
if (!empty($domains)) {
|
||||||
foreach ($domains as $domain) {
|
foreach ($domains as $domain) {
|
||||||
$aliases = mailbox('get', 'aliases', $domain);
|
$aliases = mailbox('get', 'aliases', $domain);
|
||||||
|
|
Loading…
Reference in New Issue