From 3eeb7962c2c90e14af6b3b0d0ff36120cb11d6b5 Mon Sep 17 00:00:00 2001 From: Danny Daemonic Date: Fri, 19 Aug 2022 15:56:02 -0700 Subject: [PATCH] Correct the extension used for Roundcube overrides This adds ".inc.php" files to the included overrides while maintaining support for existing ".inc" files previously included via overrides. Roundcube itself uses "inc.php" files and these overrides are expected to match that format. Switching to "inc.php" both tells the user that these need to be proper php files and conveys they are used for changing the same settings that Roundcube's inc.php files modify. --- docs/faq.rst | 11 ++++++----- towncrier/newsfragments/2388.bugfix | 1 + webmails/roundcube/start.py | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) create mode 100644 towncrier/newsfragments/2388.bugfix diff --git a/docs/faq.rst b/docs/faq.rst index 22c23c51..923f9755 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -267,7 +267,7 @@ correct syntax. The following file names will be taken as override configuration - `Dovecot`_ - ``dovecot.conf`` in dovecot sub-directory; - `Nginx`_ - All ``*.conf`` files in the ``nginx`` sub-directory; - `Rspamd`_ - All files in the ``rspamd`` sub-directory. -- Roundcube - All ``*.inc`` files in the ``roundcube`` sub directory. +- `Roundcube`_ - All ``*.inc.php`` files in the ``roundcube`` sub directory. To override the root location (``/``) in Nginx ``WEBROOT_REDIRECT`` needs to be set to ``none`` in the env file (see :ref:`web settings `). @@ -354,10 +354,11 @@ How do I use webdav (radicale)? *issue reference:* `1591`_. -.. _`Postfix`: http://www.postfix.org/postconf.5.html -.. _`Dovecot`: https://doc.dovecot.org/configuration_manual/config_file/config_file_syntax/ -.. _`NGINX`: https://nginx.org/en/docs/ -.. _`Rspamd`: https://www.rspamd.com/doc/configuration/index.html +.. _`Postfix`: http://www.postfix.org/postconf.5.html +.. _`Dovecot`: https://doc.dovecot.org/configuration_manual/config_file/config_file_syntax/ +.. _`NGINX`: https://nginx.org/en/docs/ +.. _`Rspamd`: https://www.rspamd.com/doc/configuration/index.html +.. _`Roundcube`: https://github.com/roundcube/roundcubemail/wiki/Configuration#customize-the-look .. _`Docker swarm howto`: https://github.com/Mailu/Mailu/tree/master/docs/swarm/master .. _`125`: https://github.com/Mailu/Mailu/issues/125 diff --git a/towncrier/newsfragments/2388.bugfix b/towncrier/newsfragments/2388.bugfix new file mode 100644 index 00000000..aa815072 --- /dev/null +++ b/towncrier/newsfragments/2388.bugfix @@ -0,0 +1 @@ +Roundcube overrides now also include .inc.php files. Only .inc.php should be used moving forward. diff --git a/webmails/roundcube/start.py b/webmails/roundcube/start.py index bea31f4b..1ee1ed50 100755 --- a/webmails/roundcube/start.py +++ b/webmails/roundcube/start.py @@ -60,7 +60,7 @@ else: context["PLUGINS"] = ",".join(f"'{p}'" for p in plugins) # add overrides -context["INCLUDES"] = sorted(inc for inc in os.listdir("/overrides") if inc.endswith(".inc")) if os.path.isdir("/overrides") else [] +context["INCLUDES"] = sorted(inc for inc in os.listdir("/overrides") if inc.endswith((".inc", ".inc.php"))) if os.path.isdir("/overrides") else [] # calculate variables for config file context["SESSION_TIMEOUT_MINUTES"] = max(int(env.get("SESSION_TIMEOUT", "3600")) // 60, 1)