linux:centos:email:dovecot:sieve:add-email-rule
Add sieve rule
Move spam mails to inbox Spam folder (and create it if not already exist)
Edit /etc/dovecot/sieve/default.sieve
require ["fileinto", "mailbox"];
if header :contains "X-Spam-Flag" "YES" {
fileinto :create "INBOX.Spam";
stop;
}
Recompile sieve configuration:
sievec -D "/etc/dovecot/sieve/default.sieve"
Move emails with "Event alarm" subject to inbox EventAlarm folder
Edit /etc/dovecot/sieve/default.sieve
require ["fileinto", "mailbox"];
if header :contains "Subject" "Event alarm" {
fileinto :create "INBOX.EventAlarm";
stop;
}
Recompile sieve configuration:
sievec -D "/etc/dovecot/sieve/default.sieve"
linux/centos/email/dovecot/sieve/add-email-rule.txt · Last modified: by 127.0.0.1
