summaryrefslogtreecommitdiffstats
path: root/rules/parts.lua
blob: 2be9ff85a2acaf071d33aa23198994bc0ac73d8d (plain)
1
2
3
4
5
6
7
8
9
10
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,
}