diff options
author | Aleksander Machniak <alec@alec.pl> | 2013-05-12 14:11:59 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2013-05-12 14:11:59 +0200 |
commit | ed837a3544b8c157b00f520e0c716304abedd519 (patch) | |
tree | 7b11a87d90d3d7a16dca6143ace5267a20468187 /plugins/managesieve/tests/src/parser_index | |
parent | fd0fd3b0a0c82a1a5cce4dc775886154e9bf9e14 (diff) |
Added support for date and index extensions (RFC5260) in script parser
Script parser code improvements
Diffstat (limited to 'plugins/managesieve/tests/src/parser_index')
-rw-r--r-- | plugins/managesieve/tests/src/parser_index | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/plugins/managesieve/tests/src/parser_index b/plugins/managesieve/tests/src/parser_index new file mode 100644 index 000000000..78aba9a55 --- /dev/null +++ b/plugins/managesieve/tests/src/parser_index @@ -0,0 +1,24 @@ +require ["comparator-i;ascii-numeric","date","fileinto","index","relational"]; +# rule:[index-header1] +if header :index 1 :last :contains "X-DSPAM-Result" "Spam" +{ + fileinto "Spam"; + stop; +} +# rule:[index-header2] +if header :index 2 :contains ["From","To"] "test@domain.tld" +{ + discard; + stop; +} +# rule:[index-address] +if address :index 1 :all :is "From" "nagios@domain.tld" +{ + fileinto "domain.tld"; + stop; +} +# rule:[index-date] +if date :index 1 :last :zone "-0500" :value "gt" :comparator "i;ascii-numeric" "received" "iso8601" "2007-02-26T09:00:00-05:00" +{ + stop; +} |