aboutsummaryrefslogtreecommitdiffstats
path: root/rspamd.conf.sample
blob: 7dbd744e316c8c541fc2accbb1af280d847ef397 (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
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
# Sample config file for rspamd
# $Id$
#


# pidfile - path to pid file
# Default: pidfile = /var/run/rspamd.pid
pidfile = "./rspamd.pid";

# Number of workers to process connections
# Default: 1
workers = 1;

# Socket for accepting mail to filter, can be unix socket if begin with '/'
# (bind_socket=/var/run/rspamd.sock for example)
bind_socket = localhost:11333;

# Settings for controller interface
control {
	# Bind socket for control interface
	bind_socket = localhost:11334;
	# Password for privilleged commands
	password = "q1";
};

# Sample metric definition
metric {
	# Name of metric
	name = "testmetric";
	# Score to count message as spam by this metric
	required_score = 10.1;
};

# Logging settings
logging {
	# Log type can be: console, syslog and file
	log_type = console;
	# Log level can be: DEBUG, INFO, WARN and ERROR
	log_level = DEBUG;
	# Log facility specifies facility for syslog logging, see syslog (3) for details
	# log_facility = "LOG_MAIL";
	
	# Log file is used with log type "file"
	# log_file = "/var/log/rspamd.log"
};

# Limit for statfile pool size
# Default: 100M
statfile_pool_size = 40M;


# Sample statfile definition
statfile {
	# Alias is used for learning and is used as symbol
	alias = "test.spam";
	# Pattern is path to file, can include %r - recipient name and %f - mail from value
	pattern = "./test.spam";
	# Weight in spam/ham classifier
	weight = 1.0;
	# Size of this statfile class
	size = 10M;
	# Tokenizer for this statfile
	# Deafault: osb-text
	tokenizer = "osb-text";
};
statfile {
	alias = "test.ham";
	pattern = "./test.ham";
	weight = -2.0;
	size = 10M;
};

# Factors coefficients
factors {
	"SURBL_MULTI" = 10.5;
	"winnow" = 5.5;
};

# Options for lmtp worker
lmtp {
	enabled = yes;
	# Bind socket for lmtp interface
	bind_socket = localhost:11335;
	# Metric that is considered as main. If we have spam result on
	# this metric, lmtp delivery would be failed
	metric = "default";
	# Number of lmtp workers
	workers = 1;
};

delivery {
	enabled = yes;
	# Path to delivery agent, %f is expanded as mail from address and %r 
	# is expanded as recipient address
	# Expample: agent = "/usr/local/bin/procmail -f %f -d %r"
	agent = "/dev/null";
	# Bind socket for lmtp interface
	# Example: bind_socket = localhost:25
	
	# Whether we should use lmtp for MTA delivery
	lmtp = no;
};

# SURBL module params, note that single quotes are mandatory here
.module 'surbl' {
	# Address to redirector in host:port format
	redirector = "localhost:8080";
	# Connect timeout for redirector
	redirector_connect_timeout = "1s";
	# IO timeout for redirector (may be usefull to set this value rather big)
	redirector_read_timeout = "10s";
	# This is suffix for surbl dns requests,
	# %b is replaced with bit metric if it is found
	suffix_%b_SURBL_MULTI = "multi.surbl.org";

	# Bits that are used to determine specific URI black list
	# details are at http://www.surbl.org/lists.html#multi
	# sytax is: bit_{number} = "SYMBOL"
	bit_2 = "SC"; # sc.surbl.org
	bit_4 = "WS"; # ws.surbl.org
	bit_8 = "PH"; # ph.surbl.org
	bit_16 = "OB"; # ob.surbl.org
	bit_32 = "AB"; # ab.surbl.org
	bit_64 = "JP"; # jp.surbl.org

	# Metric for surbl module
	metric = "default";
	# List of public known hostings (for which we should use 3 components of domain name instead of 2)
	hostings = "narod.ru,pp.ru,org.ru,net.ru";
	# Whitelisted urls
	whitelist = "highsecure.ru,freebsd.org";
};


$to_blah = "To=/\"blah@blah\"/H";
$from_blah = "From=/blah@blah/H";
$subject_blah = "Subject=/blah/H";

.module 'regexp' {
	BLAH_SYMBOL = "${to_blah} & !(${from_blah} | ${subject_blah})";
};

url_filters = "surbl";
header_filters = "regexp";