aboutsummaryrefslogtreecommitdiffstats
path: root/test/functional/lua/magic.lua
blob: c0d5793d4533c599c35bc73fbb7b918cc4177020 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
rspamd_config.MAGIC_SYM = {
  callback = function(task)
    local parts = task:get_parts()

    for i,p in ipairs(parts) do
      local ext = p:get_detected_ext()

      if ext then
        task:insert_result('MAGIC_SYM_' .. ext:upper() .. '_' .. tostring(i), 1.0)
      end
    end
  end,
  type = 'callback'
}