From 459694f4a24df362194de68b4221f2e7bdd8757c Mon Sep 17 00:00:00 2001 From: Florent Daigniere Date: Fri, 17 Mar 2023 11:37:46 +0100 Subject: [PATCH] Extend roundcube's session lifetime --- webmails/roundcube/config/config.inc.php | 2 +- webmails/start.py | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/webmails/roundcube/config/config.inc.php b/webmails/roundcube/config/config.inc.php index dd290176..3af8c38c 100644 --- a/webmails/roundcube/config/config.inc.php +++ b/webmails/roundcube/config/config.inc.php @@ -13,7 +13,7 @@ $config['log_driver'] = 'stdout'; $config['zipdownload_selection'] = true; $config['enable_spellcheck'] = true; $config['spellcheck_engine'] = 'pspell'; -$config['session_lifetime'] = {{ SESSION_TIMEOUT_MINUTES | int }}; +$config['session_lifetime'] = {{ (((PERMANENT_SESSION_LIFETIME | default(10800)) | int)/3600) | int }}; $config['request_path'] = '{{ WEB_WEBMAIL or "none" }}'; $config['trusted_host_patterns'] = [ {{ HOSTNAMES.split(",") | map("tojson") | join(',') }}]; diff --git a/webmails/start.py b/webmails/start.py index 7a8d6bf2..d872fe2d 100755 --- a/webmails/start.py +++ b/webmails/start.py @@ -62,9 +62,6 @@ 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", ".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) - # create config files conf.jinja("/conf/config.inc.php", context, "/var/www/roundcube/config/config.inc.php")