diff options
author | Andrew Lewis <nerf@judo.za.org> | 2023-10-13 17:01:50 +0200 |
---|---|---|
committer | Andrew Lewis <nerf@judo.za.org> | 2023-10-13 17:01:50 +0200 |
commit | c17ffcd4e5853f13a7cb5babd5950b95a546d689 (patch) | |
tree | e2e792e13d39363af44a1f4249fccd26b56e52cf /rules/parts.lua | |
parent | 79edca0b0a716f47cd1ff0d4c4c8911bfd3c2be5 (diff) | |
download | rspamd-c17ffcd4e5853f13a7cb5babd5950b95a546d689.tar.gz rspamd-c17ffcd4e5853f13a7cb5babd5950b95a546d689.zip |
[Rules] Blank spam detection
Diffstat (limited to 'rules/parts.lua')
-rw-r--r-- | rules/parts.lua | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/rules/parts.lua b/rules/parts.lua new file mode 100644 index 000000000..2be9ff85a --- /dev/null +++ b/rules/parts.lua @@ -0,0 +1,11 @@ +rspamd_config.SINGLE_SHORT_PART = { + callback = function(task) + local parts = task:get_parts() + if #parts ~= 1 then return end + local text = parts[1]:get_text() + if not text then return end + if text:get_length() >= 64 then return end + return true + end, + score = 0.0, +} |