email: Tweak client auto-configuration file

- Allow STARTTLS as it is safe to do so.

- Allow POP service in the event user wants to keep the mails on the server.

- Add documentation link (this is currently unused and for documenting the code
only).

- Allow translation of display name and short name.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2022-02-09 17:19:25 -08:00 committed by James Valleroy
parent 6e2c24c9e4
commit 6421090a41
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808
2 changed files with 30 additions and 3 deletions

View File

@ -1,9 +1,15 @@
<?xml version="1.0"?>
<?xml version="1.0" encoding="UTF-8"?>
{% comment %}
# SPDX-License-Identifier: AGPL-3.0-or-later
{% endcomment %}
{% load i18n %}
<clientConfig version="1.1">
<emailProvider id="{{ host }}">
<domain>{{ host }}</domain>
<displayName>FreedomBox Mail</displayName>
<displayShortName>FBXMail</displayShortName>
<displayName>{% trans "FreedomBox Email" %}</displayName>
<displayShortName>{{ box_name }}</displayShortName>
<incomingServer type="imap">
<hostname>{{ host }}</hostname>
<port>993</port>
@ -11,6 +17,13 @@
<username>%EMAILLOCALPART%</username>
<authentication>password-cleartext</authentication>
</incomingServer>
<incomingServer type="pop3">
<hostname>{{ host }}</hostname>
<port>995</port>
<socketType>SSL</socketType>
<username>%EMAILLOCALPART%</username>
<authentication>password-cleartext</authentication>
</incomingServer>
<outgoingServer type="smtp">
<hostname>{{ host }}</hostname>
<port>465</port>
@ -18,5 +31,15 @@
<username>%EMAILLOCALPART%</username>
<authentication>password-cleartext</authentication>
</outgoingServer>
<outgoingServer type="smtp">
<hostname>{{ host }}</hostname>
<port>587</port>
<socketType>SSL</socketType>
<username>%EMAILLOCALPART%</username>
<authentication>password-cleartext</authentication>
</outgoingServer>
<documentation url="https://wiki.debian.org/FreedomBox/Manual/Email">
<descr lang="en">FreedomBox Manual</descr>
</documentation>
</emailProvider>
</clientConfig>

View File

@ -125,6 +125,10 @@ class AliasView(FormView):
class XmlView(TemplateView):
"""Serve Thunderbird auto-configuration file.
https://wiki.mozilla.org/Thunderbird:Autoconfiguration:ConfigFileFormat
"""
template_name = 'email-autoconfig.xml'
def render_to_response(self, *args, **kwargs):