Roundcube Community Forum

 

Docker and managesieve

Started by mxwx, October 08, 2021, 03:48:08 AM

Previous topic - Next topic

mxwx

Hi there,

I have managed to install roundcube with docker finally. Now I want to activate managesieve and don't know the correct way to make sure it will survive updates of the container. I have looked at the manuals concerning "composer.phar require" but dont manage to install it that way. Even composer.phar require --dry-run "roundcube/managesieve": "^=9.3.0" is not working.

I finally made it working with manipulating the docker containers config.inc.php and the config.inc.php of the managesieve plugin. This way, I believe, it will not survive a docker update and I would have to do the "manipulation" after each update.

Well, is there someone out there that has managed the activation of managesieve the "correct way" and is willing to share its knowledge.

Thanks

erik_fugletaint

I just finished installing managesieve on the official roundcube image from dockerhub: https://hub.docker.com/r/roundcube/roundcubemail.

The plugin is selected using the ROUNDCUBEMAIL_PLUGINS environment variable.  So my docker run command includes this, for example:
-e ROUNDCUBEMAIL_PLUGINS=archive,zipdownload,database_attachments,managesieve

I have the plugin config in a directory on the docker host that is mounted by the image on /var/roundcube/config.  For example if you put the config file in /opt/roundcube/config, you would add this to your docker run command:
-v /opt/roundcube/config/:/var/roundcube/config/

The roundcube image is configured to include any custom config in /var/roundcube/config.  See the "Advanced configuration" section on the dockerhub page for more details.

salfter

#2
I've brought up a new docker-mailserver container and am reconfiguring the Roundcube container I'd recently set up that was pointed at my old mail server.  It's working as far as basic functionality goes, but it's still not communicating with Sieve.  On the docker-mailserver side, ENABLE_MANAGESIEVE=1 is set and the container is set to expose port 4190.  ```docker exec -it roundcube nc <hostname> 4190``` returns a response that suggests that managesieve is up and running and that the Roundcube container can connect to it.  On the Roundcube side, plugins/managesieve/config.inc.php was copied over from config.inc.php.dist and managesieve_host was set to <hostname>:4190.  I then restarted both the mail server and Roundcube. When I click on filter settings in Roundcube, though, I still get the "unable to connect to server" error. 

I also tried setting managesieve_auth_type from null to PLAIN, but that keeps Roundcube from working at all.  From the description, it seems that null should work.

I've downloaded the Sieve Windows app and connected it to the server, knocked together a script (first time, as I've used procmail on my old server), and tested it.  It worked as expected, so it would appear that everything within docker-mailserver is working properly and it's just Roundcube and its managesieve plugin that don't want to play ball for some reason.

Update: I figured it out...needed the following in plugins/managesieve/config.inc.php:

$config['managesieve_host'] = 'tls://<hostname>';
$config['managesieve_auth_type'] = "PLAIN";


PLAIN didn't work earlier because it wasn't quoted.