diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-02-07 17:32:09 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-02-07 17:32:09 +0000 |
commit | 52466776c6d731372f0fd6b3bf73564071c42414 (patch) | |
tree | 213e5800ce488acb59d91c8235ac91f3611e59a7 | |
parent | 5affd62368a66e2a20c93eb5caf6934791deb4b8 (diff) | |
parent | a0fcf6237c9bd4abb9fcde2bc6f96d78eeb4806f (diff) | |
download | rspamd-52466776c6d731372f0fd6b3bf73564071c42414.tar.gz rspamd-52466776c6d731372f0fd6b3bf73564071c42414.zip |
Merge pull request #45 from fatalbanana/master
Remove dated configuration example & add missing option registration
-rw-r--r-- | conf/modules.conf | 5 | ||||
-rw-r--r-- | doc/markdown/modules/rbl.md | 11 | ||||
-rw-r--r-- | src/plugins/lua/rbl.lua | 24 |
3 files changed, 8 insertions, 32 deletions
diff --git a/conf/modules.conf b/conf/modules.conf index 41296b7bf..712671b30 100644 --- a/conf/modules.conf +++ b/conf/modules.conf @@ -67,17 +67,13 @@ surbl { } } rbl { - default_received = false; - default_from = true; rbls { spamhaus { symbol = "RBL_SPAMHAUS"; rbl = "zen.spamhaus.org"; - ipv4 = true; ipv6 = true; - unknown = false; returncodes { RBL_SPAMHAUS_SBL = "127.0.0.2"; RBL_SPAMHAUS_CSS = "127.0.0.3"; @@ -93,7 +89,6 @@ rbl { spamhaus_xbl { symbol = "RECEIVED_SPAMHAUS_XBL"; rbl = "xbl.spamhaus.org"; - ipv4 = true; ipv6 = true; received = true; from = false; diff --git a/doc/markdown/modules/rbl.md b/doc/markdown/modules/rbl.md index ccbff68df..faa1b40e8 100644 --- a/doc/markdown/modules/rbl.md +++ b/doc/markdown/modules/rbl.md @@ -6,11 +6,14 @@ Configuration is structured as follows: ~~~nginx rbl { - # default settings - an_rbl { - # rbl-specific subsection + # default settings defined here + rbls { + # 'rbls' subsection under which the RBL definitions are nested + an_rbl { + # rbl-specific subsection + } + # ... } - # ... } ~~~ diff --git a/src/plugins/lua/rbl.lua b/src/plugins/lua/rbl.lua index b40278f55..bf043e19e 100644 --- a/src/plugins/lua/rbl.lua +++ b/src/plugins/lua/rbl.lua @@ -1,26 +1,3 @@ --- Configuration: --- rbl { --- default_ipv4 = true; --- default_ipv6 = false; --- default_received = true; --- default_from = false; --- rbls { --- spamhaus { --- rbl = "zen.spamhaus.org"; --- ipv4 = true; --- ipv6 = false; --- unknown = false; --- returncodes { --- RBL_ZEN_SBL = "127.0.0.2"; --- RBL_ZEN_SBL = "127.0.0.3"; --- RBL_ZEN_XBL = "127.0.0.4"; --- RBL_ZEN_PBL = "127.0.0.10"; --- RBL_ZEN_PBL = "127.0.0.11"; --- } --- } --- } --- } - local rbls = {} local function ip_to_rbl(ip, rbl) @@ -127,6 +104,7 @@ if type(rspamd_config.get_api_version) ~= 'nil' then rspamd_config:register_module_option('rbl', 'default_from', 'string') rspamd_config:register_module_option('rbl', 'default_rdns', 'string') rspamd_config:register_module_option('rbl', 'default_helo', 'string') + rspamd_config:register_module_option('rbl', 'default_unknown', 'string') end end |