- C 72.2%
- Shell 18%
- M4 4.9%
- Makefile 4.9%
Introduction
This is wormhole, a project to bring back Dovecot's replication feature for Dovecot 2.4 and later. It is mainly a fork of the Dovecot 2.3 replication code ported to Dovecot 2.4. The forked code was removed by the Dovecot maintainers from Dovecot starting with Version 2.4. This project aims to provide the feature as a plugin for Dovecot 2.4 and higher.
Installation
To install wormhole you first have to install Dovecot or at least the Dovecot development package from your distribution or the Dovecot community repositories. After that you compile and install the project with (assuming you have Dovecot installed in /usr):
./configure --prefix=/usr
make
make check # optional
make install
Patch for Dovecot
For best backward compatibility, you can find a patch for Dovecot in
the patches directory. This patch will add a hook system do
doveadm's sync and dsync-server commands. These hooks will be
used by wormhole to extend sync and dsync-server with replication
specific features. The availability of this hooks is autodetected by
configure.
If you do not need backward compatibility with existing Dovecot-2.3
replication servers, you don't need this patch. It is even possible to
run mixed 2.3/2.4 setups without this patch but you will have limited
support for noreplicate setting.
Packages
Wormhole is available as openSUSE package in the server:main repository. Thanks to Marcus Rueckert (@darix)!
On Debian and Ubuntu you can use make debian-package to build a
package, on Red Hat Enterprise Linux 10 you can use make redhat-package. The package will be build against the Dovecot package
installed, either from your distribution or from the Dovecot CE
repository.
Offical packages can be found on https://wormhole.mpi-klsb.mpg.de/repository.html. Those packages are built against the latest CE packages of Dovecot. If you need packages for other platforms missing in the repository, please help me find the relevant information to build such packages, e.g. which docker image to use, how to install Dovecot CE in it, how to build packages on that platform, ...
Build dependencies
Debian
For compiling the software, you need:
apt install dovecot-dev
If you want to run the included test suite or build from git, you also need:
apt install bash curl build-essential automake libtool bison flex pkg-config procps libssl-dev zlib1g-dev lsb-release liblua5.3-dev
Alpine Linux
For compiling the software, you need:
apk add make dovecot dovecot-dev autoconf automake libtool gcc libc-dev
# minimal dovecot config in case you just installed it:
cat <<EOF > /etc/dovecot/dovecot.conf
dovecot_config_version = 2.4.1
dovecot_storage_version = 2.4.1
EOF
If you want to run the included test suite or build from git, you also need:
apk add tar bash curl bison flex patch findutils procps openssl-dev zlib-dev lsb-release lua5.3-dev
OpenSUSE
For compiling the software, you need:
zypper addrepo --refresh https://download.opensuse.org/repositories/server:mail/openSUSE_Tumbleweed/server:mail.repo
zypper install dovecot24-devel gcc gawk make
EOF
If you want to run the included test suite or build from git, you also need:
zypper install diffutils findutils file bison flex zlib-devel libopenssl-3-devel patch lsb-release lua53-devel perl
Red Hat Enterprise Linux
For compiling the software, you need:
yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm
cat > /etc/yum.repos.d/dovecot.repo <<'EOF'
[dovecot-2.4-latest]
name=Dovecot 2.4 RHEL $releasever - $basearch
baseurl=http://repo.dovecot.org/ce-2.4-latest/rhel/$releasever/RPMS/$basearch
gpgkey=https://repo.dovecot.org/DOVECOT-REPO-GPG-2.4
gpgcheck=1
enabled=1
EOF
yum makecache
yum update
yum install dovecot-devel gcc gawk make
EOF
If you want to run the included test suite or build from git, you also need:
yum install diffutils findutils file libunwind-devel pcre2-devel libstemmer-devel libicu-devel openssl-devel perl bison flex zlib-devel patch lsb-release pandoc
Other platforms
Create a pull request or sent me a mail in case you found out, what's needed!
Upgrading from Dovecot 2.3
Configuration
See Replication with dsync for details. All configuration parameters are described in Replication Settings.
Authors and acknowledgements
First I want to thank Timo Sirainen and his team from Dovecot for providing the replication feature in Dovecot since 2012. Most of the code in this project is based on their work!
Maintainer of this project and author of the new code to bring replication back into Dovecot 2.4:
- Patrick Cernko pcernko@mpi-klsb.mpg.de
Contributions
- 2025年10月08日 Marcus Rueckert (@darix): fixed linking against dovecot's notify plugin
- 2025年10月08日 Aki Tuomi (@cmouse): removed linking against notify-plugin completely
- 2025年10月09日 Marcus Rueckert (@darix): openSUSE packages
- 2025年10月12日 Sven Hankel wormhole@findst.net: fixed linker rpath detection and linking against dovecot libs
- 2025年10月17日 Kirill A. Korinsky kirill@korins.ky: replicator: fixed infinity loop on sync replication
License
Wormhole is released under LGPLv2.1 (see COPYING) similar to the forked code of Dovecot's replication feature.
Wormhole documentation (in doc/) is released under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License (see doc/LICENSE) similar to the forked documentation of Dovecot's replication documentation.
Questions and Contributing
If you have questions or want to report issues or contribute, you can do so on Codeberg:
The official website of this project is: https://people.mpi-klsb.mpg.de/~pcernko/wormhole.shtml