From 9a5bc94e55cbfffd3db5e31fb492d751bfbedf0c Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 6 Jun 2017 16:07:59 +0100 Subject: [PATCH] [Conf] Add rspamd_proxy to the default configuration set --- conf/rspamd.systemd.conf | 11 +++++++++-- conf/rspamd.sysvinit.conf | 7 +++++++ conf/worker-proxy.inc | 13 +++++++++++++ 3 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 conf/worker-proxy.inc diff --git a/conf/rspamd.systemd.conf b/conf/rspamd.systemd.conf index 92e56180e..dd9bbcb7c 100644 --- a/conf/rspamd.systemd.conf +++ b/conf/rspamd.systemd.conf @@ -31,16 +31,23 @@ logging { .include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/logging.inc" } -worker { +worker "normal" { bind_socket = "*:11333"; .include "$CONFDIR/worker-normal.inc" .include(try=true; priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/worker-normal.inc" .include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/worker-normal.inc" } -worker { +worker "controller" { bind_socket = "localhost:11334"; .include "$CONFDIR/worker-controller.inc" .include(try=true; priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/worker-controller.inc" .include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/worker-controller.inc" } + +worker "rspamd_proxy" { + bind_socket = "*:11332"; + .include "$CONFDIR/worker-proxy.inc" + .include(try=true; priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/worker-proxy.inc" + .include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/worker-proxy.inc" +} \ No newline at end of file diff --git a/conf/rspamd.sysvinit.conf b/conf/rspamd.sysvinit.conf index 41fb0fbed..c8d308658 100644 --- a/conf/rspamd.sysvinit.conf +++ b/conf/rspamd.sysvinit.conf @@ -46,6 +46,13 @@ worker { .include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/worker-controller.inc" } +worker "rspamd_proxy" { + bind_socket = "*:11332"; + .include "$CONFDIR/worker-proxy.inc" + .include(try=true; priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/worker-proxy.inc" + .include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/worker-proxy.inc" +} + # Local fuzzy storage is disabled by default #worker { diff --git a/conf/worker-proxy.inc b/conf/worker-proxy.inc new file mode 100644 index 000000000..1047fd87f --- /dev/null +++ b/conf/worker-proxy.inc @@ -0,0 +1,13 @@ +# Included from top-level .conf file + +type = "proxy"; + +milter = yes; # Enable milter mode +timeout = 120s; # Needed for Milter usually + +upstream "local" { + default = yes; + hosts = "localhost"; +} + +count = 1; # Do not spawn too many processes of this type -- 2.39.5