Add prefix and suffix matching for strlist filter.
[apps/pfixtools.git] / postlicyd / data / test.conf
1 match1 {
2   type = match;
3
4   match_all = false;
5   condition = stress #=;
6   condition = stress != yes;
7   on_match  = postfix:OK;
8   on_fail   = postfix:OK;
9 }
10
11 match2 {
12   type = match;
13
14   match_all = true;
15   condition = stress >= y;
16   condition = stress >i e;
17   condition = size <i 12345678;
18   condition = encryption_cipher >i rsa;
19   condition = encryption_cipher >i sha;
20   condition = sasl_method == plain;
21
22   on_match = postfix:OK;
23   on_fail  = postfix:OK;
24 }
25
26 hostnames1 {
27   type = strlist;
28
29   fields = helo_name,client_name;
30   file   = nolock:suffix:1:data/test_hostnames_1;
31   file   = nolock:prefix:4:data/test_hostnames_2;
32   file   = nolock:suffix:8:data/test_hostnames_3;
33
34   soft_threshold = 1;
35   hard_threshold = 5;
36
37   on_hard_match = postfix:OK;
38   on_soft_match = postfix:OK;
39   on_fail = postfix:OK;
40 }
41
42 hostnames2 {
43   type = strlist;
44
45   fields = helo_name,client_name,reverse_client_name;
46   file   = nolock:suffix:1:data/test_hostnames_1;
47   file   = nolock:prefix:4:data/test_hostnames_2;
48   file   = nolock:suffix:8:data/test_hostnames_3;
49
50   soft_threshold = 1;
51   hard_threshold = 5;
52
53   on_hard_match = postfix:OK;
54   on_soft_match = postfix:OK;
55   on_fail = postfix:OK;
56 }
57
58 hostnames3 {
59   type = strlist;
60
61   fields = client_name;
62   file   = nolock:partial-suffix:1:data/test_hostnames_4;
63
64   on_hard_match = postfix:OK;
65   on_fail = postfix:OK;
66 }
67
68
69 emails1 {
70   type = strlist;
71
72   fields = sender;
73   file   = nolock:suffix:1:data/test_emails_1;
74   file   = nolock:prefix:4:data/test_emails_2;
75   file   = nolock:suffix:8:data/test_emails_3;
76
77   soft_threshold = 1;
78   hard_threshold = 5;
79
80   on_hard_match = postfix:ok;
81   on_soft_match = postfix:ok;
82   on_fail = postfix:ok;
83 }
84
85 emails2 {
86   type = strlist;
87
88   fields = sender,recipient;
89   file   = nolock:suffix:1:data/test_emails_1;
90   file   = nolock:prefix:4:data/test_emails_2;
91   file   = nolock:suffix:8:data/test_emails_3;
92
93   soft_threshold = 1;
94   hard_threshold = 5;
95
96   on_hard_match = postfix:ok;
97   on_soft_match = postfix:ok;
98   on_fail = postfix:ok;
99 }
100
101 emails3 {
102   type = strlist;
103
104   fields = sender;
105   file   = nolock:partial-prefix:1:data/test_emails_4;
106
107   on_hard_match = postfix:ok;
108   on_fail = postfix:ok;
109 }
110
111 ips1 {
112   type = iplist;
113
114   file = nolock:1:data/test_ip_1;
115   file = nolock:1:data/test_ip_2;
116
117   soft_threshold = 1;
118   hard_threshold = 2;
119
120   on_hard_match = postfix:OK;
121   on_soft_match = postfix:OK;
122 }
123
124 greylist1 {
125   type = greylist;
126
127   prefix = test1_;
128   path   = data/;
129   delay  = 1;
130   retry_window = 4;
131   client_awl = 2;
132   max_age = 8;
133
134   on_greylist = postfix:OK;
135   on_whitelist = postfix:OK;
136 }
137
138 recipient_filter = match1;