| 1 |
rspamd_config.MAGIC_SYM = { |
| 2 |
callback = function(task) |
| 3 |
local parts = task:get_parts() |
| 4 |
|
| 5 |
for i,p in ipairs(parts) do |
| 6 |
local ext = p:get_detected_ext() |
| 7 |
|
| 8 |
if ext then |
| 9 |
task:insert_result('MAGIC_SYM_' .. ext:upper() .. '_' .. tostring(i), 1.0) |
| 10 |
end |
| 11 |
end |
| 12 |
end, |
| 13 |
type = 'callback' |
| 14 |
} |