2 Main test of script parser
6 include('../lib/rcube_sieve.php');
9 require ["fileinto","vacation","reject","relational","comparator-i;ascii-numeric"];
11 if anyof (header :contains "X-DSPAM-Result" "Spam")
17 if anyof (header :contains ["From","To"] "test@domain.tld")
23 if anyof (not header :contains ["Subject"] "[test]", header :contains "Subject" "[test2]")
28 # rule:[test-vacation]
29 if anyof (header :contains "Subject" "vacation")
31 vacation :days 1 text:
40 if anyof (true) /* comment
41 * "comment" #comment */ {
47 reject "Message over 5MB size limit. Please contact me before sending this.";
50 if header :value "ge" :comparator "i;ascii-numeric"
51 ["X-Spam-score"] ["14"] {redirect "test@test.tld";}
54 $s = new rcube_sieve_script($txt);
59 require ["fileinto","vacation","reject","relational","comparator-i;ascii-numeric"];
61 if header :contains "X-DSPAM-Result" "Spam"
67 if header :contains ["From","To"] "test@domain.tld"
73 if anyof (not header :contains "Subject" "[test]", header :contains "Subject" "[test2]")
78 # rule:[test-vacation]
79 if header :contains "Subject" "vacation"
81 vacation :days 1 text:
97 reject "Message over 5MB size limit. Please contact me before sending this.";
100 if header :value "ge" :comparator "i;ascii-numeric" "X-Spam-score" "14"
102 redirect "test@test.tld";