{% extends "base.html" %} {% block title %}{{ gd.domain }} · Gateway Setup{% endblock %} {% block content %}

Email SecurityDomains

{{ gd.domain }}

{{ gd.status }} {% if org %}· {{ org.name }}{% endif %} {% if gd.downstream_host %}· relay → {{ gd.downstream_host }}:{{ gd.downstream_port }}{% endif %} {% if gd.last_checked_at %}· checked {{ gd.last_checked_at| pt('%Y-%m-%d %H:%M') }}{% endif %}

‹ Domains
{% if checked %}
{% if gd.mx_ok and gd.txt_ok %}✓ Verified. MX is pointing at the gateway and ownership is confirmed. This domain's mail will be filtered inline. {% else %}Not fully verified yet. DNS can take time to propagate — re-check in a few minutes. (Needs at least MX + TXT.){% endif %}
{% endif %}

Live DNS verification

MX → gateway
{{ '✓ pointing at us' if gd.mx_ok else '✗ not yet' }}
Ownership (TXT)
{{ '✓ confirmed' if gd.txt_ok else '✗ not found' }}
SPF include
{{ '✓ present' if gd.spf_ok else '✗ missing' }}

DNS records to publish

Add these at {{ gd.domain }}'s DNS host. Switch the MX last — once it points here, all inbound mail flows through the gateway.

{% for r in records %}
{{ r.type }}
Host{{ r.host }} {% if r.priority is not none %}Priority{{ r.priority }}{% endif %} Value{{ r.value }}

{{ r.note }}

{% endfor %}

How it flows

Internet sender → {{ mx_host }} (us) → filter inline (16k IOCs + ClamAV + your allow/block policies) → clean mail relays to {{ gd.downstream_host or 'your mailserver' }}; threats are held in quarantine. {% if gd.org_id %}This domain's mail is scoped to {{ org.name if org else 'its org' }} ({{ msg_count }} processed).{% endif %}

{% endblock %}