aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-05-20 11:16:49 +0300
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-05-20 11:16:49 +0300
commit8b7681636df8dc0e3643f3a2ee458d654e6f3046 (patch)
tree5234a3f08d5de81f1ac1da7dfd0d0cbd5e069be6 /doc
parent512fa656a3aa4588aafd5b0cd12bdf075d4fcd70 (diff)
downloadrspamd-8b7681636df8dc0e3643f3a2ee458d654e6f3046.tar.gz
rspamd-8b7681636df8dc0e3643f3a2ee458d654e6f3046.zip
[Doc] Update multimap documentation
Diffstat (limited to 'doc')
-rw-r--r--doc/markdown/modules/multimap.md20
1 files changed, 19 insertions, 1 deletions
diff --git a/doc/markdown/modules/multimap.md b/doc/markdown/modules/multimap.md
index 290df9e49..cede3bc94 100644
--- a/doc/markdown/modules/multimap.md
+++ b/doc/markdown/modules/multimap.md
@@ -22,6 +22,7 @@ Multimap module allows to build rules based on the dynamic maps content. Rspamd
map types in this module:
* `hash map` - a list of domains or `user@domain`
+* `regexp map` - a list of regular expressions
* `ip map` - an effective radix trie of `ip/mask` values (supports both IPv4 and IPv6 addresses)
* `cdb` - constant database format (files only)
@@ -36,6 +37,8 @@ The module itself contains a set of rules in form:
symbol { type = type; map = uri; [optional params] }
+### Map types
+
Type attribute means what is matched with this map. The following types are supported:
* `ip` - matches source IP of message (radix map)
@@ -52,7 +55,7 @@ Maps can also be specified as [CDB](http://www.corpit.ru/mjt/tinycdb.html) datab
map = "cdb:///path/to/file.cdb";
-Here is an example configuration of multimap module:
+### Pre-filter maps
To enable pre-filter support, you should specify `action` parameter which can take the
following values:
@@ -73,13 +76,28 @@ multimap {
}
~~~
+### Regexp maps
+
+
All maps but `ip` and `dnsbl` support `regexp` mode. In this mode, all keys in maps are treated as regular expressions, for example:
/example\d+\.com/i
/other\d+\.com/i test
+ # Comments are still enabled
For performance considerations, use only expressions supported by [hyperscan](http://01org.github.io/hyperscan/dev-reference/compilation.html#pattern-support) as this engine provides blazing performance at no additional cost. Currently, there is no way to distinguish what particular regexp was matched in case if multiple regexp were matched.
+To enable regexp mode, you should set `regexp` option to `true`:
+
+~~~ucl
+sender_from_whitelist_user {
+ type = "from";
+ map = "file:///tmp/from.map";
+ symbol = "SENDER_FROM_WHITELIST";
+ regexp = true;
+}
+~~~
+
### Map filters
It is also possible to apply a filtering expression before checking value against some map. This is mainly useful