roundcube/roundcubemail-docker

Cannot set multiple imap hosts

hadmut opened this issue · 1 comments

hadmut commented

Hi,

roundcube is designed to also take a list of imap hosts to choose from. See e.g.

https://github.com/roundcube/roundcubemail/wiki/Configuration#imap-server-connection

$config['imap_host'] = ['mail.example.com', 'webmail.example.com', 'ssl://mail.example.com:993'];

or

$config['imap_host'] = [
'mail.example.com' => 'Default Server',
'webmail.example.com' => 'Webmail Server',
'ssl://mail.example.com:993' => 'Secure Webmail Server'
];

in contrast, /docker-entrypoint.sh enforces

echo "Write Docker config to $PWD/config/config.docker.inc.php"
echo "<?php
$config['db_dsnw'] = '${ROUNDCUBEMAIL_DSNW}';
$config['db_dsnr'] = '${ROUNDCUBEMAIL_DSNR}';
$config['imap_host'] = '${ROUNDCUBEMAIL_DEFAULT_HOST}:${ROUNDCUBEMAIL_DEFAULT_PORT}';
$config['smtp_host'] = '${ROUNDCUBEMAIL_SMTP_SERVER}:${ROUNDCUBEMAIL_SMTP_PORT}';
$config['temp_dir'] = '${ROUNDCUBEMAIL_TEMP_DIR}';
$config['skin'] = '${ROUNDCUBEMAIL_SKIN}';
$config['request_path'] = '${ROUNDCUBEMAIL_REQUEST_PATH}';
$config['plugins'] = array_filter(array_unique(array_merge($config['plugins'], ['${ROUNDCUBEMAIL_PLUGINS_PHP}'])));
" > config/config.docker.inc.php

no matter whether config.docker.inc.php already exists (ie. has been mounted or built into the container) or ROUNDCUBEMAIL_DEFAULT_HOST is unset. It therefore is not even possible to mount in a fitting config.docker.inc.php, because it would rigorously be overwritten bei /docker-entrypoint.sh.

What is the proposed way to set a list of possible imap hosts to choose from?

regards