I followed the guide at https://wiki.archlinux.org/index.php/Dovecot#Sieve
In one portion it says to create /var/lib/dovecot/sieve/global_sieves/move_to_spam_folder.sieve with:
require "spamtestplus";
require "fileinto";
require "relational";
require "comparator-i;ascii-numeric";
if spamtest :value "ge" :comparator "i;ascii-numeric" "5" {
fileinto "Junk";
}
Next is says to run:
sievec /var/lib/dovecot/sieve/global_sieves
When I do I receive an error about the "spamtestplus":
move_to_spam_folder: line 1: error: require command: unknown Sieve capability `spamtestplus'.
move_to_spam_folder: line 6: error: unknown test 'spamtest' (only reported once at first occurrence).
move_to_spam_folder: error: validation failed.
sievec(root): Error: failed to compile sieve script '/var/lib/dovecot/sieve/global_sieves/move_to_spam_folder.sieve'
Can someone please provide some advice? Usually the Arch wiki is pretty dead-on but so far no amount of googling/tweaking is getting this to work.
You need to enable and configure the
spamtestplus
Sieve extension in order to use it. The page you referenced has an example of configuration for SpamAssassin, which includes settingsieve_extensions = +spamtest +spamtestplus
in the90-sieve.conf
file:Also refer to the Dovecot Pigeonhole documentation on setting up the spamtest/virustest extensions for more information.