aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-01-04 18:44:18 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-01-04 18:44:18 +0000
commit8d5360b2f8dbff3a314f686c71c5973911726f06 (patch)
tree6f60b32cf5a487e768f4c1f8fa0a79041e1f3f2e /src/plugins
parent67a21e3c3c5ab482d45e3532d4ceae4b132f9ff7 (diff)
downloadrspamd-8d5360b2f8dbff3a314f686c71c5973911726f06.tar.gz
rspamd-8d5360b2f8dbff3a314f686c71c5973911726f06.zip
Add 'required' and 'default' values for doc strings
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/dkim_check.c120
-rw-r--r--src/plugins/fuzzy_check.c58
-rw-r--r--src/plugins/regexp.c12
-rw-r--r--src/plugins/spf.c64
-rw-r--r--src/plugins/surbl.c150
5 files changed, 333 insertions, 71 deletions
diff --git a/src/plugins/dkim_check.c b/src/plugins/dkim_check.c
index 8a3546a10..0e09bacd6 100644
--- a/src/plugins/dkim_check.c
+++ b/src/plugins/dkim_check.c
@@ -112,42 +112,114 @@ dkim_module_init (struct rspamd_config *cfg, struct module_ctx **ctx)
*ctx = (struct module_ctx *)dkim_module_ctx;
- rspamd_rcl_add_doc_by_path (cfg, NULL,
+ rspamd_rcl_add_doc_by_path (cfg,
+ NULL,
"DKIM check plugin",
- "dkim", UCL_OBJECT, NULL, 0);
- rspamd_rcl_add_doc_by_path (cfg, "dkim",
+ "dkim",
+ UCL_OBJECT,
+ NULL,
+ 0,
+ NULL,
+ 0);
+ rspamd_rcl_add_doc_by_path (cfg,
+ "dkim",
"Map of IP addresses that should be excluded from DKIM checks",
- "whitelist", UCL_STRING, NULL, 0);
- rspamd_rcl_add_doc_by_path (cfg, "dkim",
+ "whitelist",
+ UCL_STRING,
+ NULL,
+ 0,
+ NULL,
+ 0);
+ rspamd_rcl_add_doc_by_path (cfg,
+ "dkim",
"Symbol that is added if DKIM check is successful",
- "symbol_allow", UCL_STRING, NULL, 0);
- rspamd_rcl_add_doc_by_path (cfg, "dkim",
+ "symbol_allow",
+ UCL_STRING,
+ NULL,
+ 0,
+ NULL,
+ 0);
+ rspamd_rcl_add_doc_by_path (cfg,
+ "dkim",
"Symbol that is added if DKIM check is unsuccessful",
- "symbol_reject", UCL_STRING, NULL, 0);
- rspamd_rcl_add_doc_by_path (cfg, "dkim",
+ "symbol_reject",
+ UCL_STRING,
+ NULL,
+ 0,
+ NULL,
+ 0);
+ rspamd_rcl_add_doc_by_path (cfg,
+ "dkim",
"Symbol that is added if DKIM check can't be completed (e.g. DNS failure)",
- "symbol_tempfail", UCL_STRING, NULL, 0);
- rspamd_rcl_add_doc_by_path (cfg, "dkim",
+ "symbol_tempfail",
+ UCL_STRING,
+ NULL,
+ 0,
+ NULL,
+ 0);
+ rspamd_rcl_add_doc_by_path (cfg,
+ "dkim",
"Size of DKIM keys cache",
- "dkim_cache_size", UCL_INT, NULL, 0);
- rspamd_rcl_add_doc_by_path (cfg, "dkim",
+ "dkim_cache_size",
+ UCL_INT,
+ NULL,
+ 0,
+ NULL,
+ 0);
+ rspamd_rcl_add_doc_by_path (cfg,
+ "dkim",
"Allow this time difference when checking DKIM signature time validity",
- "time_jitter", UCL_TIME, NULL, 0);
- rspamd_rcl_add_doc_by_path (cfg, "dkim",
+ "time_jitter",
+ UCL_TIME,
+ NULL,
+ 0,
+ NULL,
+ 0);
+ rspamd_rcl_add_doc_by_path (cfg,
+ "dkim",
"Domains to check DKIM for (check all domains if this option is empty)",
- "domains", UCL_STRING, NULL, 0);
- rspamd_rcl_add_doc_by_path (cfg, "dkim",
+ "domains",
+ UCL_STRING,
+ NULL,
+ 0,
+ NULL,
+ 0);
+ rspamd_rcl_add_doc_by_path (cfg,
+ "dkim",
"Map of domains that are treated as 'trusted' meaning that DKIM policy failure has more significant score",
- "trusted_domains", UCL_STRING, NULL, 0);
- rspamd_rcl_add_doc_by_path (cfg, "dkim",
+ "trusted_domains",
+ UCL_STRING,
+ NULL,
+ 0,
+ NULL,
+ 0);
+ rspamd_rcl_add_doc_by_path (cfg,
+ "dkim",
"Multiply dkim score by this factor for trusted domains",
- "strict_multiplier", UCL_FLOAT, NULL, 0);
- rspamd_rcl_add_doc_by_path (cfg, "dkim",
+ "strict_multiplier",
+ UCL_FLOAT,
+ NULL,
+ 0,
+ NULL,
+ 0);
+ rspamd_rcl_add_doc_by_path (cfg,
+ "dkim",
"Check DKIM policies merely for `trusted_domains`",
- "trusted_only", UCL_BOOLEAN, NULL, 0);
- rspamd_rcl_add_doc_by_path (cfg, "dkim",
+ "trusted_only",
+ UCL_BOOLEAN,
+ NULL,
+ 0,
+ NULL,
+ 0);
+ rspamd_rcl_add_doc_by_path (cfg,
+ "dkim",
"Do not check messages with multiple DKIM signatures",
- "skip_multi", UCL_BOOLEAN, NULL, 0);
+ "skip_multi",
+ UCL_BOOLEAN,
+ NULL,
+ 0,
+ NULL,
+ 0);
return 0;
}
diff --git a/src/plugins/fuzzy_check.c b/src/plugins/fuzzy_check.c
index eb1e97786..ea94021ed 100644
--- a/src/plugins/fuzzy_check.c
+++ b/src/plugins/fuzzy_check.c
@@ -525,9 +525,15 @@ fuzzy_check_module_init (struct rspamd_config *cfg, struct module_ctx **ctx)
*ctx = (struct module_ctx *)fuzzy_module_ctx;
- rspamd_rcl_add_doc_by_path (cfg, NULL,
+ rspamd_rcl_add_doc_by_path (cfg,
+ NULL,
"Fuzzy check plugin",
- "fuzzy_check", UCL_OBJECT, NULL, 0);
+ "fuzzy_check",
+ UCL_OBJECT,
+ NULL,
+ 0,
+ NULL,
+ 0);
rspamd_rcl_add_doc_by_path (cfg,
"fuzzy_check",
@@ -535,6 +541,8 @@ fuzzy_check_module_init (struct rspamd_config *cfg, struct module_ctx **ctx)
"symbol",
UCL_STRING,
NULL,
+ 0,
+ NULL,
0);
rspamd_rcl_add_doc_by_path (cfg,
"fuzzy_check",
@@ -542,6 +550,8 @@ fuzzy_check_module_init (struct rspamd_config *cfg, struct module_ctx **ctx)
"min_length",
UCL_INT,
NULL,
+ 0,
+ NULL,
0);
rspamd_rcl_add_doc_by_path (cfg,
"fuzzy_check",
@@ -549,6 +559,8 @@ fuzzy_check_module_init (struct rspamd_config *cfg, struct module_ctx **ctx)
"min_bytes",
UCL_INT,
NULL,
+ 0,
+ NULL,
0);
rspamd_rcl_add_doc_by_path (cfg,
"fuzzy_check",
@@ -556,6 +568,8 @@ fuzzy_check_module_init (struct rspamd_config *cfg, struct module_ctx **ctx)
"min_height",
UCL_INT,
NULL,
+ 0,
+ NULL,
0);
rspamd_rcl_add_doc_by_path (cfg,
"fuzzy_check",
@@ -563,6 +577,8 @@ fuzzy_check_module_init (struct rspamd_config *cfg, struct module_ctx **ctx)
"min_width",
UCL_INT,
NULL,
+ 0,
+ NULL,
0);
rspamd_rcl_add_doc_by_path (cfg,
"fuzzy_check",
@@ -570,6 +586,8 @@ fuzzy_check_module_init (struct rspamd_config *cfg, struct module_ctx **ctx)
"timeout",
UCL_TIME,
NULL,
+ 0,
+ NULL,
0);
rspamd_rcl_add_doc_by_path (cfg,
"fuzzy_check",
@@ -577,6 +595,8 @@ fuzzy_check_module_init (struct rspamd_config *cfg, struct module_ctx **ctx)
"retransmits",
UCL_INT,
NULL,
+ 0,
+ NULL,
0);
rspamd_rcl_add_doc_by_path (cfg,
"fuzzy_check",
@@ -584,6 +604,8 @@ fuzzy_check_module_init (struct rspamd_config *cfg, struct module_ctx **ctx)
"whitelist",
UCL_STRING,
NULL,
+ 0,
+ NULL,
0);
/* Rules doc strings */
rspamd_rcl_add_doc_by_path (cfg,
@@ -592,6 +614,8 @@ fuzzy_check_module_init (struct rspamd_config *cfg, struct module_ctx **ctx)
"rule",
UCL_OBJECT,
NULL,
+ 0,
+ NULL,
0);
rspamd_rcl_add_doc_by_path (cfg,
"fuzzy_check.rule",
@@ -599,6 +623,8 @@ fuzzy_check_module_init (struct rspamd_config *cfg, struct module_ctx **ctx)
"headers",
UCL_ARRAY,
NULL,
+ 0,
+ NULL,
0);
rspamd_rcl_add_doc_by_path (cfg,
"fuzzy_check.rule",
@@ -606,6 +632,8 @@ fuzzy_check_module_init (struct rspamd_config *cfg, struct module_ctx **ctx)
"mime_types",
UCL_ARRAY,
NULL,
+ 0,
+ NULL,
0);
rspamd_rcl_add_doc_by_path (cfg,
"fuzzy_check.rule",
@@ -613,6 +641,8 @@ fuzzy_check_module_init (struct rspamd_config *cfg, struct module_ctx **ctx)
"max_score",
UCL_INT,
NULL,
+ 0,
+ NULL,
0);
rspamd_rcl_add_doc_by_path (cfg,
"fuzzy_check.rule",
@@ -620,6 +650,8 @@ fuzzy_check_module_init (struct rspamd_config *cfg, struct module_ctx **ctx)
"servers",
UCL_STRING,
NULL,
+ 0,
+ NULL,
0);
rspamd_rcl_add_doc_by_path (cfg,
"fuzzy_check.rule",
@@ -627,6 +659,8 @@ fuzzy_check_module_init (struct rspamd_config *cfg, struct module_ctx **ctx)
"read_only",
UCL_BOOLEAN,
NULL,
+ 0,
+ NULL,
0);
rspamd_rcl_add_doc_by_path (cfg,
"fuzzy_check.rule",
@@ -634,6 +668,8 @@ fuzzy_check_module_init (struct rspamd_config *cfg, struct module_ctx **ctx)
"skip_unknown",
UCL_BOOLEAN,
NULL,
+ 0,
+ NULL,
0);
rspamd_rcl_add_doc_by_path (cfg,
"fuzzy_check.rule",
@@ -641,6 +677,8 @@ fuzzy_check_module_init (struct rspamd_config *cfg, struct module_ctx **ctx)
"symbol",
UCL_STRING,
NULL,
+ 0,
+ NULL,
0);
rspamd_rcl_add_doc_by_path (cfg,
"fuzzy_check.rule",
@@ -648,6 +686,8 @@ fuzzy_check_module_init (struct rspamd_config *cfg, struct module_ctx **ctx)
"encryption_key",
UCL_STRING,
NULL,
+ 0,
+ NULL,
0);
rspamd_rcl_add_doc_by_path (cfg,
"fuzzy_check.rule",
@@ -655,6 +695,8 @@ fuzzy_check_module_init (struct rspamd_config *cfg, struct module_ctx **ctx)
"fuzzy_key",
UCL_STRING,
NULL,
+ 0,
+ NULL,
0);
rspamd_rcl_add_doc_by_path (cfg,
"fuzzy_check.rule",
@@ -662,14 +704,18 @@ fuzzy_check_module_init (struct rspamd_config *cfg, struct module_ctx **ctx)
"fuzzy_shingles_key",
UCL_STRING,
NULL,
+ 0,
+ NULL,
0);
rspamd_rcl_add_doc_by_path (cfg,
"fuzzy_check.rule",
"Lua script that returns boolean function to check if this task "
- "should be considered when learning fuzzy storage",
+ "should be considered when learning fuzzy storage",
"learn_condition",
UCL_STRING,
NULL,
+ 0,
+ NULL,
0);
rspamd_rcl_add_doc_by_path (cfg,
"fuzzy_check.rule",
@@ -677,6 +723,8 @@ fuzzy_check_module_init (struct rspamd_config *cfg, struct module_ctx **ctx)
"fuzzy_map",
UCL_OBJECT,
NULL,
+ 0,
+ NULL,
0);
/* Fuzzy map doc strings */
rspamd_rcl_add_doc_by_path (cfg,
@@ -685,6 +733,8 @@ fuzzy_check_module_init (struct rspamd_config *cfg, struct module_ctx **ctx)
"max_score",
UCL_INT,
NULL,
+ 0,
+ NULL,
0);
rspamd_rcl_add_doc_by_path (cfg,
"fuzzy_check.rule.fuzzy_map",
@@ -692,6 +742,8 @@ fuzzy_check_module_init (struct rspamd_config *cfg, struct module_ctx **ctx)
"flag",
UCL_INT,
NULL,
+ 0,
+ NULL,
0);
return 0;
diff --git a/src/plugins/regexp.c b/src/plugins/regexp.c
index ddabe672e..566136bf0 100644
--- a/src/plugins/regexp.c
+++ b/src/plugins/regexp.c
@@ -102,9 +102,15 @@ regexp_module_init (struct rspamd_config *cfg, struct module_ctx **ctx)
*ctx = (struct module_ctx *)regexp_module_ctx;
- rspamd_rcl_add_doc_by_path (cfg, NULL,
+ rspamd_rcl_add_doc_by_path (cfg,
+ NULL,
"Regular expressions rules plugin",
- "regexp", UCL_OBJECT, NULL, 0);
+ "regexp",
+ UCL_OBJECT,
+ NULL,
+ 0,
+ NULL,
+ 0);
rspamd_rcl_add_doc_by_path (cfg,
"regexp",
@@ -112,6 +118,8 @@ regexp_module_init (struct rspamd_config *cfg, struct module_ctx **ctx)
"max_size",
UCL_INT,
NULL,
+ 0,
+ NULL,
0);
return 0;
diff --git a/src/plugins/spf.c b/src/plugins/spf.c
index 200270b11..d7f1031c7 100644
--- a/src/plugins/spf.c
+++ b/src/plugins/spf.c
@@ -97,25 +97,51 @@ spf_module_init (struct rspamd_config *cfg, struct module_ctx **ctx)
*ctx = (struct module_ctx *)spf_module_ctx;
- rspamd_rcl_add_doc_by_path (cfg, NULL,
+ rspamd_rcl_add_doc_by_path (cfg,
+ NULL,
"SPF check plugin",
- "spf", UCL_OBJECT, NULL, 0);
+ "spf",
+ UCL_OBJECT,
+ NULL,
+ 0,
+ NULL,
+ 0);
- rspamd_rcl_add_doc_by_path (cfg, "spf",
+ rspamd_rcl_add_doc_by_path (cfg,
+ "spf",
"Map of IP addresses that should be excluded from SPF checks (in addition to `local_networks`)",
- "whitelist", UCL_STRING, NULL, 0);
- rspamd_rcl_add_doc_by_path (cfg, "spf",
+ "whitelist",
+ UCL_STRING,
+ NULL,
+ 0,
+ NULL,
+ 0);
+ rspamd_rcl_add_doc_by_path (cfg,
+ "spf",
"Symbol that is added if SPF check is successful",
- "symbol_allow", UCL_STRING, NULL, 0);
- rspamd_rcl_add_doc_by_path (cfg, "spf",
+ "symbol_allow",
+ UCL_STRING,
+ NULL,
+ 0,
+ NULL,
+ 0);
+ rspamd_rcl_add_doc_by_path (cfg,
+ "spf",
"Symbol that is added if SPF policy is set to 'deny'",
- "symbol_fail", UCL_STRING, NULL, 0);
+ "symbol_fail",
+ UCL_STRING,
+ NULL,
+ 0,
+ NULL,
+ 0);
rspamd_rcl_add_doc_by_path (cfg,
"spf",
"Symbol that is added if SPF policy is set to 'undefined'",
"symbol_softfail",
UCL_STRING,
NULL,
+ 0,
+ NULL,
0);
rspamd_rcl_add_doc_by_path (cfg,
"spf",
@@ -123,13 +149,27 @@ spf_module_init (struct rspamd_config *cfg, struct module_ctx **ctx)
"symbol_neutral",
UCL_STRING,
NULL,
+ 0,
+ NULL,
0);
- rspamd_rcl_add_doc_by_path (cfg, "spf",
+ rspamd_rcl_add_doc_by_path (cfg,
+ "spf",
"Size of SPF parsed records cache",
- "spf_cache_size", UCL_INT, NULL, 0);
- rspamd_rcl_add_doc_by_path (cfg, "spf",
+ "spf_cache_size",
+ UCL_INT,
+ NULL,
+ 0,
+ NULL,
+ 0);
+ rspamd_rcl_add_doc_by_path (cfg,
+ "spf",
"Maximum lifetime for the elements in the SPF cache",
- "spf_cache_expire", UCL_TIME, NULL, 0);
+ "spf_cache_expire",
+ UCL_TIME,
+ NULL,
+ 0,
+ NULL,
+ 0);
return 0;
}
diff --git a/src/plugins/surbl.c b/src/plugins/surbl.c
index 1c5e0625b..7572a0df8 100644
--- a/src/plugins/surbl.c
+++ b/src/plugins/surbl.c
@@ -292,52 +292,142 @@ surbl_module_init (struct rspamd_config *cfg, struct module_ctx **ctx)
*ctx = (struct module_ctx *)surbl_module_ctx;
- rspamd_rcl_add_doc_by_path (cfg, NULL,
+ rspamd_rcl_add_doc_by_path (cfg,
+ NULL,
"URL blacklist plugin",
- "surbl", UCL_OBJECT, NULL, 0);
- rspamd_rcl_add_doc_by_path (cfg, "surbl",
+ "surbl",
+ UCL_OBJECT,
+ NULL,
+ 0,
+ NULL,
+ 0);
+ rspamd_rcl_add_doc_by_path (cfg,
+ "surbl",
"List of redirector servers",
- "redirector", UCL_STRING, NULL, 0);
- rspamd_rcl_add_doc_by_path (cfg, "surbl",
+ "redirector",
+ UCL_STRING,
+ NULL,
+ 0,
+ NULL,
+ 0);
+ rspamd_rcl_add_doc_by_path (cfg,
+ "surbl",
"Map of domains that should be checked with redirector",
- "redirector_hosts_map", UCL_STRING, NULL, 0);
- rspamd_rcl_add_doc_by_path (cfg, "surbl",
+ "redirector_hosts_map",
+ UCL_STRING,
+ NULL,
+ 0,
+ NULL,
+ 0);
+ rspamd_rcl_add_doc_by_path (cfg,
+ "surbl",
"Connect timeout for redirector",
- "redirector_connect_timeout", UCL_TIME, NULL, 0);
- rspamd_rcl_add_doc_by_path (cfg, "surbl",
+ "redirector_connect_timeout",
+ UCL_TIME,
+ NULL,
+ 0,
+ NULL,
+ 0);
+ rspamd_rcl_add_doc_by_path (cfg,
+ "surbl",
"Read timeout for redirector",
- "redirector_read_timeout", UCL_TIME, NULL, 0);
- rspamd_rcl_add_doc_by_path (cfg, "surbl",
+ "redirector_read_timeout",
+ UCL_TIME,
+ NULL,
+ 0,
+ NULL,
+ 0);
+ rspamd_rcl_add_doc_by_path (cfg,
+ "surbl",
"Maximum number of URLs to process per message",
- "max_urls", UCL_INT, NULL, 0);
- rspamd_rcl_add_doc_by_path (cfg, "surbl",
+ "max_urls",
+ UCL_INT,
+ NULL,
+ 0,
+ NULL,
+ 0);
+ rspamd_rcl_add_doc_by_path (cfg,
+ "surbl",
"Rules for TLD composition",
- "exceptions", UCL_STRING, NULL, 0);
- rspamd_rcl_add_doc_by_path (cfg, "surbl",
+ "exceptions",
+ UCL_STRING,
+ NULL,
+ 0,
+ NULL,
+ 0);
+ rspamd_rcl_add_doc_by_path (cfg,
+ "surbl",
"Map of whitelisted domains",
- "whitelist", UCL_STRING, NULL, 0);
- rspamd_rcl_add_doc_by_path (cfg, "surbl",
+ "whitelist",
+ UCL_STRING,
+ NULL,
+ 0,
+ NULL,
+ 0);
+ rspamd_rcl_add_doc_by_path (cfg,
+ "surbl",
"URL blacklist rule",
- "rule", UCL_OBJECT, NULL, 0);
+ "rule",
+ UCL_OBJECT,
+ NULL,
+ 0,
+ NULL,
+ 0);
/* Rules doc strings */
- rspamd_rcl_add_doc_by_path (cfg, "surbl.rule",
+ rspamd_rcl_add_doc_by_path (cfg,
+ "surbl.rule",
"Name of DNS black list (e.g. `multi.surbl.com`)",
- "suffix", UCL_STRING, NULL, 0);
- rspamd_rcl_add_doc_by_path (cfg, "surbl.rule",
+ "suffix",
+ UCL_STRING,
+ NULL,
+ 0,
+ NULL,
+ 0);
+ rspamd_rcl_add_doc_by_path (cfg,
+ "surbl.rule",
"Symbol to insert (if no bits or suffixes are defined)",
- "symbol", UCL_STRING, NULL, 0);
- rspamd_rcl_add_doc_by_path (cfg, "surbl.rule",
+ "symbol",
+ UCL_STRING,
+ NULL,
+ 0,
+ NULL,
+ 0);
+ rspamd_rcl_add_doc_by_path (cfg,
+ "surbl.rule",
"Do not try to check URLs with IP address instead of hostname",
- "no_ip", UCL_BOOLEAN, NULL, 0);
- rspamd_rcl_add_doc_by_path (cfg, "surbl.rule",
+ "no_ip",
+ UCL_BOOLEAN,
+ NULL,
+ 0,
+ NULL,
+ 0);
+ rspamd_rcl_add_doc_by_path (cfg,
+ "surbl.rule",
"Resolve URL host and then check against the specified suffix with reversed IP octets",
- "resolve_ip", UCL_BOOLEAN, NULL, 0);
- rspamd_rcl_add_doc_by_path (cfg, "surbl.rule",
+ "resolve_ip",
+ UCL_BOOLEAN,
+ NULL,
+ 0,
+ NULL,
+ 0);
+ rspamd_rcl_add_doc_by_path (cfg,
+ "surbl.rule",
"Parse IP bits in DNS reply, the content is 'symbol = <bit>'",
- "bits", UCL_OBJECT, NULL, 0);
- rspamd_rcl_add_doc_by_path (cfg, "surbl.rule",
+ "bits",
+ UCL_OBJECT,
+ NULL,
+ 0,
+ NULL,
+ 0);
+ rspamd_rcl_add_doc_by_path (cfg,
+ "surbl.rule",
"Parse IP addresses in DNS reply, the content is 'symbol = address'",
- "ips", UCL_OBJECT, NULL, 0);
+ "ips",
+ UCL_OBJECT,
+ NULL,
+ 0,
+ NULL,
+ 0);
return 0;
}