Sieve Global FIlter Rule

Christian Rößler Roessler at
Thu Apr 22 17:05:49 CEST 2010

Christian Tardif schrieb:

> I was wondering if there was any way to create a global filter rule so
> every user in the system would make use of it implicitely?  What I would
> want is a way to force every mail tagged as SPAM (via the headers) go in
> the Junk folder of the coresponding user without having to go in each
> user account and set it. Also, a global rule would ensure that they
> wouldn't be able to revome the rule by themselves.

Heh, is it this time of the year again? *snicker* SCNR, but the global
sieve-script question is likely to come each two months.

Well, let me citate myself (I am not sure if compiling to bytecode is
necessary anylonger, try it):

I think the only possibility presently to have a global is using the
'include'-directive. So, for Kolab (let's say the User is called 'kro'):

1. Enter the user's sieve directory:
cd /kolab/var/imapd/sieve/domain/x/x.your.domain.tld/k/kro

2. Edit your default-sieve-Script for that user (do not forget to
'require' include), no need to use filename.bc:
bash-3.2$ vi default
require "fileinto";
require "...your other requires...";
require "include";
include :global "default";

3. 'compile' it to bytecode:
bash-3.2$ sievec default default.bc

4. Change to global, edit, compile global sieve script:
cd /kolab/var/imapd/sieve/global/
vi default
(do your sieve-ing...)
bash-3.2$ sievec default default.bc

That's all. The deficiency of this method is that 1. this include has to
be in every user's defualt sieve script, and 2. user could edit their
sieve scripts to not execute the 'global' sieve script. So I would very
much like a truly global solution - but for now this suffices.

HTH, Christian

More information about the users mailing list