Hi,
plugin { sieve_global_path = /etc/dovecot/sieve-global.d/spam.sieve
Use "sieve_before", which is not documented in the wiki. Only this way the sievescript really gets executed.The global path requires a sieve script per home directory, including the global file.
best regards, Anton