{% extends "base.html" %} {% block title %}Email Security · SD RMM{% endblock %} {% block content %} {% include "_email_nav.html" %} {% set k = dash.kpi %}
{% if orgs and orgs|length > 1 %}
{% else %}{% endif %} {% if accounts %}
{% if sel %}{% endif %}
{% endif %}
{% if saved %}{% endif %} {% if err %}{% endif %}
{{ "{:,}".format(k.scanned) }}
Messages scanned
{{ "{:,}".format(k.flagged) }}
Flagged
{{ "{:,}".format(k.serious) }}
Serious (warn/crit)
{{ "{:,}".format(k.mailboxes) }}
Mailboxes
{{ "{:,}".format(k.processed) }}
Gateway processed
{{ k.policies }}
Policy rules

Mail flagged — 14 days

{% for t in dash.trend %}
{{ t.day }}
{% endfor %}

serious (warn/crit)   total flagged

Threats by type

{% set tmaxv = (dash.by_type.values()|list|max) if dash.by_type else 1 %}
{% for tt, c in dash.by_type.items() %}
{{ tt }}{{ c }}
{% else %}

No threats recorded yet.

{% endfor %}

By severity

{% set smaxv = (dash.by_sev.values()|list|max) if dash.by_sev else 1 %} {% for sv in ['crit','warn','low'] %}{% if dash.by_sev.get(sv) %}
{{ sv }}{{ dash.by_sev[sv] }}
{% endif %}{% endfor %}

Most-flagged senders

{% for s in dash.top_senders %} {% else %}{% endfor %}
{{ s.v }}{{ s.c }}
No serious senders flagged.

senders of warn/critical mail only

Most-targeted recipients

{% for t in dash.top_targets %} {% else %}{% endfor %}
{{ t.v }}{{ t.c }}
None yet.

recipients of warn/critical mail only

Flagged by organization

{% for o in dash.per_org %} {% else %}{% endfor %}
{{ o.org }}{{ o.n }}
No flagged mail yet.

flagged messages (gateway + mailbox scan)

Recently flagged

{% if recent %} {% for g in recent %} {% endfor %}
TimeFromSubject
{{ g.ts| pt('%m-%d %H:%M') }} {{ g.sender }} {{ g.severity }} {{ g.subject or '—' }} View
{% else %}

No flagged mail yet. Connect a mailbox below and scan, send a test through the gateway, or try the analyzer.

{% endif %}

Connect a mailbox (API scanning)

{% if not configured %}
Optional — OAuth not configured. The gateway (MX-mode) works without this. To also scan an existing Gmail/Outlook mailbox via API, create an OAuth app and set RMM_GMAIL_CLIENT_ID/SECRET or RMM_MS_CLIENT_ID/SECRET in /etc/rmm/rmm.env, then restart rmm. Redirect URI: https://rmm.example.com/email/oauth/<gmail|outlook>/callback.
{% else %}
{% if providers.gmail %}Connect Gmail{% endif %} {% if providers.outlook %}Connect Outlook{% endif %}
{% endif %} {% if accounts %} {% for a in accounts %} {% endfor %}
{{ a.email_address }}{{ a.provider }}{{ a.last_status or '—' }}
{% endif %}
{% endblock %}