summaryrefslogtreecommitdiff
path: root/sieve/testsuite/scripts/rel-hairy.sv
blob: a9c560da031301d0f22083bd921aaa9d1f24c375 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# -*- sieve -*-
# This file is part of Mailutils testsuite.
# Copyright (C) 2003, Free Software Foundation.
# See file COPYING for distribution conditions.

require ["relational", "comparator-i;ascii-numeric", "fileinto"];

if header :value "lt" :comparator "i;ascii-numeric" ["x-priority"] ["3"]
  {
    fileinto "%Priority";
  }
elsif address :count "gt" :comparator "i;ascii-numeric" ["to"] ["5"]
  {
    # everything with more than 5 recipients in the "to" field
    # is considered SPAM
    fileinto "%SPAM";
  }
elsif address :value "gt" :all :comparator "i;ascii-casemap" ["from"] ["M"]
  {
    fileinto "%From_N-Z";
  }
else
  {
    fileinto "%From_A-M";
  }

if allof (address :count "eq" :comparator "i;ascii-numeric"
                  ["to", "cc"] ["1"] ,
          address :all :comparator "i;ascii-casemap"
                  ["to", "cc"] ["me@foo.example.com.invalid"])
  {
    fileinto "%Only_me";
  }

# End of rel-hairy.sv

Return to:

Send suggestions and report system problems to the System administrator.