Dovecot uses pigeonhole
as its sieve
implementation.
Integrate the sieve
plugin into the /etc/dovecot/dovecot.conf
like this:
plugin {
sieve_extensions = +vnd.dovecot.execute
sieve_plugins = sieve_extprograms
sieve_execute_bin_dir = /etc/dovecot/sieve
}
Then create the folder /etc/dovecot/sieve
and the file /etc/dovecot/sieve/antispam.sv
with the following contents:
require "vnd.dovecot.execute";
if not execute :pipe /usr/bin/antispam-sieve {
discard;
stop;
}
On your local machine, build the binaries:
cd /path/to/antispam/toolchain;
go run build.go;
Afterwards, upload the binary located at /path/to/antispam/build/antispam-sieve_linux_amd64
to the server as /usr/bin/antispam-sieve
and make sure it's executable.
sudo systemctl restart dovecot;