{# steward/templates/settings/notifications.html #} {% extends "base.html" %} {% from "_macros.html" import crumbs, zone_select %} {% block title %}Settings — Notifications — Steward{% endblock %} {% from "settings/_tabs.html" import settings_tabs %} {% block section_tabs %}{{ settings_tabs("notifications") }}{% endblock %} {% block breadcrumb %}{{ crumbs([("Settings", "/settings/"), ("Notifications", "")]) }}{% endblock %} {% block content %}
{{ csrf_field() }}
{# ── SMTP ──────────────────────────────────────────────────────────────── #}

Email (SMTP)

Port 465 always connects with implicit TLS; on other ports the box upgrades the connection with STARTTLS.

It goes to you, at your account's address and in your zone, and to the Also send to addresses below.

{# ── Who gets email (milestone 495) ───────────────────────────────────────── #}

Who gets email

Each account gets its own copy at its own address, with times in its own zone. These are the defaults for each role; an account's own choice, on its Account page or in Users, wins.

{% for r in roles %} {% for kind in ("alerts", "report") %} {% set key = "notify." ~ kind ~ "." ~ r.value %} {% endfor %} {% endfor %}
RoleAlert emailsWeekly report
{{ r.value|capitalize }}

Alerts reach {{ audience.alerts|length }} account{{ 's' if audience.alerts|length != 1 }} {%- if audience.alerts %} ({{ audience.alerts|map(attribute='username')|join(', ') }}){% endif %} · the weekly report reaches {{ audience.report|length }} {%- if audience.report %} ({{ audience.report|map(attribute='username')|join(', ') }}){% endif %}.

{% if audience.unreachable %}

{{ audience.unreachable|length }} account{{ 's have' if audience.unreachable|length != 1 else ' has' }} no address mail can reach: {% for u in audience.unreachable %}{{ u.username }}{{ ", " if not loop.last }}{% endfor %}.

{% endif %}
{# ── Also send to ─────────────────────────────────────────────────────────── #}

Also send to

For a mailbox that isn't a person. These get alerts and the weekly report.

{{ zone_select("smtp.tz", "smtp-tz", settings['smtp.tz'] or "UTC", zones) }}

With UTC beside, since nobody's own zone is known for them.

{% if not settings['general.public_base_url'] %}

Set Steward's address in General and every email links back here.

{% endif %}
{# ── Webhook ───────────────────────────────────────────────────────────── #}

Webhook

Stored encrypted and never shown again: a webhook URL usually holds its own token.

{% if webhook_host %}
{% endif %}

{{ '{{ alert.rule_name }}' }} is escaped to sit inside a JSON string, so quotes or line breaks in a name can't break the body; a missing value reads "no data". For a bare JSON value use {{ '{{ raw.value | tojson }}' }} (a number, or null). Fields: state, rule_name, resource, metric, value, operator, threshold, source_module, note, timestamp.

{% endblock %}