From ef5cf8130878e1706cdab93611c0f15bc7ac16bd Mon Sep 17 00:00:00 2001 From: sriccio Date: Wed, 17 Apr 2019 10:36:39 +0200 Subject: [PATCH] [rspamd] Allow to easily use custom rspamd lua plugins Since rspamd 1.9.2 we'll be able to load custom modules from plugins.d directory. This allow to add and configure plugins easily from the data/conf/rspamd/plugins.d Also loading config for custom plugins need rspamd.conf.local or optionally rspamd.conf.override. I added support for this in the docker-compose.yml Idea came while i was writing a custom plugin for Cyren antispam gateway, which can be found here: https://github.com/sriccio/rspamd-plugins --- data/conf/rspamd/plugins.d/README.md | 1 + data/conf/rspamd/rspamd.conf.local | 1 + data/conf/rspamd/rspamd.conf.override | 2 ++ docker-compose.yml | 3 +++ 4 files changed, 7 insertions(+) create mode 100644 data/conf/rspamd/plugins.d/README.md create mode 100644 data/conf/rspamd/rspamd.conf.local create mode 100644 data/conf/rspamd/rspamd.conf.override diff --git a/data/conf/rspamd/plugins.d/README.md b/data/conf/rspamd/plugins.d/README.md new file mode 100644 index 00000000..1516cf2d --- /dev/null +++ b/data/conf/rspamd/plugins.d/README.md @@ -0,0 +1 @@ +This is where you should copy any rspamd custom module diff --git a/data/conf/rspamd/rspamd.conf.local b/data/conf/rspamd/rspamd.conf.local new file mode 100644 index 00000000..9f2f8f1d --- /dev/null +++ b/data/conf/rspamd/rspamd.conf.local @@ -0,0 +1 @@ +# rspamd.conf.local diff --git a/data/conf/rspamd/rspamd.conf.override b/data/conf/rspamd/rspamd.conf.override new file mode 100644 index 00000000..d033e8e2 --- /dev/null +++ b/data/conf/rspamd/rspamd.conf.override @@ -0,0 +1,2 @@ +# rspamd.conf.override + diff --git a/docker-compose.yml b/docker-compose.yml index cbef6a40..c9443b88 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -82,7 +82,10 @@ services: - ./data/conf/rspamd/custom/:/etc/rspamd/custom - ./data/conf/rspamd/override.d/:/etc/rspamd/override.d - ./data/conf/rspamd/local.d/:/etc/rspamd/local.d + - ./data/conf/rspamd/plugins.d/:/etc/rspamd/plugins.d - ./data/conf/rspamd/lua/:/etc/rspamd/lua/:ro + - ./data/conf/rspamd/rspamd.conf.local:/etc/rspamd/rspamd.conf.local + - ./data/conf/rspamd/rspamd.conf.override:/etc/rspamd/rspamd.conf.override - rspamd-vol-1:/var/lib/rspamd restart: always dns: