diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-03-19 11:22:36 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-03-19 11:22:36 +0000 |
commit | b252d06f3ad200480255adb0beb3bf215cf030e4 (patch) | |
tree | 5b621ad594c6929b1a9b0ae251ae56abea163364 /doc/markdown/modules | |
parent | 99b18d6183aa16afa94154fc4c953fe8c1853eca (diff) | |
download | rspamd-b252d06f3ad200480255adb0beb3bf215cf030e4.tar.gz rspamd-b252d06f3ad200480255adb0beb3bf215cf030e4.zip |
[Doc] Use UCL highlighter instead of nginx
Diffstat (limited to 'doc/markdown/modules')
-rw-r--r-- | doc/markdown/modules/chartable.md | 4 | ||||
-rw-r--r-- | doc/markdown/modules/dmarc.md | 4 | ||||
-rw-r--r-- | doc/markdown/modules/fuzzy_check.md | 8 | ||||
-rw-r--r-- | doc/markdown/modules/index.md | 6 | ||||
-rw-r--r-- | doc/markdown/modules/multimap.md | 49 | ||||
-rw-r--r-- | doc/markdown/modules/once_received.md | 2 | ||||
-rw-r--r-- | doc/markdown/modules/phishing.md | 2 | ||||
-rw-r--r-- | doc/markdown/modules/rbl.md | 4 | ||||
-rw-r--r-- | doc/markdown/modules/spamassassin.md | 2 | ||||
-rw-r--r-- | doc/markdown/modules/spf.md | 4 | ||||
-rw-r--r-- | doc/markdown/modules/surbl.md | 10 | ||||
-rw-r--r-- | doc/markdown/modules/trie.md | 4 | ||||
-rw-r--r-- | doc/markdown/modules/whitelist.md | 4 |
13 files changed, 55 insertions, 48 deletions
diff --git a/doc/markdown/modules/chartable.md b/doc/markdown/modules/chartable.md index f5aa55322..5458427a0 100644 --- a/doc/markdown/modules/chartable.md +++ b/doc/markdown/modules/chartable.md @@ -2,9 +2,9 @@ This module allows to find number of characters from the different [unicode scripts](http://www.unicode.org/reports/tr24/). Finally, it evaluates number of scrips changes, e.g. 'a網絡a' is treated as 2 script changes - from latin to chineese and from chineese back to latin, divided by total number of unicode characters. If the product of this division is higher than threshold then a symbol is inserted. By default threshold is `0.1` meaning that script changes occurrs approximantely for 10% of characters. -~~~nginx +~~~ucl chartable { symbol = "R_CHARSET_MIXED"; threshold = 0.1; } -~~~
\ No newline at end of file +~~~ diff --git a/doc/markdown/modules/dmarc.md b/doc/markdown/modules/dmarc.md index c69fa3015..f71eb6f91 100644 --- a/doc/markdown/modules/dmarc.md +++ b/doc/markdown/modules/dmarc.md @@ -20,7 +20,7 @@ Please mention, that rspamd itself cannot send reports, it merely stores suffici DMARC configuration is very simple: -~~~nginx +~~~ucl dmarc { servers = "localhost:6390"; key_prefix = "dmarc_"; # Keys would have format of dmarc_domain.com @@ -41,4 +41,4 @@ When a message violates DMARC policy, rspamd adds the following information to ` where results are `true` or `false` meaning allow and reject values accordingly. Unixtime and IP are inserted in text form. Keys are therefore `lists` in redis terminology. -Keys are inserted to redis servers when a server is selected by hash value from sender's domain.
\ No newline at end of file +Keys are inserted to redis servers when a server is selected by hash value from sender's domain. diff --git a/doc/markdown/modules/fuzzy_check.md b/doc/markdown/modules/fuzzy_check.md index 4f41a5c04..13e8c6878 100644 --- a/doc/markdown/modules/fuzzy_check.md +++ b/doc/markdown/modules/fuzzy_check.md @@ -37,7 +37,7 @@ Fuzzy rules are defined as a set of `rule` definitions. Each `rule` must have se list to check or learn and a set of flags and optional parameters. Here is an example of rule's settings: -~~~nginx +~~~ucl fuzzy_check { rule { # List of servers, can be an array or multi-value item @@ -75,7 +75,7 @@ Each rule can have several maps defined by a `flag` value. For example, a single fuzzy storage can contain both good and bad hashes that should have different symbols and thus different weights. Maps are defined inside fuzzy rules as following: -~~~nginx +~~~ucl fuzzy_check { rule { ... @@ -108,7 +108,7 @@ if the weight of hash is `100` and `max_score` will be `99`, then the rule will added with the weight of `1`. If `max_score` is `200`, then the rule will be added with the weight likely `0.2` (the real function is hyperbolic tangent). In the following configuration: -~~~nginx +~~~ucl metric { name = "default"; ... @@ -160,4 +160,4 @@ or delete hashes: rspamc -f <flag> fuzzy_del ... On learning, rspamd sends commands to **all** servers inside specific rule. On check, -rspamd selects a server in round-robin matter.
\ No newline at end of file +rspamd selects a server in round-robin matter. diff --git a/doc/markdown/modules/index.md b/doc/markdown/modules/index.md index 4824f66a1..19af30565 100644 --- a/doc/markdown/modules/index.md +++ b/doc/markdown/modules/index.md @@ -14,7 +14,7 @@ to the main rspamd code. C modules are defined in the `options` section of rspam configuration. If no `filters` attribute is defined then all modules are disabled. The default configuration enables all modules explicitly: -~~~nginx +~~~ucl filters = "chartable,dkim,spf,surbl,regexp,fuzzy_check"; ~~~ @@ -37,7 +37,7 @@ reconfiguration. Should you want to write a lua module consult with the [Lua API documentation](../lua/). To define path to lua modules there is a special section named `modules` in rspamd: -~~~nginx +~~~ucl modules { path = "/path/to/dir/"; path = "/path/to/module.lua"; @@ -62,4 +62,4 @@ and performs some additional checks for such messages. - [phishing](phishing.md) - detects messages with phished URLs. - [ratelimit](ratelimit.md) - implements leaked bucket algorithm for ratelimiting and uses `redis` to store data. -- [trie](trie.md) - uses suffix trie for extra-fast patterns lookup in messages.
\ No newline at end of file +- [trie](trie.md) - uses suffix trie for extra-fast patterns lookup in messages. diff --git a/doc/markdown/modules/multimap.md b/doc/markdown/modules/multimap.md index db49cc831..290df9e49 100644 --- a/doc/markdown/modules/multimap.md +++ b/doc/markdown/modules/multimap.md @@ -65,7 +65,7 @@ following values: No filters will be processed for a message if such a map matches. -~~~nginx +~~~ucl multimap { test { type = "ip"; map = "/tmp/ip.map"; symbol = "TESTMAP"; } spamhaus { type = "dnsbl"; map = "pbl.spamhaus.org"; symbol = "R_IP_PBL"; @@ -107,31 +107,38 @@ Filename maps support this filters set: Here are some examples of pre-filter configurations: -~~~nginx +~~~ucl sender_from_whitelist_user { - type = "from"; - filter = "email:user"; - map = "file:///tmp/from.map"; - symbol = "SENDER_FROM_WHITELIST_USER"; - action = "accept"; # Prefilter mode + type = "from"; + filter = "email:user"; + map = "file:///tmp/from.map"; + symbol = "SENDER_FROM_WHITELIST_USER"; + action = "accept"; # Prefilter mode } sender_from_regexp { - type = "header"; - header = "from"; - filter = "regexp:/.*@/"; - map = "file:///tmp/from_re.map"; - symbol = "SENDER_FROM_REGEXP"; + type = "header"; + header = "from"; + filter = "regexp:/.*@/"; + map = "file:///tmp/from_re.map"; + symbol = "SENDER_FROM_REGEXP"; } url_map { - type = "url"; - filter = "tld"; - map = "file:///tmp/url.map"; - symbol = "URL_MAP"; + type = "url"; + filter = "tld"; + map = "file:///tmp/url.map"; + symbol = "URL_MAP"; } url_tld_re { - type = "url"; - filter = "tld:regexp:/\.[^.]+$/"; # Extracts the last component of URL - map = "file:///tmp/url.map"; - symbol = "URL_MAP_RE"; + type = "url"; + filter = "tld:regexp:/\.[^.]+$/"; # Extracts the last component of URL + map = "file:///tmp/url.map"; + symbol = "URL_MAP_RE"; } -~~~
\ No newline at end of file +filename_blacklist { + type = "filename"; + filter = "extension"; + map = "/${LOCAL_CONFDIR}/filename.map"; + symbol = "FILENAME_BLACKLISTED"; + action = "reject"; +} +~~~ diff --git a/doc/markdown/modules/once_received.md b/doc/markdown/modules/once_received.md index 398ce1cb1..cb91522a5 100644 --- a/doc/markdown/modules/once_received.md +++ b/doc/markdown/modules/once_received.md @@ -8,7 +8,7 @@ The configuration of this module is pretty straightforward: specify `symbol` for ## Example -~~~nginx +~~~ucl once_received { good_host = "^mail"; bad_host = "static"; diff --git a/doc/markdown/modules/phishing.md b/doc/markdown/modules/phishing.md index 8d742a9a1..4f6d86159 100644 --- a/doc/markdown/modules/phishing.md +++ b/doc/markdown/modules/phishing.md @@ -24,7 +24,7 @@ And the following URLs are considered as phished: Here is an example of full module configuration. -~~~nginx +~~~ucl phishing { symbol = "R_PHISHING"; # Default symbol diff --git a/doc/markdown/modules/rbl.md b/doc/markdown/modules/rbl.md index 24bd3532b..b7e73a1d1 100644 --- a/doc/markdown/modules/rbl.md +++ b/doc/markdown/modules/rbl.md @@ -4,7 +4,7 @@ The RBL module provides support for checking the IPv4/IPv6 source address of a m Configuration is structured as follows: -~~~nginx +~~~ucl rbl { # default settings defined here rbls { @@ -89,7 +89,7 @@ Can be set to a URL of a list of IPv4/IPv6 addresses & subnets not to be conside RBL-specific subsection is structured as follows: -~~~nginx +~~~ucl # Descriptive name of RBL or symbol if symbol is not defined. an_rbl { # Explicitly defined symbol diff --git a/doc/markdown/modules/spamassassin.md b/doc/markdown/modules/spamassassin.md index f41af3141..ca585241f 100644 --- a/doc/markdown/modules/spamassassin.md +++ b/doc/markdown/modules/spamassassin.md @@ -10,7 +10,7 @@ of spamassassin rules natively within rspamd. The configuration of this plugin is very simple: just glue all your SA rules into a single file and feed it to spamassassin module: -~~~nginx +~~~ucl spamassassin { ruleset = "/path/to/file"; # Limit search size to 100 kilobytes for all regular expressions diff --git a/doc/markdown/modules/spf.md b/doc/markdown/modules/spf.md index d858a7af3..281cd91b4 100644 --- a/doc/markdown/modules/spf.md +++ b/doc/markdown/modules/spf.md @@ -24,11 +24,11 @@ lifetimes is accordingly limited by the matching DNS record time to live. You can manually specify the size of this cache by configuring SPF module: -~~~nginx +~~~ucl spf { spf_cache_size = 1k; # cache up to 1000 of the most recent SPF records } ~~~ Currently, rspamd supports the full set of SPF elements, macroes and has internal -protection from DNS recursion.
\ No newline at end of file +protection from DNS recursion. diff --git a/doc/markdown/modules/surbl.md b/doc/markdown/modules/surbl.md index 84f43b8c0..ec39a6c7d 100644 --- a/doc/markdown/modules/surbl.md +++ b/doc/markdown/modules/surbl.md @@ -14,7 +14,7 @@ a specific sort of license. Nonetheless, they can be used by personal services or low volume requests free of charge. -~~~nginx +~~~ucl surbl { # List of domains that are not checked by surbl whitelist = "file://$CONFDIR/surbl-whitelist.inc"; @@ -81,7 +81,7 @@ it is possible to specify either `bit` or `ips` sections. Since some URL lists do not accept `IP` addresses, it is also possible to disable sending of URLs with IP address in the host to such lists. That could be done by specifying `noip = true` option: -~~~nginx +~~~ucl rule { suffix = "dbl.spamhaus.org"; symbol = "DBL"; @@ -92,7 +92,7 @@ Since some URL lists do not accept `IP` addresses, it is also possible to disabl It is also possible to check HTML images URLs using URL blacklists. Just specify `images = true` for such list and you are done: -~~~nginx +~~~ucl rule { suffix = "uribl.rambler.ru"; # Also check images @@ -172,7 +172,7 @@ In general this procedure could be represented as following: For example, [SBL list](https://www.spamhaus.org/sbl/) of `spamhaus` project provides such functions using `ZEN` multi list. This is included in rspamd default configuration: -~~~nginx +~~~ucl rule { suffix = "zen.spamhaus.org"; symbol = "ZEN_URIBL"; @@ -181,4 +181,4 @@ For example, [SBL list](https://www.spamhaus.org/sbl/) of `spamhaus` project pro URIBL_SBL = "127.0.0.2"; } } -~~~
\ No newline at end of file +~~~ diff --git a/doc/markdown/modules/trie.md b/doc/markdown/modules/trie.md index 997f4d0df..18e9f6808 100644 --- a/doc/markdown/modules/trie.md +++ b/doc/markdown/modules/trie.md @@ -10,7 +10,7 @@ This module provides a convenient interface to the search trie structure. Here is an example of trie configuration: -~~~nginx +~~~ucl trie { # Each subsection defines a single rule with associated symbol SYMBOL1 { @@ -36,4 +36,4 @@ Despite of the fact that aho-corasic trie is very fast, it supports merely plain strings. Moreover, it cannot distinguish words boundaries, for example, a string `test` will be found in texts `test`, `tests` or even `123testing`. Therefore, it might be used to search some concrete and relatively specific patterns and should -not be used for words match.
\ No newline at end of file +not be used for words match. diff --git a/doc/markdown/modules/whitelist.md b/doc/markdown/modules/whitelist.md index 403f103c3..ec4671e58 100644 --- a/doc/markdown/modules/whitelist.md +++ b/doc/markdown/modules/whitelist.md @@ -43,7 +43,7 @@ or if using map: ## Configuration example -~~~nginx +~~~ucl whitelist { rules { WHITELIST_SPF = { @@ -83,4 +83,4 @@ whitelist { } ~~~ -Rspamd also comes with a set of pre-defined whitelisted domains that could be useful for start.
\ No newline at end of file +Rspamd also comes with a set of pre-defined whitelisted domains that could be useful for start. |