{# This is a self-contained modal for adding (and editing) account details. This is a single form which handles profiles, routes and basic source configuration. The basic section of the form captures name, e-mail and password. If the user allows auto-detection of settings, the Thunderbird ISPDB will be queried and possibly other heuristics employed to figure out correct connection settings. If successful, the route and source forms will be filled in automatically (and skipped on Next). Manual settings for routes and sources are as expected; local or remote options, SMTP, IMAP, POP3, SSL, ports, hostnames, auth, ... The security section of the form allows the user to choose which PGP key to associate with this account or create a new one if he has none, which will take place in a long-running background process. The user can at any time skip forward or backwards in the form by clicking on the section headlines, which are kept visible for that purpose. #}{% set new_src_id = result.new_src_id %}
{{ csrf_field|safe }} {%- if result.rid %} {%- endif %}

{{_("Basic Details")}}

{%- if is_dev_version() %} {%- if not result.rid %} {% endif %} {%- endif %}

FIXME ... add signup with partners here!

{%- if not result.rid %} {{_("Add custom signature")}} ...    {% endif %} {%- if not result.sources %} {{ _("Detect settings") }}   {% endif %}

{{_("Auto-detecting settings")}} ...

{% if config.sys.proxy.protocol in ("tor", "tor-risky") %}

{{_("Connecting over Tor, this may take a while.")}}

{% endif %}

{% include("../img/loading-ellipsis.svg") %}

{{_("Failed to detect settings, manual configuration required")}}!

{{_("Troubleshoot recent Network Activity.")}}

{{_("Sending Mail")}}


({{ _("copied") }})
{%- set auth_type = result['route-auth_type'][:8] %}
{%- set password = result['route-password'] %} {%- if password %}
{{_("Forget password")}}
{%- endif %}

{{_("Send mail using local Unix tools.")}} {{_("Use this setting if you have a working mail server on this machine.")}}



{{_("No outgoing mail for this account.")}}




{{_("Receiving Mail")}}

{% macro source_editor(rid, new_rid) %} {% set protocol = result['source-' + rid + '-protocol'] %}

({{ _("copied") }})
{%- set auth_type = result['source-' + rid + '-auth_type'] %}
{%- set password = result['source-' + rid + '-password'] %} {%- if password %} {{_("Forget password")}}
{%- endif %} {{_("Leave mail on server")}}
{{_("Copy all mail and add to search engine")}}
{{_("Require STARTTLS encryption")}}

{{_("Receive mail from local Unix mail spool.")}} {{_("Use this setting if you have a working mail server on this machine.")}}

{{_("Copy mail to Mailpile secure storage")}}
{%- if is_dev_version() %} {{_("Delete from Unix mail spool")}} {%- endif %}


{%- if result.sources %} {{_("Choose a protocol for the new mail source...")}} {%- else %} {{_("No incoming mail for this account.")}} {%- endif %}


{{_("Use this setting if you would like Mailpile to read e-mails already downloaded by Thunderbird, Mac Mail or another local application on this machine.")}}

{{_("Use the Browse tool to import local mailboxes later on.")}}

{%- if rid == new_rid %}

{{_("Enable this mail source")}}
{% else %} {% endif %} {%- endmacro %} {%- for sid in result.sources %} {%- if not loop.first %}

{% endif %} {{- source_editor(sid, sid) }} {%- endfor %}
{%- if result.sources %}

{% endif %} {{- source_editor('NEW', new_src_id) }}

{% if result.sources %} {{ _("Add New") }}   {% endif %}

{% set enable_imap_pop3_message = _("Mailpile may not be able to access your mail unless you log on to your account and enable IMAP and/or POP3.") %}

{{_("Important")}}!

{{ enable_imap_pop3_message }} {{_("Without this, some providers will even mistake Mailpile for an intruder!")}}

{{_("Enable IMAP")}}

{{_("Security and Privacy")}}

{{_("Best-effort digital signatures and encryption")}} {%- if is_dev_version() %} (details) {%- endif %}
{{_("Always digitally sign outgoing mail")}}
{{_("Always encrypt (warn when sending unencrypted mail)")}}
{{_("Minimize metadata (may make mail unreadable)")}}
{{_("Prefer compatibility; avoid PGP/MIME (makes mail ugly)")}}
{{_("Signal a preference for encrypted mail")}} {%- if is_dev_version() %} (details) {%- endif %}
{{_("Signal a preference for signed mail")}}
{{_("Signal a preference for un-signed, un-encrypted mail")}}
{# FIXME - make this work!
{{_("Use AutoCrypt headers to share encryption keys")}}
#}
{{_("Automatically attach encryption keys to outgoing mail")}}
{# FIXME - make this work!
{{_("Upload key to public directory (key server)")}}
#}