3 if address ["From","To"] "marian@abcdefgh.example"
9 if address :is "From" "marian@abcdefgh.example"
15 if address :is "To" "marian@abcdefgh.example"
21 if address :contains "To" "abcdefgh"
27 if address :matches "To" "*abc?efgh*"
43 if allof (false,false) { discard; }
48 if allof (true,false) { discard; }
53 if allof (false,true) { discard; }
58 if allof (true,true) { discard; }
63 if anyof (false,false) { discard; }
68 if anyof (true,false) { discard; }
73 if anyof (false,true) { discard; }
78 if anyof (true,true) { discard; }
83 if not anyof (false,false) { discard; }
88 if not anyof (true,false) { discard; }
93 if not anyof (false,true) { discard; }
98 if not anyof (true,true) { discard; }
103 if header "to" "MARIAN@abcdefgh.example" { discard; }
108 if header :comparator "i;octet" "to" "MARIAN@abcdefgh.example" { discard; }
113 if header :comparator "i;ascii-casemap" "to" "MARIAN@abcdefgh.example" { discard; }
119 if envelope "from" "marian@somenet.example" { discard; }
125 if envelope "from" "offerqn@bpk.example.com" { discard; }
130 if exists [ "X-NotHere", "X-Notheretoo" ] { discard; }
135 if exists [ "X-NotHere", "Delivered-To" ] { discard; }
140 if exists [ "From", "Delivered-To" ] { discard; }
145 if header :contains "X-NotHere" "" { discard; }
150 if header "Delivered-To" "" { discard; }
155 if header :contains "Delivered-To" "" { discard; }
160 if header :contains "Delivered-To" "rc@irc.somenet.example" { discard; }
165 if header "Delivered-To" ["irc@irc.somenet.example"] { discard; }
170 if header "Delivered-To" ["irc@irc.somenet.example","irc@01019somenet.example","some.one"] { discard; }
175 if header "Mime-Version" "1.0" { discard; }
180 if false { discard; }
190 if true { discard; } else { keep; }
195 if false { keep; } else { discard; }
200 if false { keep; } elsif true { discard; } else { keep; }
205 if true { discard; } elsif true { keep; } else { keep; }
212 { if true { discard; } else { keep; } }
217 if header :matches "to" "MA*AN@abc*fg?.example" { discard; }
222 if not header :matches "to" "MA?AN@abc*fg?.example" { discard; }
227 if header :matches "to" "*marian@abcdefgh.example" { discard; }
232 if not header :matches "to" "?marian@abcdefgh.example" { discard; }
237 if header :matches "to" "marian@abcdefgh.example*" { discard; }
242 if not header :matches "to" "marian@abcdefgh.example?" { discard; }
247 if header :matches "x-special1" "\\?*\\*" { discard; }
252 if header :matches "x-special1" "*\0*" { discard; }
257 if not header :matches "x-special1" "*\0*q" { discard; }
262 require "encoded-character";
263 if not header :matches "x-special1" "*${hex:00}*" { discard; }
268 if not header :matches "x-special2" "\\?*\\*" { discard; }
273 if not header :matches "x-special2" "*\0*" { discard; }
292 if size :under 4K { discard; }
297 if size :under 400 { discard; }
306 # no filter line here
307 if unknowntest { keep; }
309 Testing forward file file "test-data"
311 exim: error in forward file: missing or malformed local part (expected word or "<") in "if unknowntest { keep; }"
316 Sieve error: missing test in line 2
321 Sieve error: missing test in line 2
324 if true { unknownaction; }
326 Sieve error: expecting command or closing brace in line 2
329 if true { fileinto abcdefgh; }
331 Sieve error: missing previous require "fileinto"; in line 2
335 if true { fileinto "abcdefgh"; }
340 if header ["to"] [ "marian@abcdefgh.example", "achnee"] { discard; }
345 if header "to" [ "egal", "achnee" { keep; }
347 Sieve error: missing string list in line 2
350 if header "to","from"] "egal" { keep; }
352 Sieve error: key string list expected in line 2
355 if header ["to","from" "egal" { keep; }
357 Sieve error: missing string list in line 2
360 if header ["to",,"from"] "egal" { keep; }
362 Sieve error: missing string list in line 2
365 if header ["to",] "egal" { keep; }
367 Sieve error: missing string list in line 2
370 if header [,"to"] "egal" { keep; }
372 Sieve error: missing string list in line 2
375 if unknowntest { keep; }
377 Sieve error: missing test in line 2
380 if header :matches "to" "egal" { keep; }
385 if header :unknown "to" "egal" { keep; }
387 Sieve error: header string list expected in line 2
391 require ["fileinto", "envelope"];
393 if header :matches "X-Warning" "* is listed at list.dsbl.org*"
395 keep; # keep in "In" folder
401 if header "x-1" "1" { discard; }
406 if not header "x-1" "=?ISO-8859-1?Q?=31?=" { discard; }
411 if header "x-1b" "=?ISO-8859-1?Q?=31=" { discard; }
416 if header "x-b64" "This is BASE64" { discard; }
421 if header "x-b64-broken" "=?iso-8859-1?b?VGhpcyBpcyBCQVNFNjQ?=" { discard; }
426 if header "x-q75total" "0123456789012345678901234567890123456789012345678901234567" { discard; }
431 if header "x-q76total" "=?ISO-8859-1?Q?01234567890123456789012345678901234567890123456789012345678?=" { discard; }
436 if header "X-Wrapped" "eins zwei drei" { discard; }
441 if header "x-nomimewrap" "=?iso-8859-1?q?abc def ghi?=" { discard; }
446 if header "subject" "abcdefghi" { discard; }
451 if header "x-mixed" "abc def" { discard; }
456 if true { stop; fileinto "inbox.never"; }