roundcube / roundcubemail-docker

Resources to build Docker images for Roundcube Webmail
290 stars 129 forks source link

Couldn't change the configuration for managesieve #116

Closed Danissss closed 3 years ago

Danissss commented 3 years ago

Hi, I have read the issue #79, and follow the steps but the roundcube is still trying to connect to localhost rather than desired one.

Here is my managesieve.inc.php at config/

$config['managesieve_host'] = 'mail.sample.ca';

Here is the docker-compose I ran:

version: '3.6'

services:
        roundcubemail:
                image: roundcube/roundcubemail:latest
                container_name: roundcubemail
                volumes:
                        - ./config/:/var/roundcube/config
                ports:
                        - 8000:80
                environment:
                        - ROUNDCUBEMAIL_DEFAULT_HOST=tls://mail.sample.ca
                        - ROUNDCUBEMAIL_SMTP_SERVER=tls://mail.sample.ca
                        - ROUNDCUBEMAIL_PLUGINS=managesieve

I checked the /var/roundcube/config/ inside container, and the managesieve.inc.php exist; but /var/www/html/plugins/managesieve/config.inc.php.dist still use $config['managesieve_host'] = 'localhost';

Am I missing something?

Thanks!

thomascube commented 3 years ago

plugins/managesieve/config.inc.php.dist only serves a template and is not considered anyway. Please also check that your container's /var/www/html/config/config.inc.php file containes a line that includes the /var/roundcube/config/managesieve.inc.php file. If you're using a persistent volume for /var/www/html this config file not updated (see issue #112). You can delete that file on the persistent volume and restart your container.

Danissss commented 3 years ago

Hi @thomascube

Thanks for reply and information.

I change the config.inc.php at persistent volume, and restart the container and it works.

One thing I noticed is that the config.inc.php looks like following originally, which I have to add ?> the close the php script.

<?php
    $config['db_dsnw'] = 'sqlite:////var/roundcube/db/sqlite.db?mode=0646';
    $config['db_dsnr'] = '';
    $config['default_host'] = 'tls://mail.foodb.ca';
    $config['default_port'] = '143';
    $config['smtp_server'] = 'tls://mail.foodb.ca';
    $config['smtp_port'] = '587';
    $config['des_key'] = 'n8RyMfj/gRf4+MpvhAJ/zKqZ';
    $config['temp_dir'] = '/tmp/roundcube-temp';
    $config['plugins'] = ['managesieve'];
    $config['zipdownload_selection'] = true;
    $config['log_driver'] = 'stdout';
    $config['skin'] = 'larry';

include('/var/roundcube/config/managesieve.inc.php');

I am not php expert so it may not be necessary.

thomascube commented 3 years ago

FWIW: the closing ?> is not needed in PHP files. I assume your problem is related to #112 which we'll address shortly.