{# version, hostname, uptime, loadavg, #} {% extends "layout.html" %} {% from "macros/msg_handlers.html" import success_info, error_info with context %} {% block title %} {{ _('Dashboard') }} {% endblock %} {% block navlinks_dashboard %}class="active"{% endblock %} {% block main %} {# Checked and get response data #} {% if session.get('new_version_available') %} {{ success_info( _("New version of iRedAdmin-Pro, %s, is now available for upgrading. Details") |format(session.get('new_version') |e, ctx.homepath), removable=false, trusted=true ) }} {% elif session.get('new_version_available') is sameas false %} {# Error while checking new version #} {{ error_info( _('Error while checking new version of iRedAdmin-Pro:') + ' ' + session.get('new_version_check_error') |e ) }} {% endif %}
{% if session.get('amavisd_enable_logging') or session.get('fail2ban_enabled') or session.get('iredapd_enabled') %}

{{ _('Statistics of latest 24 hours') |title }}

{% if session.get('amavisd_enable_logging') %} {% if session.get('disable_viewing_mail_log') %} {% else %} {% endif %} {% if session.get('disable_viewing_mail_log') %} {% else %} {% endif %} {% if session.get('amavisd_enable_quarantine') %} {% if session.get('disable_viewing_mail_log') %} {% else %} {% endif %} {% if session.get('disable_managing_quarantined_mails') %} {% else %} {% endif %} {% endif %} {% endif %} {% if session.get('iredapd_enabled') %} {% endif %} {% if session.get('is_global_admin') and session.get('fail2ban_enabled') %} {% endif %}
{{ _('Received') }}{{ num_incoming_mails }}{{ num_incoming_mails }}
{{ _('Sent') }}{{ num_outgoing_mails }}{{ num_outgoing_mails }}
{{ _('Virus') }}{{ num_virus }}{{ num_virus }}
{{ _('Quarantined') }}{{ num_quarantined }}{{ num_quarantined }}
{{ _('Rejected Messages') }} {{ num_rejected }}
{{ _('Outbound SMTP Sessions') }} {{ num_smtp_outbound_sessions }}
{{ _('Banned IP Addresses') }} {{ num_banned }}
{% endif %}

{{ _('System Information') }}

{# Show number of total domains, users, aliases #} {% if backend in ['mysql', 'pgsql'] %} {% endif %} {% if session.get('is_global_admin') %} {% if session.get('show_used_quota') %} {% endif %} {# ---- System Information ---- #} {% if uptime is not sameas none and uptime|length == 3 %} {% endif %} {# ---- Network interfaces and IP info ---- #} {% for netif in netif_data %} {% endfor %} {% endif %}{# global admin #}
{{ _('Number of domains') }} {{ num_existing_domains |e }}{% if backend in ['mysql', 'pgsql'] %}{% if num_max_domains >= 0 %} ({{ _('Max:') }} {{ num_max_domains }}){% endif %}{% endif %}
{{ _('Number of users') }} {{ num_existing_users |e }}{% if num_max_users >= 0 %} ({{ _('Max:') }} {{ num_max_users }}){% endif %}
{{ _('Number of mailing lists') }} {{ num_existing_lists |e }}{% if num_max_lists >= 0 %} ({{ _('Max:') }} {{ num_max_lists }}){% endif %}
{{ _('Number of aliases') }} {{ num_existing_aliases |e }}{% if num_max_aliases >= 0 %} ({{ _('Max:') }} {{ num_max_aliases }}){% endif %}
{{ _('Stored emails') }} {% if total_messages %}{{ total_messages |e }} {{ _('Emails') }}.{% endif %} {% if total_bytes %}{{ total_bytes |file_size_format }}.{% endif %}
iRedMail {{ iredmail_version }}
iRedAdmin-Pro {{ version |e }} {% if backend == 'mysql' %} (MySQL) {% elif backend == 'pgsql' %} (PostgreSQL) {% elif backend == 'ldap' %} (LDAP) {% endif %}
{{ _('Hostname') }} {{ hostname |e }}
{{ _('Uptime') }} {{ _('%s days, %s hours, %s minutes.') |format(uptime[0] |e, uptime[1] |e, uptime[2] |e ) }}
{{ _('Server Load') }} {{ loadavg[0] }}, {{ loadavg[1] }}, {{ loadavg[2] }}
{{ _('Network') }} ({{ netif[0] |e }}) {{ netif[1] }}
{# .box-wrap #}
{# col1-3 #} {% if session.get('amavisd_enable_logging') %}

{{ _('Top Senders') |title }}

{% for s in top_senders %} {% if s.mail %} {% set _mail = s.mail |e %} {% if session.get('disable_viewing_mail_log') is sameas true %} {% elif s.policy == 'MLMMJ' %} {% else %} {% endif %} {% else %} {% endif %} {% endfor %}
{{ s.total |e }}{{ _mail }}{{ _mail }} ({{ _('Mailing List') }}){{ _mail }}<>

{{ _('Top Recipients') |title }}

{% for s in top_recipients %} {% if s.mail %} {% set _mail = s.mail |e %} {% if session.get('disable_viewing_mail_log') is sameas true %} {% else %} {% endif %} {% else %} {% endif %} {% endfor %}
{{ s.total |e }}{{ _mail }}{{ _mail }}<>
{% endif %} {% endblock main %}