Sieve in brief
Sieve (RFC 5228) is a small language for mail filters that the mail server runs on delivery. A script is a list of
commands; most are if rules with a test and actions.
require ["fileinto"];
if header :contains "List-Id" "swift.org" {
fileinto "Lists/Swift";
stop;
}
requirenames the extensions a script uses, e.g.fileinto,vacation,imap4flags,variables.- Tests:
header,address,envelope,size,exists, combined withallof,anyofandnot. - Match types:
:is,:contains,:matches(wildcards),:regex(if the server supports it). - Actions:
keep,fileinto,redirect,discard,reject,vacation,stop.
Standards: RFC 5228 (opens in new window) (Sieve), RFC 5804 (opens in new window) (ManageSieve), RFC 5230 (opens in new window) (vacation), RFC 5232 (opens in new window) (imap4flags), RFC 5229 (opens in new window) (variables).