10 Zimbra Sieve Filter Examples
Ten Sieve filters for everyday mail on Zimbra. Copy one, change the addresses and folder names to your own, and it is ready to use.
Want to know how they work, or where to put them? Read Zimbra Sieve Filters: An Introduction.
1. Move newsletters to their own folder
require ["fileinto"];
if exists "List-Unsubscribe" {
fileinto "Newsletters";
stop;
}
2. Collect invoices in one folder
require ["fileinto"];
if anyof (header :contains "subject" "invoice",
header :contains "subject" "receipt") {
fileinto "Invoices";
stop;
}
3. Flag every message from your manager
require ["flag"];
if address :is "from" "manager@mshsoftware.com" {
flag "flagged";
}
4. Forward a copy of all mail to another address
require ["copy"];
redirect :copy "assistant@mshsoftware.com";
5. Forward only urgent messages
require ["copy"];
if anyof (header :contains "subject" "urgent",
header :is "X-Priority" "1") {
redirect :copy "on-call@mshsoftware.com";
}
6. Tag everything about a project
require ["tag"];
if header :contains "subject" "Project Apollo" {
tag "Apollo";
}
7. Move messages not addressed to you directly
require ["fileinto"];
if not me :in "to" {
fileinto "Cc";
stop;
}
8. Move large messages out of the Inbox
require ["fileinto"];
if size :over 10M {
fileinto "Large messages";
stop;
}
9. Delete automatic daily reports
if allof (address :is "from" "reports@mshsoftware.com",
header :contains "subject" "Daily report") {
discard;
stop;
}
10. Tag mail that arrives outside working hours
require ["tag"];
if anyof (current_time :before "0800",
current_time :after "1800",
current_day_of_week :is ["0", "6"]) {
tag "After hours";
}
Learn more
These scripts cover the most common cases. To understand what each line does, where Zimbra stores Sieve scripts and how to set them up for a user or a whole domain, read Zimbra Sieve Filters: An Introduction.