Spam wird nicht in den Spam Ordner verschoben


auf meinem UCS (4.4-0 errata186 (Blumenthal)) ist der Spamfilter so konfiguriert, dass als Spam erkannte Mails in den Spamordner verschoben werden sollen (mail/dovecot/sieve/spam=yes)

Leider werden die Spam-Mails jedoch nicht verschoben, obwohl es sich definitiv um Spam handelt (Header Tags z.B. X-Spam-Flag: YES, X-Spam-Score: 14.692)

Gibt es hier bekannte Probleme oder habe ich irgend etwas übersehen?

Gruß, Tom

Hallo rootuser,
ich antworte auf Englisch, damit auch nicht-deutschsprachige User die Antwort lesen können.

The UCR variable mail/dovecot/sieve/spam only enables the creation of a Sieve script for new users. If your user was created when the UCR was disabled, enabling it later won’t create the Sieve script (as it only happens at user-creation-time).
You can find the users Sieve scripts in /var/spool/dovecot/private/<domain>/<local>/sieve/. If unchanged, it should be possible to copy the script of a fresh user to an existing one. It must then be enabled by either using sieve-connect or by setting the symlink .dovecot.sieve one level above.


Moin Daniel,

yes thanks for the explanation, understood.
We have managed to integrate a simple sieve rule for all Users now.
However, there is something i would like to suggest regarding OX integration with sieve.

When activating the mail/dovecot/sieve/spam variable, every new user will have a “default.sieve” script in his mailbox configuration.
If this is the case, mailfilter creation in Open-Xchange will fail though:

Caused by: com.openexchange.jsieve.export.exceptions.OXSieveHandlerException: Currently active script "default" is not the expected one "Open-Xchange"

So i think it would be better to validate, if Open-Xchange is in use on this system, and if so, create a new Open-Xchange.sieve file, including the Spamredirection as a first rule

require [ "mailbox" , "vacation" , "fileinto" ];

## Flag: |UniqueId:0|Rulename: automatisches Verschieben von SPAM
if header :contains "X-Spam-Level" "*****"
    fileinto "Spam" ;
    stop ;

and then link .dovecot.sieve to Open-Xchange.sieve.
(attention: fileinto :create “Spam” will not work for OX)

Maybe this can be done during user creation, whenever the Open-Xchange template has been chosen.
Don’t know if this could be easily achieved, but it would definitely eliminate ambiguities.

thanks for your help in any case, as always,highly appreciated!

We will investigate this.
I created a bug report:


Hi Daniel,
great to hear that.
Now trying to provide the allready created mail accounts with a decent filter rule…the ones with OX with an OX rule, and all the others with the regular dovecot.sieve file.
Not easy…but doable :slight_smile:
BTW: We have a similar setup with ISPConfig here and there.
ISPConfig will create a default sieve filter when a mailbox is created.
But in our case, whenever a user creates their own filter rules, these OX rules will be automatically activated…
So there might just be a configuration to tell OX: Take over sieve, whenever OX creates a ruleset.
maybe this helps?