From: Clemenk Date: Thu, 16 May 2024 21:50:33 +0000 (+0200) Subject: Add the ROUNDCUBEMAIL_USERNAME_DOMAIN env var to set the username_domain config optio... X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=52f39a60e50b56ab1bff5367c28f73caf108a71b;p=roundcube-roundcubemail-docker.git Add the ROUNDCUBEMAIL_USERNAME_DOMAIN env var to set the username_domain config option (#240) --- diff --git a/README.md b/README.md index dbb73c7..c590523 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,9 @@ The following env variables can be set to configure your Roundcube Docker instan `ROUNDCUBEMAIL_SMTP_SERVER` - Hostname of the SMTP server to send mails. For encrypted connections, prefix the host with `tls://` (STARTTLS) or `ssl://` (SSL/TLS). -`ROUNDCUBEMAIL_SMTP_PORT` - SMTP port number; defaults to `587` +`ROUNDCUBEMAIL_SMTP_PORT` - SMTP port number; defaults to `587` + +`ROUNDCUBEMAIL_USERNAME_DOMAIN` - Automatically add this domain to user names for login. See [defaults.inc.php](https://github.com/roundcube/roundcubemail/blob/master/config/defaults.inc.php) for more information. `ROUNDCUBEMAIL_REQUEST_PATH` - Specify request path with reverse proxy; defaults to `/`. See [defaults.inc.php](https://github.com/roundcube/roundcubemail/blob/master/config/defaults.inc.php) for possible values. diff --git a/apache/docker-entrypoint.sh b/apache/docker-entrypoint.sh index 8503934..f76c042 100755 --- a/apache/docker-entrypoint.sh +++ b/apache/docker-entrypoint.sh @@ -98,6 +98,7 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then \$config['db_dsnr'] = '${ROUNDCUBEMAIL_DSNR}'; \$config['imap_host'] = '${ROUNDCUBEMAIL_DEFAULT_HOST}:${ROUNDCUBEMAIL_DEFAULT_PORT}'; \$config['smtp_host'] = '${ROUNDCUBEMAIL_SMTP_SERVER}:${ROUNDCUBEMAIL_SMTP_PORT}'; + \$config['username_domain'] = '${ROUNDCUBEMAIL_USERNAME_DOMAIN}'; \$config['temp_dir'] = '${ROUNDCUBEMAIL_TEMP_DIR}'; \$config['skin'] = '${ROUNDCUBEMAIL_SKIN}'; \$config['request_path'] = '${ROUNDCUBEMAIL_REQUEST_PATH}'; diff --git a/fpm-alpine/docker-entrypoint.sh b/fpm-alpine/docker-entrypoint.sh index 8503934..f76c042 100755 --- a/fpm-alpine/docker-entrypoint.sh +++ b/fpm-alpine/docker-entrypoint.sh @@ -98,6 +98,7 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then \$config['db_dsnr'] = '${ROUNDCUBEMAIL_DSNR}'; \$config['imap_host'] = '${ROUNDCUBEMAIL_DEFAULT_HOST}:${ROUNDCUBEMAIL_DEFAULT_PORT}'; \$config['smtp_host'] = '${ROUNDCUBEMAIL_SMTP_SERVER}:${ROUNDCUBEMAIL_SMTP_PORT}'; + \$config['username_domain'] = '${ROUNDCUBEMAIL_USERNAME_DOMAIN}'; \$config['temp_dir'] = '${ROUNDCUBEMAIL_TEMP_DIR}'; \$config['skin'] = '${ROUNDCUBEMAIL_SKIN}'; \$config['request_path'] = '${ROUNDCUBEMAIL_REQUEST_PATH}'; diff --git a/fpm/docker-entrypoint.sh b/fpm/docker-entrypoint.sh index 8503934..f76c042 100755 --- a/fpm/docker-entrypoint.sh +++ b/fpm/docker-entrypoint.sh @@ -98,6 +98,7 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then \$config['db_dsnr'] = '${ROUNDCUBEMAIL_DSNR}'; \$config['imap_host'] = '${ROUNDCUBEMAIL_DEFAULT_HOST}:${ROUNDCUBEMAIL_DEFAULT_PORT}'; \$config['smtp_host'] = '${ROUNDCUBEMAIL_SMTP_SERVER}:${ROUNDCUBEMAIL_SMTP_PORT}'; + \$config['username_domain'] = '${ROUNDCUBEMAIL_USERNAME_DOMAIN}'; \$config['temp_dir'] = '${ROUNDCUBEMAIL_TEMP_DIR}'; \$config['skin'] = '${ROUNDCUBEMAIL_SKIN}'; \$config['request_path'] = '${ROUNDCUBEMAIL_REQUEST_PATH}'; diff --git a/nightly/docker-entrypoint.sh b/nightly/docker-entrypoint.sh index 7500969..b76d8f0 100755 --- a/nightly/docker-entrypoint.sh +++ b/nightly/docker-entrypoint.sh @@ -99,6 +99,7 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then \$config['smtp_server'] = '${ROUNDCUBEMAIL_SMTP_SERVER}'; \$config['smtp_port'] = '${ROUNDCUBEMAIL_SMTP_PORT}'; \$config['smtp_host'] = '${ROUNDCUBEMAIL_SMTP_SERVER}:${ROUNDCUBEMAIL_SMTP_PORT}'; + \$config['username_domain'] = '${ROUNDCUBEMAIL_USERNAME_DOMAIN}'; \$config['temp_dir'] = '${ROUNDCUBEMAIL_TEMP_DIR}'; \$config['skin'] = '${ROUNDCUBEMAIL_SKIN}'; \$config['plugins'] = array_filter(array_unique(array_merge(\$config['plugins'], ['${ROUNDCUBEMAIL_PLUGINS_PHP}']))); diff --git a/templates/docker-entrypoint.sh b/templates/docker-entrypoint.sh index 8503934..f76c042 100644 --- a/templates/docker-entrypoint.sh +++ b/templates/docker-entrypoint.sh @@ -98,6 +98,7 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then \$config['db_dsnr'] = '${ROUNDCUBEMAIL_DSNR}'; \$config['imap_host'] = '${ROUNDCUBEMAIL_DEFAULT_HOST}:${ROUNDCUBEMAIL_DEFAULT_PORT}'; \$config['smtp_host'] = '${ROUNDCUBEMAIL_SMTP_SERVER}:${ROUNDCUBEMAIL_SMTP_PORT}'; + \$config['username_domain'] = '${ROUNDCUBEMAIL_USERNAME_DOMAIN}'; \$config['temp_dir'] = '${ROUNDCUBEMAIL_TEMP_DIR}'; \$config['skin'] = '${ROUNDCUBEMAIL_SKIN}'; \$config['request_path'] = '${ROUNDCUBEMAIL_REQUEST_PATH}';