aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/lua/dcc.lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-04-22 23:17:13 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-04-22 23:17:13 +0100
commita1dc1fd0591d0880c1537c4032d404cc748537f6 (patch)
tree497e69592a60d07aaf1c8d6474ad61701261b373 /src/plugins/lua/dcc.lua
parentd34b7a2f737214e517f1c7945d009bc8282a9d70 (diff)
downloadrspamd-a1dc1fd0591d0880c1537c4032d404cc748537f6.tar.gz
rspamd-a1dc1fd0591d0880c1537c4032d404cc748537f6.zip
[Fix] Detect confighelp in plugins initialisation
Diffstat (limited to 'src/plugins/lua/dcc.lua')
-rw-r--r--src/plugins/lua/dcc.lua25
1 files changed, 14 insertions, 11 deletions
diff --git a/src/plugins/lua/dcc.lua b/src/plugins/lua/dcc.lua
index cf44c3224..7995699b2 100644
--- a/src/plugins/lua/dcc.lua
+++ b/src/plugins/lua/dcc.lua
@@ -24,6 +24,19 @@ local logger = require "rspamd_logger"
local tcp = require "rspamd_tcp"
local fun = require "fun"
+if confighelp then
+ rspamd_config:add_example(nil, 'dcc',
+ "Check messages for 'bulkiness' using DCC",
+ [[
+dcc {
+ host = "/var/dcc/dccifd"; # Unix socket or hostname
+ port = 1234 # Port to use (needed for TCP socket)
+ timeout = 2s; # Timeout to wait for checks
+}
+]])
+ return
+end
+
local function check_dcc (task)
-- Connection
local client = '0.0.0.0'
@@ -127,14 +140,4 @@ if opts and opts['host'] then
})
else
logger.infox('DCC module not configured');
-end
-
-rspamd_config:add_example(nil, 'dcc',
- "Check messages for 'bulkiness' using DCC",
-[[
-dcc {
- host = "/var/dcc/dccifd"; # Unix socket or hostname
- port = 1234 # Port to use (needed for TCP socket)
- timeout = 2s; # Timeout to wait for checks
-}
-]]) \ No newline at end of file
+end \ No newline at end of file