mirror of
https://github.com/marcus-alicia/iRedAdmin-Pro-SQL.git
synced 2026-06-03 19:09:44 +00:00
Add files via upload
This commit is contained in:
62
templates/default/sql/domain/create.html
Normal file
62
templates/default/sql/domain/create.html
Normal file
@@ -0,0 +1,62 @@
|
||||
{% extends "layout.html" %}
|
||||
|
||||
{% from "macros/general.html" import display_add_domain with context %}
|
||||
|
||||
{% from "macros/msg_handlers.html" import
|
||||
domain_msg_handler,
|
||||
creation_limit_msg_handler
|
||||
with context %}
|
||||
|
||||
{% block title %}{{ _('Add domain') }}{% endblock title %}
|
||||
{% block navlinks_create %}class="active"{% endblock %}
|
||||
|
||||
{% block main %}
|
||||
{# Show system message #}
|
||||
{{ domain_msg_handler(msg) }}
|
||||
|
||||
{% if creation_limits['error_code'] %}
|
||||
{% for err in creation_limits['error_code'] %}
|
||||
{{ creation_limit_msg_handler(err) }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if creation_limits['create_new_domain'] %}
|
||||
{# num_spare_domains: -1 means no limit #}
|
||||
{% if creation_limits['num_spare_domains'] > 0 %}
|
||||
<div class="notification note-info">
|
||||
<p>{{ _('You can create <strong>%d</strong> more mail domains (Existing: %d, Max: %d)') |format(creation_limits['num_spare_domains'], creation_limits['num_managed_domains'], creation_limits['num_max_domains']) }}</p>
|
||||
</div>
|
||||
<div class="bt-space0"></div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
<div class="content-box">
|
||||
<div class="box-body">
|
||||
<div class="box-header clear">
|
||||
<h2>{{ _('Add domain') }}</h2>
|
||||
</div>
|
||||
|
||||
{{ display_add_domain(label=false,
|
||||
preferred_language=preferred_language,
|
||||
languagemaps=languagemaps,
|
||||
timezones=timezones,
|
||||
create_new_domain=creation_limits['create_new_domain'],
|
||||
num_max_domains=creation_limits['num_max_domains'],
|
||||
num_managed_domains=creation_limits['num_managed_domains'],
|
||||
num_spare_domains=creation_limits['num_spare_domains'],
|
||||
num_max_quota=creation_limits['num_max_quota'],
|
||||
num_allocated_quota=creation_limits['num_allocated_quota'],
|
||||
num_spare_quota=creation_limits['num_spare_quota'],
|
||||
num_max_users=creation_limits['num_max_users'],
|
||||
num_allocated_users=creation_limits['num_allocated_users'],
|
||||
num_spare_users=creation_limits['num_spare_users'],
|
||||
num_max_aliases=creation_limits['num_max_aliases'],
|
||||
num_allocated_aliases=creation_limits['num_allocated_aliases'],
|
||||
num_spare_aliases=creation_limits['num_spare_aliases'],
|
||||
num_max_lists=creation_limits['num_max_lists'],
|
||||
num_allocated_lists=creation_limits['num_allocated_lists'],
|
||||
num_spare_lists=creation_limits['num_spare_lists']) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock main %}
|
||||
286
templates/default/sql/domain/list.html
Normal file
286
templates/default/sql/domain/list.html
Normal file
@@ -0,0 +1,286 @@
|
||||
{% extends "layout.html" %}
|
||||
|
||||
{% from "macros/form_inputs.html" import
|
||||
input_csrf_token
|
||||
with context
|
||||
%}
|
||||
|
||||
{% from "macros/general.html" import
|
||||
set_account_status_img,
|
||||
set_account_activity_img,
|
||||
set_alias_domain_img,
|
||||
display_number_of_account_limited,
|
||||
display_progress_bar,
|
||||
display_filter_by_first_char,
|
||||
display_add_domain,
|
||||
show_pages,
|
||||
display_remove_mailbox_days
|
||||
with context
|
||||
%}
|
||||
|
||||
{% from "macros/msg_handlers.html" import domain_msg_handler with context %}
|
||||
|
||||
{% block title %}{{ _('Domains and Accounts') }}{% endblock %}
|
||||
{% block navlinks_domains %}class="active"{% endblock %}
|
||||
|
||||
{% block main %}
|
||||
{# Show system message #}
|
||||
{{ domain_msg_handler(msg) }}
|
||||
|
||||
{{ display_filter_by_first_char(baseurl=ctx.homepath + '/domains',
|
||||
first_char=first_char,
|
||||
available_chars=all_first_chars,
|
||||
account_type='domain',
|
||||
disabled_only=disabled_only) }}
|
||||
|
||||
{# List all domains under control. #}
|
||||
<div class="content-box">
|
||||
<div class="box-body">
|
||||
<div class="box-header clear">
|
||||
{% if session.get('is_global_admin') or session.get('create_new_domains') %}
|
||||
<ul class="tabs clear">
|
||||
<li><a href="{{ctx.homepath}}/create/domain"><i class="fa fa-plus"></i> {{ _('Add domain') }}</a></li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
<h2>
|
||||
{{ _('All domains under your control.') }} {% if disabled_only %}({{ _('Disabled') }}){% endif %}
|
||||
{% if total is defined and all_domain_profiles | length > 0 %}
|
||||
({{ (cur_page-1) * page_size_limit + 1 }}-{{ (cur_page-1) * page_size_limit + all_domain_profiles | length}}/{{ total }})
|
||||
{% endif %}
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
<form id="form_domains" method="post" action="{{ctx.homepath}}/domains">
|
||||
{{ input_csrf_token() }}
|
||||
|
||||
<table class="style1">
|
||||
<thead>
|
||||
<tr>
|
||||
{% if session.get('is_global_admin') or session.get('create_new_domains') %}
|
||||
<th class="checkbox"><input type="checkbox" class="checkbox select-all" /></th>
|
||||
{% endif %}
|
||||
<th data-sort="string-ins">{{ _('Domain') }}</th>
|
||||
<th data-sort="string-ins">{{ _('Display Name') }}</th>
|
||||
<th data-sort="int">{{ _('Quota') }}</th>
|
||||
<th data-sort="int">{{ _('Users') }}</th>
|
||||
<th data-sort="int">{{ _('Mailing Lists') }}</th>
|
||||
<th data-sort="int">{{ _('Aliases') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{% if all_domain_profiles %}
|
||||
{% for r in all_domain_profiles %}
|
||||
{% set domain = r.domain |e %}
|
||||
|
||||
<tr>
|
||||
{% if session.get('is_global_admin') or session.get('create_new_domains') %}
|
||||
<td class="checkbox vcenter">
|
||||
<input type="checkbox"
|
||||
class="checkbox"
|
||||
name="domainName"
|
||||
value="{{ domain }}" />
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
<td class="vcenter">
|
||||
<a href="{{ctx.homepath}}/profile/domain/general/{{ domain }}"
|
||||
title="{{ _('Edit domain profile') }}"
|
||||
>{{ domain }}</a>
|
||||
|
||||
<a href="{{ctx.homepath}}/profile/domain/general/{{ domain }}">
|
||||
<i class="fa fa-cog fa-lg fr-space" title="{{ _('Edit domain profile') }}"></i>
|
||||
</a>
|
||||
<a href="{{ctx.homepath}}/export/domain/{{domain}}"><i class="fas fa-download fr-space" title="{{ _('Export accounts') }}"></i></a>
|
||||
|
||||
{% set _alias_domains = all_alias_domains.get(domain, []) %}
|
||||
|
||||
{% set _pending_alias_domains = [] %}
|
||||
{% for d in _alias_domains %}
|
||||
{% if d in pending_domains %}
|
||||
{% do _pending_alias_domains.append(d) %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{{ set_account_activity_img('sent', 'domain', domain) }}
|
||||
|
||||
{# Check whether domain is a real backup mx #}
|
||||
{% set is_real_backupmx = false %}
|
||||
{% if r.backupmx == 1 and r.transport.startswith('relay:') %}
|
||||
{% set is_real_backupmx = true %}
|
||||
{% endif %}
|
||||
|
||||
{{ set_account_status_img(status=r.active,
|
||||
account_type='domain',
|
||||
is_relay=r.transport not in local_transports,
|
||||
relay=r.transport,
|
||||
backupmx=r.backupmx,
|
||||
is_backupmx=is_real_backupmx) }}
|
||||
|
||||
{{ set_alias_domain_img(alias_domains=_alias_domains) }}
|
||||
|
||||
{% if (domain in pending_domains) or _pending_alias_domains %}
|
||||
<span class="fr-space small_label bgcolor-red"
|
||||
style="vertical-align: middle;"
|
||||
><a href="{{ctx.homepath}}/verify/domain_ownership"
|
||||
style="text-decoration: none; color: white;"
|
||||
>{{ _('PLEASE VERIFY OWNERSHIP') }}</a>
|
||||
</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
<td class="vcenter">{% if r.description %}{{ r.description |cut_string |e }}{% endif %}</td>
|
||||
|
||||
{#-- Domain Quota --#}
|
||||
<td class="vcenter" data-sort-value="{{ r.maxquota }}">
|
||||
{% set used_quota = domain_used_quota.get(domain, {}).get('size', 0) %}
|
||||
|
||||
{% if r.maxquota > 0 %}
|
||||
{% set percent_allocated = r.quota_count |convert_to_percentage(r.maxquota) %}
|
||||
{% set percent_used_quota = (used_quota/1024/1024) |convert_to_percentage(r.maxquota) %}
|
||||
{% if session.get('is_global_admin') %}
|
||||
{#-- Link to domain profile page. --#}
|
||||
<a href="{{ctx.homepath}}/profile/domain/general/{{domain}}" style="text-decoration: none;"><span title="{{ _('Edit quota setting') }}">{{ percent_allocated }}%</span> <span class="color-grey"><span title="{{ _('Used') }}">({{ used_quota | file_size_format }}</span> / <span title="{{ _('Allocated') }}">{{ r.quota_count |file_size_format(base_mb=True) }}</span>) <span title="{{ _('Total') }}">{{ display_number_of_account_limited(r.maxquota |file_size_format(base_mb=True)) }}</span></a>
|
||||
{% else %}
|
||||
<span>{{ percent_allocated }}%</span> <span class="color-grey"><span title="{{ _('Used') }}">({{ used_quota | file_size_format }}</span> / <span title="{{ _('Allocated') }}">{{ r.quota_count |file_size_format(base_mb=True) }}</span>) <span title="{{ _('Total') }}">{{ display_number_of_account_limited(r.maxquota |file_size_format(base_mb=True)) }}</span></span>
|
||||
{% endif %}
|
||||
|
||||
{{ display_progress_bar(percent_used_quota, tooltip=_('Used'), style='thin') }}
|
||||
{{ display_progress_bar(percent_allocated, tooltip=_('Allocated'), style='thin') }}
|
||||
{% else %}
|
||||
{% if session.get('is_global_admin') %}
|
||||
<span title="{{ _('Used') }}">{{ used_quota | file_size_format }}</span> / <span title="{{ _('Allocated') }}">{{ r.quota_count |file_size_format(base_mb=True) }}</span> / <a href="{{ctx.homepath}}/profile/domain/general/{{domain}}" title="{{ _('Edit quota setting') }}" style="text-decoration: none;">{{ _('Unlimited') }}</a>
|
||||
{% else %}
|
||||
<span title="{{ _('Used') }}">{{ used_quota | file_size_format }}</span> / <span title="{{ _('Allocated') }}">{{ r.quota_count |file_size_format(base_mb=True) }}</span> / <span title="{{ _('Total') }}">{{ _('Unlimited') }}</span>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
{#-- Users --#}
|
||||
<td class="vcenter" data-sort-value="{{ r.mailboxes }}">
|
||||
{% if r.num_existing_users %}
|
||||
{% set num_existing_users = r.num_existing_users | int %}
|
||||
{% else %}
|
||||
{% set num_existing_users = 0 %}
|
||||
{% endif %}
|
||||
|
||||
{% if r.mailboxes > 0 %}
|
||||
{% set percentOfNumberOfUsers = num_existing_users |convert_to_percentage(r.mailboxes) %}
|
||||
|
||||
<a href="{{ctx.homepath}}/users/{{domain}}" title="{{ _('List all mail users.') }}" style="text-decoration: none; display: block; padding: 0 10px 0 10px;">{{ percentOfNumberOfUsers }}% <span class="color-grey">({% if num_existing_users is not sameas none %}{{ num_existing_users }}{% else %}0{% endif %} {{ display_number_of_account_limited(r.mailboxes) }})</span></a>
|
||||
{{ display_progress_bar(percentOfNumberOfUsers, style='thin') }}
|
||||
{% elif r.mailboxes == -1 %}
|
||||
<span class="color-grey"><em>{{ _('DISABLED') }}</em></span>
|
||||
{% else %}
|
||||
<a href="{{ctx.homepath}}/users/{{domain}}" title="{{ _('List all mail users.') }}" style="text-decoration: none; display: block; padding: 0 10px 0 10px;">{% if num_existing_users is not sameas none %}{{ num_existing_users }}{% else %}0{% endif %}</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
{#-- Mailing list --#}
|
||||
<td class="vcenter" data-sort-value="{{ r.maillists }}">
|
||||
{% if r.num_existing_maillists %}
|
||||
{% set num_existing_maillists = r.num_existing_maillists | int %}
|
||||
{% else %}
|
||||
{% set num_existing_maillists = 0 %}
|
||||
{% endif %}
|
||||
|
||||
{% if r.maillists > 0 %}
|
||||
{% set percentOfNumberOfMaillists= num_existing_maillists |convert_to_percentage(r.maillists) %}
|
||||
|
||||
<a href="{{ctx.homepath}}/mls/{{domain}}"
|
||||
title="{{ _('List all mailing lists.') }}"
|
||||
style="text-decoration: none; display: block; padding: 0 10px 0 10px;"
|
||||
>{{ percentOfNumberOfMaillists }}% <span class="color-grey">({{ num_existing_maillists }} {{ display_number_of_account_limited(r.maillists) }})</span></a>
|
||||
{{ display_progress_bar(percentOfNumberOfMaillists, style='thin') }}
|
||||
{% elif r.maillists == -1 %}
|
||||
<span class="color-grey"><em>{{ _('DISABLED') }}</em></span>
|
||||
{% else %}
|
||||
<a href="{{ctx.homepath}}/mls/{{domain}}"
|
||||
title="{{ _('List all mailing lists.') }}"
|
||||
style="text-decoration: none; display: block; padding: 0 10px 0 10px;">{% if num_existing_maillists is not sameas none %}{{ num_existing_maillists }}{% else %}0{% endif %}</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
{#-- Aliases --#}
|
||||
<td class="vcenter" data-sort-value="{{ r.aliases }}">
|
||||
{% if r.num_existing_aliases %}
|
||||
{% set num_existing_aliases = r.num_existing_aliases | int %}
|
||||
{% else %}
|
||||
{% set num_existing_aliases = 0 %}
|
||||
{% endif %}
|
||||
|
||||
{% if r.aliases > 0 %}
|
||||
{% set percentOfNumberOfAliases = num_existing_aliases |convert_to_percentage(r.aliases) %}
|
||||
|
||||
<a href="{{ctx.homepath}}/aliases/{{domain}}" title="{{ _('List all mail aliases.') }}" style="text-decoration: none; display: block; padding: 0 10px 0 10px;">{{ percentOfNumberOfAliases }}% <span class="color-grey">({{ num_existing_aliases }} {{ display_number_of_account_limited(r.aliases) }})</span></a>
|
||||
{{ display_progress_bar(percentOfNumberOfAliases, style='thin') }}
|
||||
{% elif r.aliases == -1 %}
|
||||
<span class="color-grey"><em>{{ _('DISABLED') }}</em></span>
|
||||
{% else %}
|
||||
<a href="{{ctx.homepath}}/aliases/{{domain}}" title="{{ _('List all mail aliases.') }}" style="text-decoration: none; display: block; padding: 0 10px 0 10px;">{% if num_existing_aliases is not sameas none %}{{ num_existing_aliases }}{% else %}0{% endif %}</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<tr>
|
||||
{% if session.get('is_global_admin') or session.get('create_new_domains') %}
|
||||
<td class="checkbox"></td>
|
||||
<td class="vcenter" colspan="5">{{ _('No mail domain available.') }}
|
||||
{% if not (first_char or disabled_only) %}
|
||||
<a href="{{ctx.homepath}}/create/domain">{{ _('Add one') }}</a>?
|
||||
{% endif %}
|
||||
</td>
|
||||
{% else %}
|
||||
<td class="vcenter" colspan="5">{{ _('No mail domain available.') }}</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endif %}
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="tab-footer clear f1">
|
||||
{% if session.get('is_global_admin') or session.get('create_new_domains') %}
|
||||
<div class="fl">
|
||||
<select name="action" class="fl-space" id="account_list_actions" >
|
||||
<option>{{ _('Choose Action') }}</option>
|
||||
<option disabled>----</option>
|
||||
<option value="enable">{{ _('Enable') }}</option>
|
||||
<option value="disable">{{ _('Disable') }}</option>
|
||||
<option value="delete">{{ _('Delete') }}</option>
|
||||
</select>
|
||||
|
||||
<select name="keep_mailbox_days" class="fl-space" id="account_delete_date">
|
||||
{% for _day in days_to_keep_removed_mailbox %}
|
||||
<option value="{{ _day }}">{{ display_remove_mailbox_days(_day) }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
|
||||
<input type="submit" name="submit_domains" value="{{ _('Apply') }}" class="button fl-space" />
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% set baseurl = ctx.homepath + '/domains' %}
|
||||
|
||||
{% if disabled_only %}
|
||||
{% set baseurl = ctx.homepath + '/domains/disabled' %}
|
||||
{% endif %}
|
||||
|
||||
{% set url_suffix = '' %}
|
||||
{% if first_char %}
|
||||
{% set url_suffix = url_suffix + '?starts_with=' + first_char %}
|
||||
{% endif %}
|
||||
|
||||
{{ show_pages(baseurl=baseurl,
|
||||
total=total,
|
||||
cur_page=cur_page,
|
||||
url_suffix=url_suffix) }}
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock main %}
|
||||
773
templates/default/sql/domain/profile.html
Normal file
773
templates/default/sql/domain/profile.html
Normal file
@@ -0,0 +1,773 @@
|
||||
{% extends "layout.html" %}
|
||||
|
||||
{% from "macros/form_inputs.html" import
|
||||
input_submit,
|
||||
input_csrf_token,
|
||||
input_text
|
||||
with context
|
||||
%}
|
||||
|
||||
{% from "macros/general.html" import
|
||||
display_subnav,
|
||||
set_account_status_img,
|
||||
set_account_activity_img,
|
||||
display_domain_cn,
|
||||
display_preferred_language,
|
||||
display_timezones,
|
||||
display_account_status,
|
||||
display_domain_backupmx,
|
||||
display_relay,
|
||||
display_sender_relayhost,
|
||||
display_domain_quota,
|
||||
display_domain_default_userquota,
|
||||
display_domain_max_user_quota,
|
||||
display_recipient_bcc,
|
||||
display_sender_bcc,
|
||||
display_disabled_account_profiles,
|
||||
display_disabled_domain_mail_services,
|
||||
display_per_account_wblist_all
|
||||
with context
|
||||
%}
|
||||
|
||||
{% from "macros/sql.html" import
|
||||
display_enabled_domain_services
|
||||
with context %}
|
||||
|
||||
{% from "macros/iredapd.html" import
|
||||
display_throttle_setting,
|
||||
display_greylisting_setting,
|
||||
display_greylisting_whitelists
|
||||
with context
|
||||
%}
|
||||
|
||||
{% from "macros/amavisd.html" import display_spam_policy with context %}
|
||||
{% from "macros/msg_handlers.html" import domain_msg_handler with context %}
|
||||
|
||||
{% block title %}{{ _('Edit account profile') }}{% endblock %}
|
||||
{% block navlinks_domains %}class="active"{% endblock %}
|
||||
|
||||
{% block breadcrumb %}
|
||||
{% set crumbs = [
|
||||
(ctx.homepath + '/domains', _('All domains')),
|
||||
('active', ctx.homepath + '/profile/domain/general/' + cur_domain, _('Profile of domain:') + ' ' + cur_domain),
|
||||
(ctx.homepath + '/users/' + cur_domain, _('Users')),
|
||||
(ctx.homepath + '/mls/' + cur_domain, _('Mailing Lists')),
|
||||
(ctx.homepath + '/aliases/' + cur_domain, _('Aliases')),
|
||||
(ctx.homepath + '/admins/' + cur_domain, _('Admins')),
|
||||
]
|
||||
%}
|
||||
|
||||
{% if backend != "pgsql" %}
|
||||
{% set crumbs = crumbs + [(ctx.homepath + '/users/' + cur_domain + '/last_logins', _('Last Logins'))] %}
|
||||
{% endif %}
|
||||
|
||||
{{ display_subnav(crumbs) }}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{# Domain profile. #}
|
||||
{% block main %}
|
||||
|
||||
{% if pending_domains %}
|
||||
<div class="notification note-attention">
|
||||
<p><strong>{{ _('Mail services are disabled for domain(s): %s, please <a href="%s/verify/domain_ownership">verify domain ownership</a> first.' | format(pending_domains |join(', '), ctx.homepath)) }}</strong></p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{# Show system message #}
|
||||
{{ domain_msg_handler(msg) }}
|
||||
|
||||
{% set enabled_services = domain_settings.get('enabled_services', []) %}
|
||||
{% set disabled_mail_services = domain_settings.get('disabled_mail_services', []) %}
|
||||
{% set disabled_domain_profiles = domain_settings.get('disabled_domain_profiles', []) %}
|
||||
{% set disabled_user_profiles = domain_settings.get('disabled_user_profiles', []) %}
|
||||
{% set disabled_user_preferences = domain_settings.get('disabled_user_preferences', []) %}
|
||||
|
||||
{% if session.get('is_global_admin') %}
|
||||
{% set navlinks = [
|
||||
('general', _('General'), [true]),
|
||||
('bcc', _('BCC'), [true]),
|
||||
('relay', _('Relay'), [true]),
|
||||
('catchall', _('Catch-all'), [true]),
|
||||
('aliases', _('Aliases'), [true]),
|
||||
('throttle', _('Throttling'), [session.get('iredapd_enabled')]),
|
||||
('greylisting', _('Greylisting'), [session.get('iredapd_enabled')]),
|
||||
('wblist', _('White/Blacklist'), [session.get('amavisd_enable_policy_lookup')]),
|
||||
('spampolicy', _('Spam Policy'), [session.get('amavisd_enable_policy_lookup')]),
|
||||
('backupmx', _('Backup MX'), [true]),
|
||||
('advanced', _('Advanced'), [true]),
|
||||
]
|
||||
%}
|
||||
{% else %}
|
||||
{% set navlinks = [
|
||||
('general', _('General'), [true]),
|
||||
('bcc', _('BCC'), ['bcc' not in disabled_domain_profiles]),
|
||||
('relay', _('Relay'), ['relay' not in disabled_domain_profiles]),
|
||||
('catchall', _('Catch-all'), ['catchall' not in disabled_domain_profiles]),
|
||||
('aliases', _('Aliases'), ['aliases' not in disabled_domain_profiles]),
|
||||
('throttle', _('Throttling'), ['throttle' not in disabled_domain_profiles, session.get('iredapd_enabled')]),
|
||||
('greylisting', _('Greylisting'), ['greylisting' not in disabled_domain_profiles, session.get('iredapd_enabled')]),
|
||||
('wblist', _('White/Blacklist'), [(session.get('amavisd_enable_policy_lookup') and 'wblist' not in disabled_domain_profiles)]),
|
||||
('spampolicy', _('Spam Policy'), [(session.get('amavisd_enable_policy_lookup') and 'spampolicy' not in disabled_domain_profiles)]),
|
||||
('backupmx', _('Backup MX'), ['backupmx' not in disabled_domain_profiles]),
|
||||
('advanced', _('Advanced'), [true]),
|
||||
]
|
||||
%}
|
||||
{% endif %}
|
||||
|
||||
<div class="content-box">
|
||||
<div class="box-body">
|
||||
|
||||
{#-- Links --#}
|
||||
<div class="box-header clear">
|
||||
<ul class="tabs clear">
|
||||
{% for nav in navlinks %}
|
||||
{% if not false in nav[2] and not none in nav[2] %}
|
||||
<li><a href="#profile_{{ nav[0] }}">{{ nav[1] }}</a></li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<h2>{{ set_account_activity_img('sent', 'domain', cur_domain, float=false) }}</h2>
|
||||
</div>{# .box-header #}
|
||||
|
||||
<div class="box-wrap clear">
|
||||
{# profile_type: general #}
|
||||
<div id="profile_general">
|
||||
<form name="general" method="post" action="{{ctx.homepath}}/profile/domain/general/{{cur_domain}}">
|
||||
{{ input_csrf_token() }}
|
||||
|
||||
<div class="columns clear">
|
||||
<div class="col3-4 ">
|
||||
{% if cur_domain not in pending_domains %}
|
||||
{# normal admin, and not domain ownership verification required #}
|
||||
{{ display_account_status(profile.active, account_type='domain') }}
|
||||
{% endif %}
|
||||
{{ display_domain_cn(cn=profile.description) }}
|
||||
</div>{# .col2-3 #}
|
||||
</div>
|
||||
|
||||
{% if session.get('is_global_admin') or session.get('create_new_domains') %}
|
||||
<div class="columns clear">
|
||||
<div class="col2-3">
|
||||
{{ display_domain_quota(
|
||||
quota=profile.maxquota | int,
|
||||
required=(session.get('create_new_domains') and (creation_limits['num_max_quota'] > 0)),
|
||||
num_allocated_quota=creation_limits['num_allocated_quota'],
|
||||
num_max_quota=creation_limits['num_max_quota'],
|
||||
num_spare_quota=creation_limits['num_spare_quota'],
|
||||
) }}
|
||||
</div>{# .col2-3 #}
|
||||
|
||||
{% if session.get('is_global_admin') %}
|
||||
<div class="col1-3 lastcol">
|
||||
<div class="mark_blue bt-space10">
|
||||
<ul class="standard clean-padding bt-space10">
|
||||
<li class="bt-space5">{{ _('Set to 0 for unlimited.') }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>{# .columns #}
|
||||
{% endif %}
|
||||
|
||||
<div class="rule"> </div>
|
||||
<div class="columns clear">
|
||||
<div class="col2-3">
|
||||
{% set default_user_quota = domain_settings.get('default_user_quota', '0') | int %}
|
||||
{% set max_user_quota = domain_settings.get('max_user_quota', 0) | int %}
|
||||
|
||||
{{ display_domain_default_userquota(default_user_quota, max_user_quota=max_user_quota) }}
|
||||
|
||||
{% if session.get('is_global_admin') %}
|
||||
{{ display_domain_max_user_quota(max_user_quota) }}
|
||||
{% endif %}
|
||||
</div>{# .col2-3 #}
|
||||
|
||||
{% if session.get('is_global_admin') %}
|
||||
<div class="col1-3 lastcol">
|
||||
<div class="mark_blue bt-space10">
|
||||
<ul class="standard clean-padding bt-space10">
|
||||
<li class="bt-space5">{{ _('Domain admin cannot assign more than max quota to a mail user.') }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>{# .col1-3 #}
|
||||
{% endif %}
|
||||
</div>{# .columns #}
|
||||
|
||||
{{ input_submit() }}
|
||||
</form>
|
||||
</div><!-- . profile_general -->
|
||||
|
||||
{# profile_type: bcc #}
|
||||
{% if session.get('is_global_admin') or 'bcc' not in disabled_domain_profiles %}
|
||||
<div id="profile_bcc">
|
||||
<form name="bcc" method="post" action="{{ctx.homepath}}/profile/domain/bcc/{{cur_domain}}">
|
||||
{{ input_csrf_token() }}
|
||||
<div class="columns clear">
|
||||
<div class="col2-3 ">
|
||||
{{ display_recipient_bcc(address=profile.rbcc_addr) }}
|
||||
{{ display_sender_bcc(address=profile.sbcc_addr) }}
|
||||
</div>{#-- .col2-3 --#}
|
||||
|
||||
<div class="col1-3 lastcol">
|
||||
<div class="mark_blue bt-space10">
|
||||
<ul class="standard clean-padding bt-space10">
|
||||
<li class="bt-space5">{{ _('Multiple addresses are NOT supported.') }}</li>
|
||||
<li class="bt-space5">{{ _('Per-user bcc settings has higher priority than per-domain bcc settings.') }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>{#-- .col1-3 --#}
|
||||
</div>{#-- .columns --#}
|
||||
|
||||
{{ input_submit() }}
|
||||
</form>
|
||||
</div><!-- #profile_bcc -->
|
||||
{% endif %}
|
||||
|
||||
{# profile_type: relay #}
|
||||
{% if session.get('is_global_admin') or 'relay' not in disabled_domain_profiles %}
|
||||
<div id="profile_relay">
|
||||
<form name="relay" method="post" action="{{ctx.homepath}}/profile/domain/relay/{{cur_domain}}">
|
||||
{{ input_csrf_token() }}
|
||||
{{ display_relay(transport=profile.transport |string,
|
||||
default_mta_transport=default_mta_transport,
|
||||
is_backupmx=profile.backupmx) }}
|
||||
|
||||
<div class="rule"></div>
|
||||
{{ display_sender_relayhost(relayhost=profile.relayhost) }}
|
||||
|
||||
{{ input_submit() }}
|
||||
</form>
|
||||
</div><!-- #profile_relay -->
|
||||
{% endif %}
|
||||
|
||||
{# profile_type: catchall #}
|
||||
{% if session.get('is_global_admin') or 'catchall' not in disabled_domain_profiles %}
|
||||
<div id="profile_catchall">
|
||||
<form name="catchall" method="post" action="{{ctx.homepath}}/profile/domain/catchall/{{cur_domain}}">
|
||||
{{ input_csrf_token() }}
|
||||
<div class="columns clear">
|
||||
<div class="col2-3 ">
|
||||
<div class="form-field clear">
|
||||
<h4 class="size-250 fl-space">{{ _('Catch-all Addresses') }}</h4>
|
||||
<small>{{ _('One mail address per line. Invalid address will be discarded.') }}</small>
|
||||
<textarea name="catchall_addresses"
|
||||
rows="6"
|
||||
style="width: 50%"
|
||||
class="textarea" >{%- for addr in profile.catchall |sort %}{{ addr |e }}
|
||||
{% endfor -%}
|
||||
</textarea>
|
||||
</div>
|
||||
</div>{#-- .col2-3 --#}
|
||||
|
||||
<div class="col1-3 lastcol">
|
||||
<div class="notification note-attention">
|
||||
<p>{{ _('Catch-all address may receive many spam emails.') }}</p>
|
||||
</div>
|
||||
|
||||
<div class="mark_blue bt-space10">
|
||||
<ul class="standard clean-padding bt-space10">
|
||||
<li class="bt-space5">{{ _('Emails delivered to non-exist mail accounts will be forwarded to catch-all address(es).') }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>{#-- .col1-3 --#}
|
||||
</div>{#-- .columns --#}
|
||||
|
||||
{{ input_submit() }}
|
||||
</form>
|
||||
</div><!-- #profile_catchall -->
|
||||
{% endif %}
|
||||
|
||||
{# profile_type: aliases #}
|
||||
{% if session.get('is_global_admin') or 'aliases' not in disabled_domain_profiles %}
|
||||
<div id="profile_aliases">
|
||||
<form name="aliases" method="post" action="{{ctx.homepath}}/profile/domain/aliases/{{cur_domain}}">
|
||||
{{ input_csrf_token() }}
|
||||
|
||||
<div class="columns clear">
|
||||
<div class="col2-3 ">
|
||||
<div class="form-field clear">
|
||||
<h4 class="size-250 fl-space">{{ _('Alias domains') }}</h4>
|
||||
|
||||
{% if alias_domains %}
|
||||
{% for d in alias_domains |sort %}
|
||||
{% if not loop.first %}
|
||||
</div>
|
||||
<div class="form-field clear">
|
||||
<h4 class="size-250 fl-space"> </h4>
|
||||
{% endif %}
|
||||
|
||||
<input type="text" name="domainAliasName" value="{{ d |e }}" size="35" class="text" />
|
||||
{% if d in pending_domains %}<small> {{ _('Domain ownership verification required') }}</small>{% endif %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<input type="text" name="domainAliasName" value="" size="35" class="text" />
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{#-- Always display an empty input field to add new value --#}
|
||||
<div class="form-field clear">
|
||||
{% if domainAliasName |length == 0 %}
|
||||
<h4 class="size-250 fl-space"> </h4>
|
||||
{% else %}
|
||||
<h4 class="size-250 fl-space"> </h4>
|
||||
{% endif %}
|
||||
<input type="text" name="domainAliasName" value="{{ d |e }}" size="35" class="text" />
|
||||
</div>
|
||||
</div>{# .col2-3 #}
|
||||
|
||||
<div class="col1-3 lastcol">
|
||||
<div class="mark_blue bt-space10">
|
||||
<ul class="standard clean-padding bt-space10">
|
||||
<li class="bt-space5">{{ _('Emails sent to <em><strong>user@[ALIAS_DOMAIN]</strong></em> will be delivered to <em><strong>user@%s</strong></em>.') |format(cur_domain) }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>{#-- .col1-3 --#}
|
||||
</div>{#-- .columns --#}
|
||||
{{ input_submit() }}
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{# profile_type: throttling #}
|
||||
{% if session.get('is_global_admin') or 'throttle' not in disabled_domain_profiles %}
|
||||
|
||||
<div id="profile_throttle">
|
||||
<form name="throttle" method="post" action="{{ctx.homepath}}/profile/domain/throttle/{{cur_domain}}">
|
||||
{{ input_csrf_token() }}
|
||||
|
||||
{% if session.get('iredapd_enabled') %}
|
||||
{# Throttling with iRedAPD #}
|
||||
<div class="columns clear">
|
||||
{{ input_csrf_token() }}
|
||||
|
||||
{{ display_throttle_setting(account='@' + cur_domain,
|
||||
setting=outbound_throttle_setting,
|
||||
inout_type='outbound') }}
|
||||
{{ display_throttle_setting(account='@' + cur_domain,
|
||||
setting=inbound_throttle_setting,
|
||||
inout_type='inbound',
|
||||
with_left_border=true) }}
|
||||
|
||||
<div class="col1-3 lastcol">
|
||||
<div class="mark_blue bt-space10">
|
||||
<ul class="standard clean-padding bt-space10">
|
||||
<li class="bt-space5">{{ _('This throttle setting will be applied to all individual accounts under domain %s.') |format(cur_domain) }}</li>
|
||||
<li class="bt-space5">{{ _('You can set per-user throttling in account profile page.') }}</li>
|
||||
<li class="bt-space5">{{ _('Per-user throttle setting has higher priority.') }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>{#-- .col1-3 --#}
|
||||
</div>{# .columns #}
|
||||
{% endif %}
|
||||
|
||||
{{ input_submit() }}
|
||||
</form>
|
||||
</div>{# #profile_throttle #}
|
||||
{% endif %}
|
||||
|
||||
{# profile_type: greylisting, with iRedAPD #}
|
||||
{% if session.get('is_global_admin') or 'greylisting' not in disabled_domain_profiles %}
|
||||
|
||||
{% if session.get('iredapd_enabled') %}
|
||||
<div id="profile_greylisting">
|
||||
<form name="greylisting" method="post" action="{{ctx.homepath}}/profile/domain/greylisting/{{cur_domain}}">
|
||||
{{ input_csrf_token() }}
|
||||
|
||||
{{ display_greylisting_setting(account='@' + cur_domain, gl_setting=gl_setting) }}
|
||||
{{ display_greylisting_whitelists(account='@' + cur_domain, gl_whitelists=gl_whitelists) }}
|
||||
|
||||
{{ input_submit() }}
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{# wblist #}
|
||||
{% if session.get('amavisd_enable_policy_lookup') and (session.get('is_global_admin') or ('wblist' not in disabled_domain_profiles)) %}
|
||||
<div id="profile_wblist">
|
||||
<form name="wblist" method="post" action="{{ctx.homepath}}/profile/domain/wblist/{{cur_domain}}">
|
||||
{{ input_csrf_token() }}
|
||||
|
||||
{{ display_per_account_wblist_all(inbound_whitelists=whitelists,
|
||||
inbound_blacklists=blacklists,
|
||||
outbound_whitelists=outbound_whitelists,
|
||||
outbound_blacklists=outbound_blacklists) }}
|
||||
|
||||
{{ input_submit() }}
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{# profile_type: spampolicy #}
|
||||
{% if session.get('amavisd_enable_policy_lookup') and (session.get('is_global_admin') or ('spampolicy' not in disabled_domain_profiles)) %}
|
||||
<div id="profile_spampolicy">
|
||||
<form name="spampolicy" method="post" action="{{ctx.homepath}}/system/spampolicy/{{cur_domain}}">
|
||||
{{ input_csrf_token() }}
|
||||
{{ display_spam_policy(account_type='domain',
|
||||
spampolicy=spampolicy,
|
||||
custom_ban_rules=custom_ban_rules,
|
||||
global_spam_score=global_spam_score) }}
|
||||
{{ input_submit() }}
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{# profile_type: advanced #}
|
||||
<div id="profile_advanced">
|
||||
<form name="advanced" method="post" action="{{ctx.homepath}}/profile/domain/advanced/{{cur_domain}}">
|
||||
{{ input_csrf_token() }}
|
||||
|
||||
{% if session.get('is_global_admin') or session.get('create_new_domains') %}
|
||||
<div class="columns clear">
|
||||
<div class="col2-3 ">
|
||||
<div class="form-field clear">
|
||||
<a name="accountLimit"> </a>
|
||||
<h4 class="size-250 fl-space">{{ _('Number of max mail users') }}
|
||||
{% if session.get('create_new_domains') %}
|
||||
{% if creation_limits['num_max_users'] > 0 -%}<span class="required">*</span>{% endif %}
|
||||
{% endif %}
|
||||
</h4>
|
||||
<span class="clean-padding fl-space">
|
||||
<input type="text" size="8"
|
||||
name="numberOfUsers"
|
||||
value="{% if profile.mailboxes != 0 %}{{ profile.mailboxes |e }}{% endif %}"
|
||||
class="text fl-space" />
|
||||
{% if session.get('is_global_admin') %}
|
||||
<label>{{ _('%s account(s) exist.') |format(profile.num_existing_users |e) }}</label>
|
||||
{% elif session.get('create_new_domains') %}
|
||||
{% if creation_limits['num_max_users'] > 0 %}
|
||||
<label>{{ _('Max:') }} {{ profile.mailboxes |int + creation_limits['num_spare_users'] }}</label>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="form-field clear">
|
||||
<h4 class="size-250 fl-space">{{ _('Number of max mail aliases') }}
|
||||
{% if session.get('create_new_domains') %}
|
||||
{% if creation_limits['num_max_aliases'] > 0 -%}<span class="required">*</span>{% endif %}
|
||||
{% endif %}
|
||||
</h4>
|
||||
<span class="clean-padding">
|
||||
<input type="text" size="8"
|
||||
name="numberOfAliases"
|
||||
value="{% if profile.aliases != 0 %}{{ profile.aliases |e }}{% endif %}"
|
||||
class="text fl-space" />
|
||||
{% if session.get('is_global_admin') %}
|
||||
<label>{{ _('%s account(s) exist.') |format(all_alias_accounts |length |string) }}</label>
|
||||
{% elif session.get('create_new_domains') %}
|
||||
{% if creation_limits['num_max_aliases'] > 0 %}
|
||||
<label>{{ _('Max:') }} {{ profile.aliases |int + creation_limits['num_spare_aliases'] }}</label>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="form-field clear">
|
||||
<h4 class="size-250 fl-space">{{ _('Number of max mailing lists') }}
|
||||
{% if session.get('create_new_domains') %}
|
||||
{% if creation_limits['num_max_lists'] > 0 -%}<span class="required">*</span>{% endif %}
|
||||
{% endif %}
|
||||
</h4>
|
||||
<span class="clean-padding">
|
||||
<input type="text" size="8"
|
||||
name="numberOfLists"
|
||||
value="{% if profile.maillists != 0 %}{{ profile.maillists |e }}{% endif %}"
|
||||
class="text fl-space" />
|
||||
{% if session.get('is_global_admin') %}
|
||||
<label>{{ _('%s account(s) exist.') |format(mails_of_all_mailing_lists |length |string) }}</label>
|
||||
{% elif session.get('create_new_domains') %}
|
||||
{% if creation_limits['num_max_lists'] > 0 %}
|
||||
<label>{{ _('Max:') }} {{ profile.maillists |int + creation_limits['num_spare_lists'] }}</label>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</span>
|
||||
</div>
|
||||
<div class="clear bt-space"> </div>
|
||||
</div><!-- .col2-3 -->
|
||||
|
||||
<div class="col1-3 lastcol">
|
||||
<div class="mark_blue bt-space10">
|
||||
<ul class="standard clean-padding bt-space10">
|
||||
{% if session.get('is_global_admin') %}
|
||||
<li class="bt-space5">{{ _('Set value to 0 or leave it empty for unlimited.') }}</li>
|
||||
<li class="bt-space5">{{ _('Set value to -1 means not allowed to create this kind of account.') }}</li>
|
||||
{% elif session.get('create_new_domains') %}
|
||||
<li class="bt-space5">{{ _('Leave it empty to use max value.') }}</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
</div><!-- .col1-3 -->
|
||||
</div><!-- .columns -->
|
||||
{% endif %}
|
||||
|
||||
{# Password length #}
|
||||
{% if session.get('is_global_admin') or ('password_policies' not in disabled_domain_profiles) %}
|
||||
<div class="columns clear">
|
||||
<div class="col2-3 ">
|
||||
{% set min_passwd_length = domain_settings.get('min_passwd_length') %}
|
||||
{% set max_passwd_length = domain_settings.get('max_passwd_length') %}
|
||||
|
||||
{% if session.get('is_global_admin') %}
|
||||
{% set comment_min_passwd_length = none %}
|
||||
{% set comment_max_passwd_length = none %}
|
||||
{% else %}
|
||||
{% if global_min_passwd_length > 0 %}
|
||||
{% set comment_min_passwd_length = _('Can not be shorter than') + ' ' + (global_min_passwd_length | string ) %}
|
||||
{% else %}
|
||||
{% set comment_min_passwd_length = none %}
|
||||
{% endif %}
|
||||
|
||||
{% if global_max_passwd_length > 0 %}
|
||||
{% if global_min_passwd_length > 0 %}
|
||||
{% set comment_max_passwd_length = _('Can not be shorter than') + ' ' + (global_min_passwd_length | string ) + ' ' + _('or longer than') + ' ' + (global_max_passwd_length | string) %}
|
||||
{% else %}
|
||||
{% set comment_max_passwd_length = _('Can not be longer than') + ' ' + (global_max_passwd_length | string) %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if global_min_passwd_length > 0 %}
|
||||
{% set comment_max_passwd_length = _('Can not be shorter than') + ' ' + (global_min_passwd_length | string ) %}
|
||||
{% else %}
|
||||
{% set comment_max_passwd_length = none %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{{ input_text(label=_('Minimum password length'),
|
||||
input_name='minPasswordLength',
|
||||
value=min_passwd_length,
|
||||
size=8,
|
||||
comment=comment_min_passwd_length,
|
||||
comment_as_text=True) }}
|
||||
|
||||
{{ input_text(label=_('Maximum password length'),
|
||||
input_name='maxPasswordLength',
|
||||
value=max_passwd_length,
|
||||
size=8,
|
||||
comment=comment_max_passwd_length,
|
||||
comment_as_text=True) }}
|
||||
|
||||
</div>{# .col2-3 #}
|
||||
|
||||
<div class="col1-3 lastcol">
|
||||
<div class="mark_blue bt-space10">
|
||||
<ul class="standard clean-padding bt-space10">
|
||||
<li class="bt-space5">{{ _('Leave it empty to use server-wide default setting.') }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>{#-- .col1-3 --#}
|
||||
</div>{#-- .columns --#}
|
||||
{% endif %}
|
||||
|
||||
<div class="rule"></div>
|
||||
<div class="columns clear">
|
||||
<div class="col2-3 ">
|
||||
{{ display_preferred_language(
|
||||
value=domain_settings.get('default_language'),
|
||||
languagemaps=languagemaps,
|
||||
label=_('Default language for new user')) }}
|
||||
{{ display_timezones(value=domain_settings.get('timezone'), timezones=timezones) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if session.get('is_global_admin') or 'bcc' not in disabled_domain_profiles %}
|
||||
<div class="rule"></div>
|
||||
<div class="columns clear">
|
||||
<div class="col2-3 ">
|
||||
{{ display_recipient_bcc(address=domain_settings.get('default_recipient_bcc', ''), label=_('Default bcc address for incoming emails for new user')) }}
|
||||
{{ display_sender_bcc(address=domain_settings.get('default_sender_bcc', ''), label=_('Default bcc address for outgoing emails for new user')) }}
|
||||
</div><!-- .col2-3 -->
|
||||
|
||||
<div class="col1-3 lastcol">
|
||||
<div class="mark_blue bt-space10">
|
||||
<ul class="standard clean-padding bt-space10">
|
||||
<li class="bt-space5">{{ _('These addresses will be assigned to newly created mail user as per-user bcc address.') }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div><!-- .col1-3 -->
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="columns clear">
|
||||
<div class="col2-3 ">
|
||||
<div class="form-field clear">
|
||||
<h4 class="size-250 fl-space">{{ _('Default mailing list(s) of new user') }}</h4>
|
||||
<div class="checklist clear">
|
||||
<fieldset>
|
||||
{% if domain_settings.get('default_mailing_lists', []) %}
|
||||
{% set default_mailing_lists = domain_settings.get('default_mailing_lists') %}
|
||||
{% else %}
|
||||
{% set default_mailing_lists = [] %}
|
||||
{% endif %}
|
||||
|
||||
{# Show non-exist lists which still stored in default_mailing_lists #}
|
||||
{% for addr in default_mailing_lists |sort %}
|
||||
{% if addr and addr not in mails_of_all_mailing_lists %}
|
||||
<div class="checklist-item">
|
||||
<span class="clean-padding">
|
||||
<input type="checkbox"
|
||||
name="default_mail_list"
|
||||
class="checkbox fl-space"
|
||||
rel="checkboxhorizont"
|
||||
checked="checked"
|
||||
value="{{ addr |e }}"
|
||||
/>
|
||||
</span>
|
||||
<label>{{ addr |e }} (<span class="required">{{ _('Warning') }}: {{ _('Account does not exist.') }}</span>)</label>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% for rcd in all_mailing_lists %}
|
||||
<div class="checklist-item">
|
||||
<span class="clean-padding">
|
||||
<input type="checkbox"
|
||||
name="default_mail_list"
|
||||
class="checkbox fl-space"
|
||||
rel="checkboxhorizont"
|
||||
value="{{ rcd.address |e }}"
|
||||
{% if rcd.address in default_mailing_lists %}checked="checked"{% endif %}
|
||||
/>
|
||||
</span>
|
||||
<label>
|
||||
<a href="{{ctx.homepath}}/profile/ml/general/{{ rcd.address |e }}">{% if rcd.name %}{{ rcd.name |e }}{% else %}{{ rcd.address.split('@', 1)[0] }}{% endif %}</a> ({{ rcd.address |e }})
|
||||
</label>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
{% endfor %}
|
||||
</fieldset>
|
||||
</div>
|
||||
</div><!-- .form-field -->
|
||||
</div><!-- .col2-3 -->
|
||||
|
||||
<div class="col1-3 lastcol">
|
||||
<div class="mark_blue bt-space10">
|
||||
<ul class="standard clean-padding bt-space10">
|
||||
<li class="bt-space5"><a href="{{ctx.homepath}}/create/ml/{{ cur_domain }}" class="action_add">{{ _('Add mailing list') }}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div><!-- .col1-3 -->
|
||||
</div><!-- .columns -->
|
||||
|
||||
<div class="columns clear">
|
||||
<div class="col2-3 ">
|
||||
<div class="form-field clear">
|
||||
<h4 class="size-250 fl-space">{{ _('Default mail alias(es) of new user') }}</h4>
|
||||
<div class="checklist clear">
|
||||
<fieldset>
|
||||
{% if domain_settings.get('default_groups', []) %}
|
||||
{% set default_groups = domain_settings.get('default_groups') %}
|
||||
{% else %}
|
||||
{% set default_groups = [] %}
|
||||
{% endif %}
|
||||
|
||||
{# Show non-exist lists which still stored in default_groups #}
|
||||
{% for addr in default_groups |sort %}
|
||||
{% if addr and addr not in mails_of_all_alias_accounts %}
|
||||
<div class="checklist-item">
|
||||
<span class="clean-padding">
|
||||
<input type="checkbox"
|
||||
name="defaultList"
|
||||
class="checkbox fl-space"
|
||||
rel="checkboxhorizont"
|
||||
checked="checked"
|
||||
value="{{ addr |e }}"
|
||||
/>
|
||||
</span>
|
||||
<label>{{ addr |e }} (<span class="required">{{ _('Warning') }}: {{ _('Account does not exist.') }}</span>)</label>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% for rcd in all_alias_accounts %}
|
||||
<div class="checklist-item">
|
||||
<span class="clean-padding">
|
||||
<input type="checkbox"
|
||||
name="defaultList"
|
||||
class="checkbox fl-space"
|
||||
rel="checkboxhorizont"
|
||||
value="{{ rcd.address |e }}"
|
||||
{% if rcd.address in default_groups %}checked="checked"{% endif %}
|
||||
/>
|
||||
</span>
|
||||
<label>
|
||||
<a href="{{ctx.homepath}}/profile/alias/general/{{ rcd.address |e }}">{% if rcd.name %}{{ rcd.name |e }}{% else %}{{ rcd.address.split('@', 1)[0] }}{% endif %}</a> ({{ rcd.address |e }})
|
||||
</label>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
{% endfor %}
|
||||
</fieldset>
|
||||
</div>
|
||||
</div><!-- .form-field -->
|
||||
</div><!-- .col2-3 -->
|
||||
|
||||
<div class="col1-3 lastcol">
|
||||
<div class="mark_blue bt-space10">
|
||||
<ul class="standard clean-padding bt-space10">
|
||||
<li class="bt-space5"><a href="{{ctx.homepath}}/create/alias/{{ cur_domain }}" class="action_add">{{ _('Add mail alias') }}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div><!-- .col1-3 -->
|
||||
</div><!-- .columns -->
|
||||
|
||||
<div class="rule"></div>
|
||||
{# Enabled services #}
|
||||
{{ display_enabled_domain_services(enabled_services=enabled_services) }}
|
||||
|
||||
{# Disabled per-domain mail services #}
|
||||
{% if session.get('is_global_admin') or 'disabled_mail_services' not in disabled_domain_profiles %}
|
||||
<div class="rule"></div>
|
||||
{{ display_disabled_domain_mail_services(disabled_mail_services=disabled_mail_services) }}
|
||||
{% endif %}
|
||||
|
||||
{% if session.get('is_global_admin') %}
|
||||
<div class="rule"></div>
|
||||
{# Disabled domain profiles #}
|
||||
{{ display_disabled_account_profiles(account_type='domain',
|
||||
disabled_profiles=disabled_domain_profiles) }}
|
||||
|
||||
<div class="rule"></div>
|
||||
{# Disabled user profiles #}
|
||||
{{ display_disabled_account_profiles(account_type='user',
|
||||
disabled_profiles=disabled_user_profiles) }}
|
||||
{% endif %}
|
||||
|
||||
<div class="rule"></div>
|
||||
{# Disabled user profiles #}
|
||||
{{ display_disabled_account_profiles(account_type='user_preference',
|
||||
disabled_profiles=disabled_user_preferences) }}
|
||||
|
||||
{{ input_submit() }}
|
||||
</form>
|
||||
</div><!-- #profile_advanced -->
|
||||
|
||||
{# profile_type: backupmx #}
|
||||
{% if session.get('is_global_admin') or 'backupmx' not in disabled_domain_profiles %}
|
||||
<div id="profile_backupmx">
|
||||
<form name="backupmx" method="post" action="{{ctx.homepath}}/profile/domain/backupmx/{{cur_domain}}">
|
||||
{{ input_csrf_token() }}
|
||||
|
||||
{{ display_domain_backupmx(domain=cur_domain,
|
||||
backupmx=profile.backupmx,
|
||||
transport=profile.transport) }}
|
||||
|
||||
{{ input_submit() }}
|
||||
</form>
|
||||
</div><!-- #profile_backupmx -->
|
||||
{% endif %}
|
||||
|
||||
</div><!-- .box-wrap -->
|
||||
</div><!-- .box-body -->
|
||||
</div><!-- .content-box -->
|
||||
{% endblock main %}
|
||||
|
||||
{% block extra_js %}
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$(".tabs li").idTabs("profile_{{ profile_type }}")
|
||||
});
|
||||
</script>
|
||||
{% endblock extra_js %}
|
||||
Reference in New Issue
Block a user