diff --git a/data/web/js/site/mailbox.js b/data/web/js/site/mailbox.js
index 5cac48d5..fec23821 100644
--- a/data/web/js/site/mailbox.js
+++ b/data/web/js/site/mailbox.js
@@ -98,6 +98,38 @@ $(document).ready(function() {
auto_fill_quota($('#addSelectDomain').val());
});
auto_fill_quota($('#addSelectDomain').val());
+
+ // Read bcc local dests
+ // Using ajax to not be a blocking moo
+ $.get("/api/v1/get/bcc-destination-options", function(data){
+ // Domains
+ var optgroup = ""
+ $('#bcc-local-dest').append(optgroup);
+ // Alias domains
+ var optgroup = ""
+ $('#bcc-local-dest').append(optgroup);
+ // Mailboxes and aliases
+ $.each(data.mailboxes, function(mailbox, aliases){
+ var optgroup = ""
+ $('#bcc-local-dest').append(optgroup);
+ });
+ // Finish
+ $('#bcc-local-dest').find('option:selected').remove();
+ $('#bcc-local-dest').selectpicker('refresh');
+ });
+
$(".goto_checkbox").click(function( event ) {
$("form[data-id='add_alias'] .goto_checkbox").not(this).prop('checked', false);
if ($("form[data-id='add_alias'] .goto_checkbox:checked").length > 0) {
diff --git a/data/web/json_api.php b/data/web/json_api.php
index cdefb83a..bc90ed4d 100644
--- a/data/web/json_api.php
+++ b/data/web/json_api.php
@@ -520,7 +520,7 @@ if (isset($_GET['query'])) {
break;
}
break;
-
+
case "postcat":
switch ($object) {
default:
@@ -935,6 +935,33 @@ if (isset($_GET['query'])) {
break;
}
break;
+ case "bcc-destination-options":
+ $domains = mailbox('get', 'domains');
+ $alias_domains = mailbox('get', 'alias_domains');
+ $data = array();
+ if (!empty($domains)) {
+ foreach ($domains as $domain) {
+ $data['domains'][] = $domain;
+ $mailboxes = mailbox('get', 'mailboxes', $domain);
+ foreach ($mailboxes as $mailbox) {
+ $data['mailboxes'][$mailbox][] = $mailbox;
+ $user_alias_details = user_get_alias_details($mailbox);
+ foreach ($user_alias_details['direct_aliases'] as $k => $v) {
+ $data['mailboxes'][$mailbox][] = $k;
+ }
+ foreach ($user_alias_details['shared_aliases'] as $k => $v) {
+ $data['mailboxes'][$mailbox][] = $k;
+ }
+ }
+ }
+ }
+ if (!empty($alias_domains)) {
+ foreach ($alias_domains as $alias_domain) {
+ $data['alias_domains'][] = $alias_domain;
+ }
+ }
+ process_get_return($data);
+ break;
case "syncjobs":
switch ($object) {
case "all":
diff --git a/data/web/lang/lang.de.json b/data/web/lang/lang.de.json
index 4d2f27aa..193df904 100644
--- a/data/web/lang/lang.de.json
+++ b/data/web/lang/lang.de.json
@@ -48,6 +48,7 @@
"app_password": "App-Passwort hinzufügen",
"automap": "Ordner automatisch mappen (\"Sent items\", \"Sent\" => \"Sent\" etc.)",
"backup_mx_options": "Relay-Optionen",
+ "bcc_dest_format": "BCC-Ziel muss eine gültige E-Mail-Adresse sein.",
"comment_info": "Ein privater Kommentar ist für den Benutzer nicht einsehbar. Ein öffentlicher Kommentar wird als Tooltip im Interface des Benutzers angezeigt.",
"custom_params": "Eigene Parameter",
"custom_params_hint": "Richtig: --param=xy, falsch: --param xy",
diff --git a/data/web/lang/lang.en.json b/data/web/lang/lang.en.json
index d5494e59..b24ac6b9 100644
--- a/data/web/lang/lang.en.json
+++ b/data/web/lang/lang.en.json
@@ -48,7 +48,7 @@
"app_password": "Add app password",
"automap": "Try to automap folders (\"Sent items\", \"Sent\" => \"Sent\" etc.)",
"backup_mx_options": "Relay options",
- "bcc_dest_format": "BCC destination must be a single valid email address.
If you need to send a copy to multiple addresses, create an Alias and use it here.",
+ "bcc_dest_format": "BCC destination must be a single valid email address.
If you need to send a copy to multiple addresses, create an alias and use it here.",
"comment_info": "A private comment is not visible to the user, while a public comment is shown as tooltip when hovering it in a user's overview",
"custom_params": "Custom parameters",
"custom_params_hint": "Right: --param=xy, wrong: --param xy",
@@ -529,7 +529,7 @@
"app_passwd": "App password",
"automap": "Try to automap folders (\"Sent items\", \"Sent\" => \"Sent\" etc.)",
"backup_mx_options": "Relay options",
- "bcc_dest_format": "BCC destination must be a single valid email address.
If you need to send a copy to multiple addresses, create an Alias and use it here.",
+ "bcc_dest_format": "BCC destination must be a single valid email address.
If you need to send a copy to multiple addresses, create an alias and use it here.",
"client_id": "Client ID",
"client_secret": "Client secret",
"comment_info": "A private comment is not visible to the user, while a public comment is shown as tooltip when hovering it in a user's overview",
diff --git a/data/web/modals/mailbox.php b/data/web/modals/mailbox.php
index 77533ea7..8751050c 100644
--- a/data/web/modals/mailbox.php
+++ b/data/web/modals/mailbox.php
@@ -112,8 +112,8 @@ if (!isset($_SESSION['mailcow_cc_role'])) {
=$lang['diagnostics']['dns_records_24hours'];?>
diff --git a/data/web/user.php b/data/web/user.php index 62e29f6b..de0598e2 100644 --- a/data/web/user.php +++ b/data/web/user.php @@ -6,11 +6,12 @@ if (isset($_SESSION['mailcow_cc_role']) && $_SESSION['mailcow_cc_role'] == 'doma / DOMAIN ADMIN */ - require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/header.inc.php'; - $_SESSION['return_to'] = $_SERVER['REQUEST_URI']; + require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/header.inc.php'; + $_SESSION['return_to'] = $_SERVER['REQUEST_URI']; $tfa_data = get_tfa(); $fido2_data = fido2(array("action" => "get_friendly_names")); - $username = $_SESSION['mailcow_cc_username']; + $username = $_SESSION['mailcow_cc_username']; + print_r(mailbox('get', 'mailbox_count')); ?>=$lang['user']['spamfilter_wl_desc'];?>
=$lang['user']['spamfilter_bl_desc'];?>
=$lang['user']['app_hint'];?>
-=$lang['user']['app_hint'];?>
+