From 6421090a414d1332bbc94f5eab9dd572be26321b Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Wed, 9 Feb 2022 17:19:25 -0800 Subject: [PATCH] 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 Reviewed-by: James Valleroy --- .../email/templates/email-autoconfig.xml | 29 +++++++++++++++++-- plinth/modules/email/views.py | 4 +++ 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/plinth/modules/email/templates/email-autoconfig.xml b/plinth/modules/email/templates/email-autoconfig.xml index 4573d5339..a04da80eb 100644 --- a/plinth/modules/email/templates/email-autoconfig.xml +++ b/plinth/modules/email/templates/email-autoconfig.xml @@ -1,9 +1,15 @@ - + +{% comment %} +# SPDX-License-Identifier: AGPL-3.0-or-later +{% endcomment %} + +{% load i18n %} + {{ host }} - FreedomBox Mail - FBXMail + {% trans "FreedomBox Email" %} + {{ box_name }} {{ host }} 993 @@ -11,6 +17,13 @@ %EMAILLOCALPART% password-cleartext + + {{ host }} + 995 + SSL + %EMAILLOCALPART% + password-cleartext + {{ host }} 465 @@ -18,5 +31,15 @@ %EMAILLOCALPART% password-cleartext + + {{ host }} + 587 + SSL + %EMAILLOCALPART% + password-cleartext + + + FreedomBox Manual + diff --git a/plinth/modules/email/views.py b/plinth/modules/email/views.py index 04ce463fd..8c09a2cee 100644 --- a/plinth/modules/email/views.py +++ b/plinth/modules/email/views.py @@ -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):