aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-03-21 12:40:03 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-03-21 12:40:03 +0000
commitb91c39494e7d77b044a9e2e335a43f43988eb70b (patch)
tree082366040c98ce6cce3872c4057530d5c1e2ddbd /doc
parentcecdbfe4263291748a4102607f5dddf87fc78f15 (diff)
downloadrspamd-b91c39494e7d77b044a9e2e335a43f43988eb70b.tar.gz
rspamd-b91c39494e7d77b044a9e2e335a43f43988eb70b.zip
[Doc] Add mime_types documentation
Diffstat (limited to 'doc')
-rw-r--r--doc/markdown/modules/mime_types.md30
1 files changed, 30 insertions, 0 deletions
diff --git a/doc/markdown/modules/mime_types.md b/doc/markdown/modules/mime_types.md
new file mode 100644
index 000000000..4910fcae9
--- /dev/null
+++ b/doc/markdown/modules/mime_types.md
@@ -0,0 +1,30 @@
+# Rspamd mime types module
+
+This module is intended to do some mime types sanity checks. That includes the following:
+
+1. Checks whether mime type is from the `good` list (e.g. `multipart/alternative` or `text/html`)
+2. Checks if a mime type is from the `bad` list (e.g. `multipart/form-data`)
+3. Checks if an attachement filename extension is different from the intended mime type
+
+## Configuration
+
+`mime_types` module reads mime types map specified in `file` option. This map contains binding
+
+```
+type/subtype score
+```
+
+When score is more than `0` then it is considered as `bad` if it is less than `0` it is considered as `good` (with the corresponding multiplier).
+When mime type is not listed then `MIME_UNKNOWN` symbol is inserted.
+
+`extension_map` option allows to specify map from a known extension to a specific mime type:
+
+~~~ucl
+extension_map = {
+ html = "text/html";
+ txt = "text/plain";
+ pdf = "application/pdf";
+}
+~~~
+
+When an attachement extension matches left part but the content type does not match the right part then symbol `MIME_BAD_ATTACHMENT` is inserted.