How to enable roundcube mail filtering with docker-mailserver

I tried to setup roundcube and docker-mailserver together for a neat mail server setup but as I looked into it, there are some undocumented steps.

I completed most of these steps through rigorous searching but one I hit a roadblock with was setting up roundube’s filtering.

I made this tutorial in order to ease the process in case anyone encounters the same setup and searches for it since I couldn’t find any posts about it.

Like many people, I seek a fully isolated docker setup for most of my services as it’s easy to update, maintain and debug. Plus it’s portable.

Going into this, I chose all docker containers obviously. Images I used for this setup were the following:

I won’t get into the full setup since they’re pretty easy to follow. Simply starup docker-mailserver and connect roundcube to it by editting the config or environment variables to use those settings.

First off, the roundcube filtering can be enabled by “activating” the managesieve plugin by adding the following to the plugins section of roundcube’s config present in html/confg/

$config['plugins'] = ['managesieve'];

You can have other plugins also added to the array.

The host also needs to be set in the config file like the following:

$config['managesieve_host'] = "tls://";

Port 4190 is sieve’s default port.

After restarting roundcube, it is now possible to see the filters option in the interface. If using docker-compose, it is recommended to do docker-compose down and then bring the instances back up with docker-compose up. Since this will reload any environment or volume changes that were made while the container was already started.

Notify of
Inline Feedbacks
View all comments