blob: 506bde19c8f78fca194013a6379aa2528d982149 (
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
|
.include(duplicate=append,priority=0) "{= env.TESTDIR =}/configs/plugins.conf"
lua = "{= env.LUA_SCRIPT =}";
settings {
id_test {
id = "id_test";
apply {
symbols_enabled = ["SIMPLE_TEST"];
}
}
id_pre { # implicit id
apply {
symbols_enabled = ["SIMPLE_PRE"];
}
}
id_virtual {
apply {
symbols_enabled = ["SIMPLE_VIRTUAL"];
}
}
id_virtual1 {
apply {
symbols {
EXPLICIT_VIRTUAL1 = 10.0
}
symbols_enabled = ["DEP_REAL"];
}
}
id_virtual_group {
user = "test@example.com";
from = "test2@example.com";
hostname = "example.com";
selector = "rcpts:addr.in(test3@example.com)";
header = {
"Content-Transfer-Encoding" = "7bit";
"Custom-Header" = true;
"Mime-Version" = false;
}
request_header = {
"Test" = "passed";
}
expression = 'user || from || hostname || selector:1 || header:mime_version || header:custom_header || header:content_transfer_encoding || request_header:test'
apply {
symbols_enabled {
SIMPLE_VIRTUAL = 10.0;
}
symbols {
EXPLICIT_VIRTUAL = 10.0
}
}
}
id_test_priority {
priority = high;
from = "user@test.com";
apply {
symbols_enabled {
PRIORITY = 10.0;
}
symbols {
PRIORITY_2 = 10.0
}
}
}
empty_symbols_enabled {
ip = "5.5.5.5";
apply {
symbols_enabled = [];
}
}
empty_groups_enabled {
selector = "ip.in(\"5.5.5.6\")";
apply {
groups_enabled = [];
}
}
external {
disabled = true
external_map = {
map = {
backend = "http://127.0.0.1:18080/settings";
external = true;
method = "body";
encode = "json";
}
selector = "id('from');from('mime')";
}
register_symbols = {
EXTERNAL_SETTINGS = { score = 1.0 }
}
}
}
classifier {
backend = "sqlite3";
statfile {
spam = true;
symbol = BAYES_SPAM;
path = "/tmp/bayes.spam.sqlite3";
}
statfile {
spam = false;
symbol = BAYES_HAM;
path = "/tmp/bayes.ham.sqlite3";
}
min_learns = 1;
min_token_hits = 1;
}
|