File: command-syntax.sieve

package info (click to toggle)
dovecot 1:2.2.13-12~deb8u4
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 38,792 kB
  • sloc: ansic: 341,472; sh: 16,920; makefile: 5,393; cpp: 1,474; perl: 265; xml: 44; python: 34; pascal: 27
file content (42 lines) | stat: -rw-r--r-- 854 bytes parent folder | download | duplicates (12)
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
36
37
38
39
40
41
42
require "editheader";

/* "addheader" [":last"] <field-name: string> <value: string>
 */

# 1: missing field name and value
addheader;

# 2: missing value
addheader "x-frop";

# 3: value not a string; number
addheader "x-frop" 2;

# 4: value not a string; list
addheader "x-frop" ["frop"];

# 5: strange tag
addheader :tag "x-frop" "frop";

/* "deleteheader" [":index" <fieldno: number> [":last"]]
 *                  [COMPARATOR] [MATCH-TYPE]
 *                  <field-name: string>
 *                  [<value-patterns: string-list>]
 */

# 6: missing field name
deleteheader;

# 7: :last tag without index
deleteheader :last "x-frop";

# 8: :index tag with string argument
deleteheader :index "frop" "x-frop";

# OK: match type without value patterns
deleteheader :matches "x-frop";

# 9: value patterns not a string(list)
deleteheader "x-frop" 1;