- ověříme si cestu k souboru default.sieve, otevřeme soubor
/etc/dovecot/dovecot.conf
a najdeme sekci „Plugin settings“, hledáme údaj sieve_global_path nebo sieve_default
- soubor default.sieve je v Zentyal 5.0 umístěn v
/var/vmail/default.sieve
- otevřeme tento soubor a vložíme následující kód
require "fileinto";
if header :comparator "i;ascii-casemap" :contains "Subject" "==SPAM==" {
fileinto "Spam";
stop;}
- dále vytvoříme soubor /var/vmail/<mail domain>/<user email>/.dovecot.sieve a vložíme do něj následující kód
require "fileinto";
if header :comparator "i;ascii-casemap" :contains "Subject" "==SPAM==" {
fileinto "Spam";
stop;
}
- vytvořeným nebo modifikovaným souborům nastavíme práva:
chown ebox:ebox /var/vmail/default.sieve
chmod 0644 /var/vmail/default.sieve
chown ebox:ebox /var/vmail/<mail domain>/<user email>/.dovecot.sieve
chmod 0600 /var/vmail/<mail domain>/<user email>/.dovecot.sieve
- nakonec restartujeme dovecot