From 8a60b658b46dd8b8f9a99581849d8fa04dc76fdb Mon Sep 17 00:00:00 2001 From: Vincent Kling Date: Thu, 20 Oct 2022 13:41:35 +0200 Subject: [PATCH 01/13] Implement FETCHMAIL_ENABLED --- core/admin/mailu/configuration.py | 5 +++-- core/admin/mailu/ui/templates/sidebar.html | 2 ++ core/admin/mailu/ui/views/fetches.py | 9 +++++++++ docs/configuration.rst | 3 +++ setup/flavors/compose/mailu.env | 3 +++ towncrier/newsfragments/2127.feature | 1 + 6 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 towncrier/newsfragments/2127.feature diff --git a/core/admin/mailu/configuration.py b/core/admin/mailu/configuration.py index 2f137c0c..e7de2a40 100644 --- a/core/admin/mailu/configuration.py +++ b/core/admin/mailu/configuration.py @@ -16,13 +16,14 @@ DEFAULT_CONFIG = { 'DOMAIN_REGISTRATION': False, 'TEMPLATES_AUTO_RELOAD': True, 'MEMORY_SESSIONS': False, + 'FETCHMAIL_ENABLED': False, # Database settings 'DB_FLAVOR': None, 'DB_USER': 'mailu', 'DB_PW': None, 'DB_HOST': 'database', 'DB_NAME': 'mailu', - 'SQLITE_DATABASE_FILE':'data/main.db', + 'SQLITE_DATABASE_FILE': 'data/main.db', 'SQLALCHEMY_DATABASE_URI': 'sqlite:////data/main.db', 'SQLALCHEMY_TRACK_MODIFICATIONS': False, # Statistics management @@ -59,7 +60,7 @@ DEFAULT_CONFIG = { # Web settings 'SITENAME': 'Mailu', 'WEBSITE': 'https://mailu.io', - 'ADMIN' : 'none', + 'ADMIN': 'none', 'WEB_ADMIN': '/admin', 'WEB_WEBMAIL': '/webmail', 'WEBMAIL': 'none', diff --git a/core/admin/mailu/ui/templates/sidebar.html b/core/admin/mailu/ui/templates/sidebar.html index a57a2abe..54448c8b 100644 --- a/core/admin/mailu/ui/templates/sidebar.html +++ b/core/admin/mailu/ui/templates/sidebar.html @@ -31,12 +31,14 @@

{% trans %}Auto-reply{% endtrans %}

+ {%- if config["FETCHMAIL_ENABLED"] %} + {%- endif %}