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 if not header :matches "x-special2" "\\?*\\*" { discard; }
267 if not header :matches "x-special2" "*\0*" { discard; }
286 if size :under 4K { discard; }
291 if size :under 400 { discard; }
300 # no filter line here
301 if unknowntest { keep; }
303 Testing forward file file "test-data"
305 exim: error in forward file: missing or malformed local part (expected word or "<") in "if unknowntest { keep; }"
310 Sieve error: missing test in line 2
315 Sieve error: missing test in line 2
318 if true { unknownaction; }
320 Sieve error: expecting command or closing brace in line 2
323 if true { fileinto abcdefgh; }
325 Sieve error: missing previous require "fileinto"; in line 2
329 if true { fileinto "abcdefgh"; }
334 if header ["to"] [ "marian@abcdefgh.example", "achnee"] { discard; }
339 if header "to" [ "egal", "achnee" { keep; }
341 Sieve error: missing string list in line 2
344 if header "to","from"] "egal" { keep; }
346 Sieve error: key string list expected in line 2
349 if header ["to","from" "egal" { keep; }
351 Sieve error: missing string list in line 2
354 if header ["to",,"from"] "egal" { keep; }
356 Sieve error: missing string list in line 2
359 if header ["to",] "egal" { keep; }
361 Sieve error: missing string list in line 2
364 if header [,"to"] "egal" { keep; }
366 Sieve error: missing string list in line 2
369 if unknowntest { keep; }
371 Sieve error: missing test in line 2
374 if header :matches "to" "egal" { keep; }
379 if header :unknown "to" "egal" { keep; }
381 Sieve error: header string list expected in line 2
385 require ["fileinto", "envelope"];
387 if header :matches "X-Warning" "* is listed at list.dsbl.org*"
389 keep; # keep in "In" folder
395 if header "x-1" "1" { discard; }
400 if not header "x-1" "=?ISO-8859-1?Q?=31?=" { discard; }
405 if header "x-1b" "=?ISO-8859-1?Q?=31=" { discard; }
410 if header "x-b64" "This is BASE64" { discard; }
415 if header "x-b64-broken" "=?iso-8859-1?b?VGhpcyBpcyBCQVNFNjQ?=" { discard; }
420 if header "x-q75total" "0123456789012345678901234567890123456789012345678901234567" { discard; }
425 if header "x-q76total" "=?ISO-8859-1?Q?01234567890123456789012345678901234567890123456789012345678?=" { discard; }
430 if header "X-Wrapped" "eins zwei drei" { discard; }
435 if header "x-nomimewrap" "=?iso-8859-1?q?abc def ghi?=" { discard; }
440 if header "subject" "abcdefghi" { discard; }
445 if header "x-mixed" "abc def" { discard; }
450 if true { stop; fileinto "inbox.never"; }