forked from vstakhov/rmilter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rmilter.conf.sample
284 lines (227 loc) · 8.08 KB
/
rmilter.conf.sample
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
# Sample config file for rmilter
# $Id$
#
# .include - directive to include other config file
#.include ./rmilter-grey.conf
# pidfile - path to pid file
# Default: pidfile = /var/run/rmilter.pid
pidfile = /var/run/rmilter/rmilter.pid;
# bind_socket - socket credits for local bind:
# unix:/path/to/file - bind to local socket
# inet:port@host - bind to inet socket
# Default: bind_socket = unix:/var/tmp/rmilter.sock;
bind_socket = unix:/var/run/rmilter/rmilter.sock;
# tempdir - path to directory that contains temporary files
# Default: $TMPDIR
tempdir = /tmp;
# max_size - maximum size of scanned message for ClamAV, Rspamd and DCC
# Default: 0 (no limit)
max_size = 10M;
# strict_auth - strict checks for mails from authenticated senders
# Default: no
#strict_auth = no;
# spf_domains - path to file that contains hash of spf domains
# Default: empty
#spf_domains = example.com, mail.ru;
# use_dcc - whether or not use DCC
# Default: no
#use_dcc = no;
# whitelist - global recipients whitelist
# Default: no
#whitelist = [email protected], [email protected];
# our_networks - treat mail from these networks as mail from authenticated users
# (has no effect if `strict_auth` = `yes`)
# Default: empty
#our_networks = 127.0.0.1/32, [::1]/128, 192.168.0.0/16;
clamav {
# servers - clamav socket definitions in format:
# /path/to/file
# host[:port]
# sockets are separated by ','
# Default: empty
#servers = clam1.example.com, clam2.example.com;
# connect_timeout - timeout in miliseconds for connecting to clamav
# Default: 1s
#connect_timeout = 1s;
# port_timeout - timeout in miliseconds for waiting for clamav port response
# Default: 4s
#port_timeout = 4s;
# results_timeout - timeout in miliseconds for waiting for clamav response
# Default: 20s
#results_timeout = 20s;
# error_time - time in seconds during which we are counting errors
# Default: 10
#error_time = 10;
# dead_time - time in seconds during which we are thinking that server is down
# Default: 300
#dead_time = 300;
# maxerrors - maximum number of errors that can occur during error_time to make us thinking that
# this upstream is dead
# Default: 10
maxerrors = 10;
};
spamd {
# servers - Rspamd socket definitions in format:
# /path/to/file
# host[:port]
# sockets are separated by ','
# if server name is prefixed with 'r:' it is an Rspamd server
# Default: empty
servers = r:localhost:11333;
# also_check - extra Rspamd servers to check
#also_check = r:clam10.example.com;
# diff_dir - path where to write messages that have different results from main and extra checks
#diff_dir = /var/run/rmilter/diffmsg;
# connect_timeout - timeout in miliseconds for connecting to spamd
# Default: 1s
#connect_timeout = 1s;
# results_timeout - timeout in miliseconds for waiting for spamd response
# Default: 20s
#results_timeout = 20s;
# error_time - time in seconds during which we are counting errors
# Default: 10
#error_time = 10;
# dead_time - time in seconds during which we are thinking that server is down
# Default: 300
#dead_time = 300;
# maxerrors - maximum number of errors that can occur during error_time to make Rmilter thinking that
# this upstream is dead
# Default: 10
#maxerrors = 10;
# reject_message - reject message for spam (quoted string)
# Default: "Spam message rejected; If this is not spam contact abuse team"
#reject_message = "Spam message rejected; If this is not spam contact abuse at example.com";
# whitelist - list of ips or nets that should be not checked with spamd
# Default: empty
whitelist = 127.0.0.1/32, [::1]/128, 192.168.0.0/16;
# rspamd_metric - metric for using with rspamd
# Default: "default"
#rspamd_metric = "default";
# spamd_soft_fail - if action is not reject use it for other actions (flag)
# Default: true
#spamd_soft_fail = yes;
# spamd_greylist - greylist message only if action is greylist (flag)
# Default: true
#spamd_greylist = yes;
# extended_spam_headers - add extended spamd headers to messages (flag)
# Default: false
#extended_spam_headers = yes;
};
redis {
# servers_grey - redis servers for greylisting in format:
# host[:port][, host[:port]]
servers_grey = localhost;
# servers_white - redis servers for whitelisting in format similar to that is used
# in servers_grey
servers_white = localhost;
# servers_limits - redis servers used for limits storing, can not be mirrored
servers_limits = localhost;
# servers_id - redis servers used for message id storing, can not be mirrored
servers_id = localhost;
# servers_spam - redis servers used to send spam messages
#servers_spam = localhost;
# servers_copy - redis servers used to send copies messages
#servers_copy = localhost;
# copy_probability - number from 0.0 to 1.0 which defines probability of message copying
# E.g. 0.5 sends about half of messages to `servers_copy`
# copy_probability = 0.5;
# id_prefix - prefix for extracting message ids from redis
# Default: empty (no prefix is prepended to key)
id_prefix = "message_id.";
# grey_prefix - prefix for extracting greylisted records from redis
# Default: empty (no prefix is prepended to key)
grey_prefix = "grey.";
# white_prefix - prefix for extracting whitelisted records from redis
# Default: empty (no prefix is prepended to key)
white_prefix = "white.";
# spam_channel - redis pub/sub channel to send spam messages to
# Default: empty
# spam_channel = "spam";
# copy_channel - redis pub/sub channel to send messages copies to
# Default: empty
# copy_channel = "copy";
# connect_timeout - timeout in miliseconds for waiting for redis
# Default: 1s
#connect_timeout = 1s;
# error_time - time in seconds during which we are counting errors
# Default: 10
#error_time = 10;
# dead_time - time in seconds during which we are thinking that server is down
# Default: 300
#dead_time = 300;
# maxerrors - maximum number of errors that can occur during error_time to make us thinking that
# this upstream is dead
# Default: 10
#maxerrors = 10;
};
# rule definition:
# rule {
# accept|discard|reject|tempfail|quarantine "[message]"; <- action definition
# [not] connect <regexp> <regexp>; <- conditions
# helo <regexp>;
# envfrom <regexp>;
# envrcpt <regexp>;
# header <regexp> <regexp>;
# body <regexp>;
# };
# limits section
limits {
# enable: enable or disable rate limits (binary flag)
# Default: true
#enable = yes;
# Whitelisted ip or networks
#limit_whitelist = 194.67.45.4/32;
# Whitelisted recipients
limit_whitelist_rcpt = postmaster, mailer-daemon;
# Addrs for bounce checks
limit_bounce_addrs = postmaster, mailer-daemon, symantec_antivirus_for_smtp_gateways, <>, null, fetchmail-daemon;
# Limit for bounce mail
limit_bounce_to = 5:0.000277778;
# Limit for bounce mail per one source ip
limit_bounce_to_ip = 5:0.000277778;
# Limit for all mail per recipient
limit_to = 20:0.016666667;
# Limit for all mail per one source ip
limit_to_ip = 30:0.025;
# Limit for all mail per one source ip and from address
limit_to_ip_from = 100:0.033333333;
};
greylisting {
# enable - enable or disable greylisting (binary flag)
# Default: true
#enable = yes;
# timeout - time during which we mark message greylisted
# Default: 300s
#timeout = 300s;
# expire - time during which we save a greylisting record
# Default: 1d
expire = 3d;
# whitelist - list of ip addresses or networks that should be whitelisted from greylisting
# Default: empty
whitelist = 127.0.0.1/32, [::1]/128, 192.168.0.0/16;
};
dkim {
# Sample for dkim specific keys
# domain {
# key = /etc/dkim/dkim_example.key;
# domain = "example.com";
# selector = "dkim";
# };
# domain {
# key = /etc/dkim/dkim_test.key;
# domain = "test.com";
# selector = "dkim";
# };
# Universal selector, keys will be checked for pattern /etc/dkim/<domain>.<selector>.key
domain {
key = /usr/local/etc/dkim;
domain = "*";
selector = "dkim";
};
header_canon = relaxed;
body_canon = relaxed;
sign_alg = sha256;
};
# include user's configuration, replace this with full path
.try_include /usr/local/etc/rmilter.conf.local
.try_include /usr/local/etc/rmilter.conf.d/*.conf