From: Vsevolod Stakhov Date: Wed, 10 Feb 2016 22:01:04 +0000 (+0000) Subject: Add documentation for URLs maps X-Git-Tag: 1.2.0~268 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=2f2ef701313b2dac4f278d6a95daea84ed8e785e;p=rspamd.git Add documentation for URLs maps --- diff --git a/doc/markdown/modules/multimap.md b/doc/markdown/modules/multimap.md index 0154edbf9..2912b923d 100644 --- a/doc/markdown/modules/multimap.md +++ b/doc/markdown/modules/multimap.md @@ -43,15 +43,14 @@ Type attribute means what is matched with this map. The following types are supp * `rcpt` - matches any of envelope rcpt or header `To` if envelope info is missing * `header` - matches any header specified (must have `header = "Header-Name"` configuration attribute) * `dnsbl` - matches source IP against some DNS blacklist (consider using [RBL](rbl.md) module for this) +* `url` - matches URLs in messages against maps -DNS maps has historic support. +DNS maps are legacy and are not encouraged to use in new projects (use [rbl](rbl.md) for that). -Maps can also have a special URL format in style: +Maps can also be specified as [CDB](http://www.corpit.ru/mjt/tinycdb.html) databases which might be useful for large maps: map = "cdb:///path/to/file.cdb"; -which is treated as CDB map by rspamd. - Here is an example configuration of multimap module: To enable pre-filter support, you should specify `action` parameter which can take the @@ -86,6 +85,11 @@ for `header` rules. Filters are specified with `filter` option. Rspamd supports * `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 +URL maps allows another set of filters (by default, url maps are matched using hostname part): + +* `tld` - matches TLD (top level domain) part of urls +* `full` - matches the complete URL not the hostname +* `is_phished` - matches hostname but if and only if the URL is phished (e.g. pretended to be from another domain) Here are some examples of pre-filter configurations: @@ -104,4 +108,10 @@ sender_from_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"; +} ~~~ \ No newline at end of file