From c4ca1cffafe29cedaec72ba918b068a7c83234dd Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Wed, 25 Jan 2023 12:20:17 +0100 Subject: [PATCH] Set default for FETCHMAIL_ENABLED --- core/admin/mailu/configuration.py | 2 +- docs/configuration.rst | 5 +++-- docs/webadministration.rst | 1 + setup/flavors/compose/mailu.env | 2 +- tests/compose/core/mailu.env | 3 +++ tests/compose/fetchmail/mailu.env | 3 +++ tests/compose/filters/mailu.env | 3 +++ tests/compose/webdav/mailu.env | 3 +++ tests/compose/webmail/mailu.env | 3 +++ 9 files changed, 21 insertions(+), 4 deletions(-) diff --git a/core/admin/mailu/configuration.py b/core/admin/mailu/configuration.py index c992fbc8..004fe504 100644 --- a/core/admin/mailu/configuration.py +++ b/core/admin/mailu/configuration.py @@ -17,7 +17,7 @@ DEFAULT_CONFIG = { 'DOMAIN_REGISTRATION': False, 'TEMPLATES_AUTO_RELOAD': True, 'MEMORY_SESSIONS': False, - 'FETCHMAIL_ENABLED': False, + 'FETCHMAIL_ENABLED': True, # Database settings 'DB_FLAVOR': None, 'DB_USER': 'mailu', diff --git a/docs/configuration.rst b/docs/configuration.rst index b37bec08..882658ff 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -110,8 +110,9 @@ to reject emails containing documents with malicious macros. Under the hood, it .. _fetchmail: -When ``FETCHMAIL_ENABLED`` is set to ``True``, the fetchmail functionality is enabled in the admin interface. -The container itself still needs to be deployed manually. ``FETCHMAIL_ENABLED`` defaults to ``True``. +When ``FETCHMAIL_ENABLED`` is set to ``True``, the fetchmail functionality is enabled and +shown in the admin interface. The container itself still needs to be deployed manually. +``FETCHMAIL_ENABLED`` defaults to ``True``. The ``FETCHMAIL_DELAY`` is a delay (in seconds) for the fetchmail service to go and fetch new email if available. Do not use too short delays if you do not diff --git a/docs/webadministration.rst b/docs/webadministration.rst index 7e2a5728..6e5ca94d 100644 --- a/docs/webadministration.rst +++ b/docs/webadministration.rst @@ -162,6 +162,7 @@ You can add a fetched account by clicking on the `Add an account` button on the * Folders. A comma separated list of folders to fetch from the server. This is optional, by default only the INBOX will be pulled. Click the submit button to apply settings. With the default polling interval, fetchmail will start polling the email account after ``FETCHMAIL_DELAY``. +Make sure ``FETCHMAIL_ENABLED`` is set to ``true`` in ``mailu.env`` to enable fetching and showing fetchmail in the admin interface. Authentication tokens diff --git a/setup/flavors/compose/mailu.env b/setup/flavors/compose/mailu.env index 980788ce..f1ecf4e2 100644 --- a/setup/flavors/compose/mailu.env +++ b/setup/flavors/compose/mailu.env @@ -82,7 +82,7 @@ RELAYNETS= # Will relay all outgoing mails if configured RELAYHOST={{ relayhost }} -# Show fetchmail functionality in admin interface +# Enable fetchmail FETCHMAIL_ENABLED={{ fetchmail_enabled or 'False' }} # Fetchmail delay diff --git a/tests/compose/core/mailu.env b/tests/compose/core/mailu.env index 7ea86f56..134b8e84 100644 --- a/tests/compose/core/mailu.env +++ b/tests/compose/core/mailu.env @@ -83,6 +83,9 @@ RELAYNETS= # Will relay all outgoing mails if configured RELAYHOST= +# Show fetchmail functionality in admin interface +FETCHMAIL_ENABLED=false + # Fetchmail delay FETCHMAIL_DELAY=600 diff --git a/tests/compose/fetchmail/mailu.env b/tests/compose/fetchmail/mailu.env index 0355f168..6f1e8b69 100644 --- a/tests/compose/fetchmail/mailu.env +++ b/tests/compose/fetchmail/mailu.env @@ -83,6 +83,9 @@ RELAYNETS= # Will relay all outgoing mails if configured RELAYHOST= +# Show fetchmail functionality in admin interface +FETCHMAIL_ENABLED=false + # Fetchmail delay FETCHMAIL_DELAY=600 diff --git a/tests/compose/filters/mailu.env b/tests/compose/filters/mailu.env index cf9f7f2d..2df09f61 100644 --- a/tests/compose/filters/mailu.env +++ b/tests/compose/filters/mailu.env @@ -83,6 +83,9 @@ RELAYNETS= # Will relay all outgoing mails if configured RELAYHOST= +# Show fetchmail functionality in admin interface +FETCHMAIL_ENABLED=false + # Fetchmail delay FETCHMAIL_DELAY=600 diff --git a/tests/compose/webdav/mailu.env b/tests/compose/webdav/mailu.env index b7a9b718..f0842dd4 100644 --- a/tests/compose/webdav/mailu.env +++ b/tests/compose/webdav/mailu.env @@ -83,6 +83,9 @@ RELAYNETS= # Will relay all outgoing mails if configured RELAYHOST= +# Show fetchmail functionality in admin interface +FETCHMAIL_ENABLED=false + # Fetchmail delay FETCHMAIL_DELAY=600 diff --git a/tests/compose/webmail/mailu.env b/tests/compose/webmail/mailu.env index ddc845fa..c1e0dff0 100644 --- a/tests/compose/webmail/mailu.env +++ b/tests/compose/webmail/mailu.env @@ -83,6 +83,9 @@ RELAYNETS= # Will relay all outgoing mails if configured RELAYHOST= +# Show fetchmail functionality in admin interface +FETCHMAIL_ENABLED=false + # Fetchmail delay FETCHMAIL_DELAY=600