From 84dee1fa312a90488de799712b5640bd5942a60b Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 28 Jan 2016 14:56:55 +0000 Subject: [PATCH] Document new filters in multimap --- doc/markdown/modules/multimap.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/doc/markdown/modules/multimap.md b/doc/markdown/modules/multimap.md index 06e680bd1..597416143 100644 --- a/doc/markdown/modules/multimap.md +++ b/doc/markdown/modules/multimap.md @@ -44,7 +44,7 @@ Type attribute means what is matched with this map. The following types are supp DNS maps has historic support. Maps can also have a special URL format in style: - + map = "cdb:///path/to/file.cdb"; which is treated as CDB map by rspamd. @@ -54,7 +54,18 @@ Here is an example configuration of multimap module: ~~~nginx multimap { test { type = "ip"; map = "/tmp/ip.map"; symbol = "TESTMAP"; } - spamhaus { type = "dnsbl"; map = "pbl.spamhaus.org"; symbol = "R_IP_PBL"; + spamhaus { type = "dnsbl"; map = "pbl.spamhaus.org"; symbol = "R_IP_PBL"; description = "PBL dns block list"; } # Better use RBL module instead } ~~~ + +### Map filters + +It is also possible to apply a filtering expression before checking value against some map. This is mainly useful +for `header` rules. Filters are specified with `filter` option. Rspamd supports the following filters so far: + +* `email` or `email:addr` - parse header value and extract email address from it (`Somebody ` -> `user@example.com`) +* `email:user` - parse header value as email address and extract user name from it (`Somebody ` -> `user`) +* `email:domain` - parse header value as email address and extract user name from it (`Somebody ` -> `example.com`) +* `email:name` - parse header value as email address and extract displayed name from it (`Somebody ` -> `Somebody`) +* `regexp:/re/` - extracts generic information using the specified regular expression -- 2.39.5