diff --git a/data/web/inc/functions.inc.php b/data/web/inc/functions.inc.php index b19792e2..f7f08403 100644 --- a/data/web/inc/functions.inc.php +++ b/data/web/inc/functions.inc.php @@ -459,8 +459,9 @@ function user_get_alias_details($username) { while ($row = array_shift($run)) { $data['shared_aliases'] = $row['shared_aliases']; } - $stmt = $pdo->prepare("SELECT IFNULL(GROUP_CONCAT(`address` SEPARATOR ', '), '✘') AS `direct_aliases` FROM `alias` + $stmt = $pdo->prepare("SELECT GROUP_CONCAT(`address` SEPARATOR ', ') AS `direct_aliases` FROM `alias` WHERE `goto` = :username_goto + AND `address` NOT LIKE '@%' AND `address` != :username_address"); $stmt->execute( array( @@ -477,7 +478,13 @@ function user_get_alias_details($username) { $stmt->execute(array(':username' => $username)); $run = $stmt->fetchAll(PDO::FETCH_ASSOC); while ($row = array_shift($run)) { - $data['ad_alias'] = $row['ad_alias']; + if (empty($data['direct_aliases'])) { + $data['direct_aliases'] = $row['ad_alias']; + } + else { + // Probably faster than imploding + $data['direct_aliases'] .= ', ' . $row['ad_alias']; + } } $stmt = $pdo->prepare("SELECT IFNULL(GROUP_CONCAT(`send_as` SEPARATOR ', '), '✘') AS `send_as` FROM `sender_acl` WHERE `logged_in_as` = :username AND `send_as` NOT LIKE '@%';"); $stmt->execute(array(':username' => $username)); diff --git a/data/web/lang/lang.de.php b/data/web/lang/lang.de.php index 33d5ce33..edf97908 100644 --- a/data/web/lang/lang.de.php +++ b/data/web/lang/lang.de.php @@ -101,6 +101,7 @@ $lang['danger']['spam_alias_max_exceeded'] = 'Maximale Anzahl an Spam-Alias-Adre $lang['danger']['validity_missing'] = 'Bitte geben Sie eine Gültigkeitsdauer an'; $lang['user']['loading'] = "Lade..."; $lang['user']['active_sieve'] = "Aktiver Filter"; +$lang['user']['show_sieve_filters'] = "Zeige aktiven Filter des Benutzers"; $lang['user']['no_active_filter'] = "Kein aktiver Filter vorhanden"; $lang['user']['on'] = 'Ein'; $lang['user']['off'] = 'Aus'; @@ -122,7 +123,9 @@ $lang['user']['spam_aliases'] = 'Temporäre E-Mail Aliasse'; $lang['user']['alias'] = 'Alias'; $lang['user']['aliases'] = 'Aliasse'; $lang['user']['shared_aliases'] = 'Geteilte Alias-Adressen'; +$lang['user']['shared_aliases_desc'] = 'Geteilte Alias-Adressen werden nicht bei benutzerdefinierten Einstellungen wie die des Spam-Filters oder der Verschlüsselungsrichtlinie berücksichtigt. Entsprechende Spam-Filter können lediglich von einem Administrator vorgenommen werden.'; $lang['user']['direct_aliases'] = 'Direkte Alias-Adressen'; +$lang['user']['direct_aliases_desc'] = 'Nur direkte Alias-Adressen werden für benutzerdefinierte Einstellungen berücksichtigt.'; $lang['user']['domain_aliases'] = 'Domain-Alias Adressen'; $lang['user']['is_catch_all'] = 'Ist Catch-All Adresse für Domain(s)'; $lang['user']['aliases_also_send_as'] = 'Darf außerdem versenden als Benutzer'; diff --git a/data/web/lang/lang.en.php b/data/web/lang/lang.en.php index ef60bd22..b945ea4c 100644 --- a/data/web/lang/lang.en.php +++ b/data/web/lang/lang.en.php @@ -101,6 +101,7 @@ $lang['danger']['spam_alias_max_exceeded'] = "Max. allowed spam alias addresses $lang['danger']['validity_missing'] = 'Please assign a period of validity'; $lang['user']['loading'] = "Loading..."; $lang['user']['active_sieve'] = "Active filter"; +$lang['user']['show_sieve_filters'] = "Show active user sieve filter"; $lang['user']['no_active_filter'] = "No active filter available"; $lang['user']['on'] = "On"; $lang['user']['off'] = "Off"; @@ -122,7 +123,9 @@ $lang['user']['spam_aliases'] = 'Temporary email aliases'; $lang['user']['alias'] = 'Alias'; $lang['user']['aliases'] = 'Aliases'; $lang['user']['shared_aliases'] = 'Shared alias addresses'; +$lang['user']['shared_aliases_desc'] = 'A shared alias address is not affected by any user specific settings. A custom spam filter setting can be archived by a domain-wide policy set by an administrator..'; $lang['user']['direct_aliases'] = 'Direct alias addresses'; +$lang['user']['direct_aliases_desc'] = 'Direct alias addresses are affected by spam filter and TLS policy settings.'; $lang['user']['domain_aliases'] = 'Domain alias addresses'; $lang['user']['is_catch_all'] = 'Catch-all for domain/s'; $lang['user']['aliases_also_send_as'] = 'Also allowed to send as user'; diff --git a/data/web/user.php b/data/web/user.php index 5ccd0f8f..0fb0875f 100644 --- a/data/web/user.php +++ b/data/web/user.php @@ -97,7 +97,7 @@ elseif (isset($_SESSION['mailcow_cc_role']) && $_SESSION['mailcow_cc_role'] == '
=$lang['user']['direct_aliases_desc'];?>
+=$user_get_alias_details['direct_aliases'];?>
=$lang['user']['shared_aliases_desc'];?>
+=$user_get_alias_details['shared_aliases'];?>
=$user_get_alias_details['ad_alias'];?>
-