continue;
}
- msg_info_config ("init lua module %s", module->name);
+ if (!force_load) {
+ msg_info_config ("init lua module %s", module->name);
+ }
lua_pop (L, 1); /* Error function */
}
local N = "antivirus"
+if confighelp then
+ rspamd_config:add_example(nil, 'antivirus',
+ "Check messages for viruses",
+ [[
+antivirus {
+ # multiple scanners could be checked, for each we create a configuration block with an arbitrary name
+ clamav {
+ # If set force this action if any virus is found (default unset: no action is forced)
+ # action = "reject";
+ # if `true` only messages with non-image attachments will be checked (default true)
+ attachments_only = true;
+ # If `max_size` is set, messages > n bytes in size are not scanned
+ max_size = 20000000;
+ # symbol to add (add it to metric if you want non-zero weight)
+ symbol = "CLAM_VIRUS";
+ # type of scanner: "clamav", "fprot", "sophos" or "savapi"
+ type = "clamav";
+ # For "savapi" you must also specify the following variable
+ product_id = 12345;
+ # You can enable logging for clean messages
+ log_clean = true;
+ # servers to query (if port is unspecified, scanner-specific default is used)
+ # can be specified multiple times to pool servers
+ # can be set to a path to a unix socket
+ # Enable this in local.d/antivirus.conf
+ servers = "127.0.0.1:3310";
+ # if `patterns` is specified virus name will be matched against provided regexes and the related
+ # symbol will be yielded if a match is found. If no match is found, default symbol is yielded.
+ patterns {
+ # symbol_name = "pattern";
+ JUST_EICAR = "^Eicar-Test-Signature$";
+ }
+ # `whitelist` points to a map of IP addresses. Mail from these addresses is not scanned.
+ whitelist = "/etc/rspamd/antivirus.wl";
+ }
+}
+]])
+ return
+end
+
local function match_patterns(default_sym, found, patterns)
if not patterns then return default_sym end
for sym, pat in pairs(patterns) do
local rspamd_logger = require "rspamd_logger"
local rspamd_regexp = require "rspamd_regexp"
+if confighelp then
+ return
+end
+
local options = {
provider_type = 'rspamd',
provider_info = {
local rspamd_logger = require 'rspamd_logger'
local rspamd_http = require "rspamd_http"
+if confighelp then
+ return
+end
+
local E = {}
local rows = {}
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'
})
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
local rspamd_logger = require "rspamd_logger"
local rspamd_util = require "rspamd_util"
+if confighelp then
+ return
+end
+
local settings = {
allow_envfrom_empty = true,
allow_hdrfrom_mismatch = false,
local check_local = false
local check_authed = false
+if confighelp then
+ return
+end
+
local symbols = {
spf_allow_symbol = 'R_SPF_ALLOW',
spf_deny_symbol = 'R_SPF_FAIL',
local ucl = require "ucl"
local fun = require "fun"
+if confighelp then
+ return
+end
+
local settings = {
redis_key = "dynamic_conf",
redis_watch_interval = 10.0,
-- Emails is module for different checks for emails inside messages
+if confighelp then
+ return
+end
+
-- Rules format:
-- symbol = sym, map = file:///path/to/file, domain_only = yes
-- symbol = sym2, dnsbl = bl.somehost.com, domain_only = no
limitations under the License.
]]--
+if confighelp then
+ return
+end
+
-- This plugin is a concept of FANN scores adjustment
-- NOT FOR PRODUCTION USE so far
local rspamd_logger = require "rspamd_logger"
-- This plugin is a concept of FANN scores adjustment
-- NOT FOR PRODUCTION USE so far
+if confighelp then
+ return
+end
+
local rspamd_logger = require "rspamd_logger"
local rspamd_fann = require "rspamd_fann"
local rspamd_util = require "rspamd_util"
-- This plugin is a concept of FANN scores adjustment
-- NOT FOR PRODUCTION USE so far
+if confighelp then
+ return
+end
+
local rspamd_logger = require "rspamd_logger"
local rspamd_fann = require "rspamd_fann"
local rspamd_util = require "rspamd_util"
-- A plugin that forces actions
+if confighelp then
+ return
+end
+
local E = {}
local N = 'force_actions'
-- Plugin for comparing smtp dialog recipients and sender with recipients and sender
-- in mime headers
+if confighelp then
+ return
+end
+
local symbol_rcpt = 'FORGED_RECIPIENTS'
local symbol_sender = 'FORGED_SENDER'
limitations under the License.
]] --
+if confighelp then
+ return
+end
+
local rspamd_logger = require "rspamd_logger"
local rspamd_util = require "rspamd_util"
local rspamd_http = require "rspamd_http"
}
--]]
+if confighelp then
+ return
+end
+
-- A plugin that implements greylisting using redis
local redis_params
-- Weight for checks_hellohost and checks_hello: 5 - very hard, 4 - hard, 3 - meduim, 2 - low, 1 - very low.
-- From HFILTER_HELO_* and HFILTER_HOSTNAME_* symbols the maximum weight is selected in case of their actuating.
+if confighelp then
+ return
+end
+
local rspamd_logger = require "rspamd_logger"
local rspamd_regexp = require "rspamd_regexp"
local rspamc_local_helo = "rspamc.local"
limitations under the License.
]]--
+if confighelp then
+ return
+end
+
local redis_params
local settings = {
limitations under the License.
]]--
+if confighelp then
+ return
+end
+
-- IP score is a module that set ip score of specific ip, asn, country
local rspamd_logger = require "rspamd_logger"
local rspamd_regexp = require "rspamd_regexp"
limitations under the License.
]]--
+if confighelp then
+ return
+end
+
-- Module for checking mail list headers
local symbol = 'MAILLIST'
limitations under the License.
]]--
+if confighelp then
+ return
+end
+
-- A plugin that pushes metadata (or whole messages) to external services
local redis_params
limitations under the License.
]] --
+if confighelp then
+ return
+end
+
local N = 'metric_exporter'
local logger = require "rspamd_logger"
local mempool = require "rspamd_mempool"
from listed valid DKIM domains with missed or known proprietary Message-IDs
]]--
+if confighelp then
+ return
+end
+
local rspamd_logger = require "rspamd_logger"
local rspamd_regexp = require "rspamd_regexp"
limitations under the License.
]]--
+if confighelp then
+ return
+end
+
-- This plugin implements mime types checks for mail messages
local logger = require "rspamd_logger"
local settings = {
limitations under the License.
]]--
+if confighelp then
+ return
+end
+
-- Multimap is rspamd module designed to define and operate with different maps
local rules = {}
limitations under the License.
]]--
+if confighelp then
+ return
+end
+
-- MX check plugin
local rspamd_logger = require "rspamd_logger"
local rspamd_tcp = require "rspamd_tcp"
limitations under the License.
]]--
+if confighelp then
+ return
+end
+
-- 0 or 1 received: = spam
local symbol = 'ONCE_RECEIVED'
limitations under the License.
]]--
+if confighelp then
+ return
+end
+
-- Phishing detection interface for selecting phished urls and inserting corresponding symbol
--
--
limitations under the License.
]]--
+if confighelp then
+ return
+end
+
-- A plugin that implements ratelimits using redis or kvstorage server
local E = {}
limitations under the License.
]]--
+if confighelp then
+ return
+end
+
-- This plugin implements various types of RBL checks
-- Documentation can be found here:
-- https://rspamd.com/doc/modules/rbl.html
limitations under the License.
]]--
+if confighelp then
+ return
+end
+
-- A plugin that implements replies check using redis
-- Default port for redis upstreams
limitations under the License.
]]--
+if confighelp then
+ return
+end
+
-- A plugin that provides common header manipulations
local logger = require "rspamd_logger"
limitations under the License.
]]--
+if confighelp then
+ return
+end
+
-- This plugin implements dynamic updates for rspamd
local ucl = require "ucl"
limitations under the License.
]]--
+if confighelp then
+ return
+end
+
-- This plugin implements user dynamic settings
-- Settings documentation can be found here:
-- https://rspamd.com/doc/configuration/settings.html
limitations under the License.
]]--
+if confighelp then
+ return
+end
+
-- This plugin is intended to read and parse spamassassin rules with regexp
-- rules. SA plugins or statistics are not supported
limitations under the License.
]]--
+if confighelp then
+ return
+end
+
-- Trie is rspamd module designed to define and operate with suffix trie
local N = 'trie'
limitations under the License.
]]--
+if confighelp then
+ return
+end
+
local redis_params
local N = 'url_redirector'
local settings = {
limitations under the License.
]]--
+if confighelp then
+ return
+end
+
-- A plugin that restores/persists URL tags & calculates reputation
local E = {}
limitations under the License.
]]--
+if confighelp then
+ return
+end
+
-- A plugin that restores/persists URL tags
local N = 'url_tags'
limitations under the License.
]]--
+if confighelp then
+ return
+end
+
local rspamd_logger = require "rspamd_logger"
local rspamd_util = require "rspamd_util"
local fun = require "fun"