{% extends "admin-base.html" %} {% from "ui.html" import csrf_field, action, section_tabs, when with context %} {% from "icons.html" import sep %} {% block page_title %}{{ _("Capture by email") }}{% endblock %} {% block section_crumbs %}{{ _("Email") }}{{ sep() }}{{ _("Capture by email") }}{% endblock %} {% block section %} {{ section_tabs(_("Email sections"), [("sending", "/admin/mail", _("Sending")), ("capture", "/admin/mail/capture", _("Capture by email"))], "capture") }}

{{ _("Capture by email") }}

{% if capture %}{{ _("Configured") }}{% else %}{{ _("Not configured") }}{% endif %}

{{ _("An email sent or forwarded to brain+organization.space@… becomes a note in the inbox of that space. The worker reads a dedicated mailbox over IMAP; only an email authenticated by the receiving server (DMARC, or aligned DKIM) and sent from the verified address of an account that may drop notes in the space is accepted.") }} {{ _("How to set up the capture by email") }}

{% if capture %}

{{ _("Check the mailbox") }}

{{ _("{username} on {server}, folder {folder}.", username=capture.username, server=capture.host ~ ":" ~ capture.port, folder=capture.folder) }} {% if capture.poll_error %}{{ _("Last poll failed") }} {{ _(capture.poll_error) }}{% elif capture.poll_ok_at %}{{ _("Last successful poll:") }} {{ when(capture.poll_ok_at) }}{% else %}{{ _("No poll yet.") }}{% endif %}

{{ action("/admin/mail/capture/test", _("Test the connection")) }} {% if poll_pending %}{{ _("A poll is waiting or running.") }}{% else %}{{ action("/admin/mail/capture/poll", _("Read the mailbox now")) }}{% endif %}

{{ _("The test signs in, counts the emails waiting and names the servers that authenticated the latest ones: the identifier to trust below.") }}

{% endif %}

{{ _("IMAP mailbox") }}

{{ csrf_field() }}

{{ _("Handled emails are moved to Synaptane/Processed or Synaptane/Refused.") }}

{{ _("An app password if the provider offers one. Encrypted, never shown again.") }}

{{ _("Addresses and authentication") }}

{{ _("Each space is reached at brain+organization.space@example.com: the provider must accept “+” addresses.") }}

{{ _("Identifier at the start of the Authentication-Results header written by the mailbox's provider (mx.google.com for Gmail). Separated by commas.") }}

{{ _("Exchange Online writes it without one. Only the topmost header is then read, the one Microsoft adds on arrival. Leave unticked with any other provider.") }}

{{ _("For a domain that signs nothing (no DKIM, no DMARC): an SPF pass only proves the sending server, and anyone allowed to send through it can then write in the name of a colleague. Leave empty if you can set up DKIM.") }}

{{ _("Poll and answers") }}

{{ _("Only to an authenticated sender who has an account, through email sending. Nobody else is ever answered.") }}

{% if capture %}

{{ _("Turn off the capture") }}

{{ _("The worker stops reading the mailbox; the settings and the password are erased. Notes already dropped stay.") }}

{{ action("/admin/mail/capture/delete", _("Turn off the capture"), confirm=_("Turn off the capture by email? Emails sent to the capture address will wait in the mailbox."), kind="danger", small=false) }}
{% endif %} {% endblock %}