Home Plesk, Dovecot and fast mailbox search with Solr

Plesk, Dovecot and fast mailbox search with Solr

Dovecot supports several indexers to allow for fast full text searching. Dovecot recommends using Apache Solr through the Dovecot plugin fts_solr

On a usual Debian-based system, one would install this plugin through the package dovecot-solr and call it a day. But Plesk ships its own version of dovecot (plesk-dovecot) without Solr support, which conflicts with dovecot-solr.

The obvious solution to this is to purge Plesk from your system, but that might not be possible.

But, you can of course build the fts_solr plugin manually.

You shouldn’t do this, unless you have to. Stuff will break.

mkdir /tmp/dovecot ; cd /tmp/dovecot
# check dovecot's version
apt-cache show plesk-dovecot | grep ^Version
# download dovecot's source for your version
wget https://www.dovecot.org/releases/2.2/dovecot-2.2.??.tar.gz
tar xf dovecot-*tar.gz ; cd dovecot-*/
# install build dependencies
apt-get build-dep dovecot-core
# build dovecot with fts_solr
./configure --with-solr && make
# this is the needed plugin
ls -lh src/plugins/fts-solr/.libs/lib21_fts_solr_plugin.so
# install
cp src/plugins/fts-solr/.libs/lib21_fts_solr_plugin.so \