linux:centos:email:dovecot:sieve:add-email-rule
This is an old revision of the document!
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.1537037498.txt.gz · Last modified: 2023/07/04 19:36 (external edit)