diff --git a/CHANGELOG.md b/CHANGELOG.md index 58aa5fe..921995e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ Control panel: * The new check that system services are running mistakenly checked that the Dovecot Managesieve service is publicly accessible. Although the service binds to the public network interface we don't open the port in ufw. On some machines it seems that ufw blocks the connection from the status checks (which seems correct) and on some machines (mine) it doesn't, which is why I didn't notice the problem. * The current backup chain will now try to predict how many days until it is deleted (always at least 3 days after the next full backup). +* The list of aliases that forward to a user are removed from the Mail Users page because when there are many alises it is slow and times-out. v0.07 (February 28, 2015) ------------------------- diff --git a/management/mailconfig.py b/management/mailconfig.py index 47507b9..4a9a7d9 100755 --- a/management/mailconfig.py +++ b/management/mailconfig.py @@ -91,10 +91,6 @@ def get_mail_users_ex(env, with_archived=False, with_slow_info=False): # email: "name@domain.tld", # privileges: [ "priv1", "priv2", ... ], # status: "active", - # aliases: [ - # ("alias@domain.tld", ["indirect.alias@domain.tld", ...]), - # ... - # ] # }, # ... # ] @@ -102,9 +98,6 @@ def get_mail_users_ex(env, with_archived=False, with_slow_info=False): # ... # ] - # Pre-load all aliases. - aliases = get_mail_alias_map(env) - # Get users and their privileges. users = [] active_accounts = set() @@ -121,10 +114,6 @@ def get_mail_users_ex(env, with_archived=False, with_slow_info=False): users.append(user) if with_slow_info: - user["aliases"] = [ - (alias, sorted(evaluate_mail_alias_map(alias, aliases, env))) - for alias in aliases.get(email.lower(), []) - ] user["mailbox_size"] = utils.du(os.path.join(env['STORAGE_ROOT'], 'mail/mailboxes', *reversed(email.split("@")))) # Add in archived accounts. @@ -230,21 +219,6 @@ def get_mail_aliases_ex(env): domain["aliases"].sort(key = lambda alias : (alias["required"], alias["source"])) return domains -def get_mail_alias_map(env): - aliases = { } - for alias, targets in get_mail_aliases(env): - for em in targets.split(","): - em = em.strip().lower() - aliases.setdefault(em, []).append(alias) - return aliases - -def evaluate_mail_alias_map(email, aliases, env): - ret = set() - for alias in aliases.get(email.lower(), []): - ret.add(alias) - ret |= evaluate_mail_alias_map(alias, aliases, env) - return ret - def get_domain(emailaddr): return emailaddr.split('@', 1)[1] diff --git a/management/templates/users.html b/management/templates/users.html index ce9f663..2167a6b 100644 --- a/management/templates/users.html +++ b/management/templates/users.html @@ -1,13 +1,12 @@