Browse Source

Reorganize configuration files for systemd

Common systemd/non-systemd options were moved to .inc
files. rspamd.conf is systemd-enabled one,
rspamd.sysvinit.conf is sysvinit-compatible one.
tags/0.9.0
Mikhail Gusarov 9 years ago
parent
commit
cd1028e0bd

+ 17
- 0
conf/common.conf View File

@@ -0,0 +1,17 @@
# A common rspamd configuration file

lua = "$CONFDIR/lua/rspamd.lua"

.include "$CONFDIR/metrics.conf"
.include "$CONFDIR/composites.conf"

.include "$CONFDIR/statistic.conf"

.include "$CONFDIR/modules.conf"

# User local settings
.try_include "$CONFDIR/rspamd.conf.local"

modules {
path = "$PLUGINSDIR/lua/"
}

+ 0
- 7
conf/logging.conf View File

@@ -1,7 +0,0 @@
# Logging setup

logging {
level = "info";
type = "file";
filename = "$LOGDIR/rspamd.log";
}

+ 3
- 0
conf/logging.inc View File

@@ -0,0 +1,3 @@
# Included from top-level .conf file

level = "info";

+ 0
- 18
conf/options.conf View File

@@ -1,18 +0,0 @@
# Basic options

options {
pidfile = "$RUNDIR/rspamd.pid";
filters = "chartable,dkim,spf,surbl,regexp,fuzzy_check";
raw_mode = false;
one_shot = false;
cache_file = "$DBDIR/symbols.cache";
map_watch_interval = 1min;
dynamic_conf = "$DBDIR/rspamd_dynamic";
history_file = "$DBDIR/rspamd.history";
check_all_filters = false;
dns {
timeout = 1s;
sockets = 16;
retransmits = 5;
}
}

+ 15
- 0
conf/options.inc View File

@@ -0,0 +1,15 @@
# Included from top-level .conf file

filters = "chartable,dkim,spf,surbl,regexp,fuzzy_check";
raw_mode = false;
one_shot = false;
cache_file = "$DBDIR/symbols.cache";
map_watch_interval = 1min;
dynamic_conf = "$DBDIR/rspamd_dynamic";
history_file = "$DBDIR/rspamd.history";
check_all_filters = false;
dns {
timeout = 1s;
sockets = 16;
retransmits = 5;
}

+ 15
- 15
conf/rspamd.conf View File

@@ -1,20 +1,20 @@
# A common rspamd configuration file
.include "$CONFDIR/common.conf"

lua = "$CONFDIR/lua/rspamd.lua"

.include "$CONFDIR/options.conf"
.include "$CONFDIR/logging.conf"
.include "$CONFDIR/metrics.conf"
.include "$CONFDIR/workers.conf"
.include "$CONFDIR/composites.conf"

.include "$CONFDIR/statistic.conf"
options {
.include "$CONFDIR/options.inc"
}

.include "$CONFDIR/modules.conf"
logging {
type = "console";
.include "$CONFDIR/logging.inc"
}

# User local settings
.try_include "$CONFDIR/rspamd.conf.local"
worker {
bind_socket = "systemd:0";
.include "$CONFDIR/worker-normal.inc"
}

modules {
path = "$PLUGINSDIR/lua/"
worker {
bind_socket = "systemd:1";
.include "$CONFDIR/worker-controller.inc"
}

+ 22
- 0
conf/rspamd.sysvinit.conf View File

@@ -0,0 +1,22 @@
.include "$CONFDIR/common.conf"

options {
pidfile = "$RUNDIR/rspamd.pid";
.include "$CONFDIR/options.inc"
}

logging {
type = "file";
filename = "$LOGDIR/rspamd.log";
.include "$CONFDIR/logging.inc"
}

worker {
bind_socket = "*:11333";
.include "$CONFDIR/worker-normal.inc"
}

worker {
bind_socket = "localhost:11334";
.include "$CONFDIR/worker-controller.inc"
}

+ 7
- 0
conf/worker-controller.inc View File

@@ -0,0 +1,7 @@
# Included from top-level .conf file

type = "controller";
count = 1;
password = "q1";
secure_ip = "127.0.0.1";
static_dir = "${WWWDIR}";

+ 4
- 0
conf/worker-normal.inc View File

@@ -0,0 +1,4 @@
# Included from top-level .conf file

type = "normal";
mime = "true";

+ 0
- 15
conf/workers.conf View File

@@ -1,15 +0,0 @@
# Common workers configuration

worker {
type = "normal";
bind_socket = "*:11333";
mime = true;
}
worker {
type = "controller";
count = 1;
bind_socket = "localhost:11334";
password = "q1";
secure_ip = "127.0.0.1";
static_dir = "${WWWDIR}";
}

+ 0
- 4
debian/logging.conf View File

@@ -1,4 +0,0 @@
logging {
type = "console";
level = "info";
}

+ 0
- 13
debian/workers.conf View File

@@ -1,13 +0,0 @@
worker {
type = "normal";
bind_socket = "systemd:0";
mime = true;
}
worker {
type = "controller";
bind_socket = "systemd:1";
count = 1;
password = "q1";
secure_ip = "127.0.0.1";
static_dir = "${WWWDIR}";
}

Loading…
Cancel
Save