put fileinto files to the spooldir (%)
Showing
2 changed files
with
15 additions
and
15 deletions
... | @@ -7,21 +7,21 @@ require ["relational", "comparator-i;ascii-numeric", "fileinto"]; | ... | @@ -7,21 +7,21 @@ require ["relational", "comparator-i;ascii-numeric", "fileinto"]; |
7 | 7 | ||
8 | if header :value "lt" :comparator "i;ascii-numeric" ["x-priority"] ["3"] | 8 | if header :value "lt" :comparator "i;ascii-numeric" ["x-priority"] ["3"] |
9 | { | 9 | { |
10 | fileinto "Priority"; | 10 | fileinto "%Priority"; |
11 | } | 11 | } |
12 | elsif address :count "gt" :comparator "i;ascii-numeric" ["to"] ["5"] | 12 | elsif address :count "gt" :comparator "i;ascii-numeric" ["to"] ["5"] |
13 | { | 13 | { |
14 | # everything with more than 5 recipients in the "to" field | 14 | # everything with more than 5 recipients in the "to" field |
15 | # is considered SPAM | 15 | # is considered SPAM |
16 | fileinto "SPAM"; | 16 | fileinto "%SPAM"; |
17 | } | 17 | } |
18 | elsif address :value "gt" :all :comparator "i;ascii-casemap" ["from"] ["M"] | 18 | elsif address :value "gt" :all :comparator "i;ascii-casemap" ["from"] ["M"] |
19 | { | 19 | { |
20 | fileinto "From_N-Z"; | 20 | fileinto "%From_N-Z"; |
21 | } | 21 | } |
22 | else | 22 | else |
23 | { | 23 | { |
24 | fileinto "From_A-M"; | 24 | fileinto "%From_A-M"; |
25 | } | 25 | } |
26 | 26 | ||
27 | if allof (address :count "eq" :comparator "i;ascii-numeric" | 27 | if allof (address :count "eq" :comparator "i;ascii-numeric" |
... | @@ -29,7 +29,7 @@ if allof (address :count "eq" :comparator "i;ascii-numeric" | ... | @@ -29,7 +29,7 @@ if allof (address :count "eq" :comparator "i;ascii-numeric" |
29 | address :all :comparator "i;ascii-casemap" | 29 | address :all :comparator "i;ascii-casemap" |
30 | ["to", "cc"] ["me@foo.example.com.invalid"]) | 30 | ["to", "cc"] ["me@foo.example.com.invalid"]) |
31 | { | 31 | { |
32 | fileinto "Only_me"; | 32 | fileinto "%Only_me"; |
33 | } | 33 | } |
34 | 34 | ||
35 | # End of rel-hairy.sv | 35 | # End of rel-hairy.sv | ... | ... |
... | @@ -28,15 +28,15 @@ sieve_test -f $MU_SPOOL_DIR/relational.mbox rel-address.sv -pattern \ | ... | @@ -28,15 +28,15 @@ sieve_test -f $MU_SPOOL_DIR/relational.mbox rel-address.sv -pattern \ |
28 | "DISCARD on msg uid 9: marking as deleted" | 28 | "DISCARD on msg uid 9: marking as deleted" |
29 | 29 | ||
30 | sieve_test -f $MU_SPOOL_DIR/relational.mbox rel-hairy.sv -pattern \ | 30 | sieve_test -f $MU_SPOOL_DIR/relational.mbox rel-hairy.sv -pattern \ |
31 | "FILEINTO on msg uid 1: delivering into From_A-M"\ | 31 | "FILEINTO on msg uid 1: delivering into %From_A-M"\ |
32 | "FILEINTO on msg uid 2: delivering into From_N-Z"\ | 32 | "FILEINTO on msg uid 2: delivering into %From_N-Z"\ |
33 | "FILEINTO on msg uid 3: delivering into Priority"\ | 33 | "FILEINTO on msg uid 3: delivering into %Priority"\ |
34 | "FILEINTO on msg uid 4: delivering into Priority"\ | 34 | "FILEINTO on msg uid 4: delivering into %Priority"\ |
35 | "FILEINTO on msg uid 5: delivering into Priority"\ | 35 | "FILEINTO on msg uid 5: delivering into %Priority"\ |
36 | "FILEINTO on msg uid 6: delivering into From_A-M"\ | 36 | "FILEINTO on msg uid 6: delivering into %From_A-M"\ |
37 | "FILEINTO on msg uid 7: delivering into From_A-M"\ | 37 | "FILEINTO on msg uid 7: delivering into %From_A-M"\ |
38 | "FILEINTO on msg uid 8: delivering into From_A-M"\ | 38 | "FILEINTO on msg uid 8: delivering into %From_A-M"\ |
39 | "FILEINTO on msg uid 8: delivering into Only_me"\ | 39 | "FILEINTO on msg uid 8: delivering into %Only_me"\ |
40 | "FILEINTO on msg uid 9: delivering into SPAM" | 40 | "FILEINTO on msg uid 9: delivering into %SPAM" |
41 | 41 | ||
42 | # End of relational.exp | 42 | # End of relational.exp | ... | ... |
-
Please register or sign in to post a comment