header = 'X-Stat-Signature',
remove = 1,
},
+ ['fuzzy-hashes'] = {
+ header = 'X-Rspamd-Fuzzy',
+ },
},
}
end
routines['spam-header'] = function()
- spam_header('spam-header', settings.routines['spam-header'].header, settings.routines['spam-header'].value, settings.routines['spam-header'].remove)
+ spam_header('spam-header',
+ settings.routines['spam-header'].header,
+ settings.routines['spam-header'].value,
+ settings.routines['spam-header'].remove)
end
routines['remove-spam-flag'] = function()
end
end
+ routines['fuzzy-hashes'] = function()
+ local res = task:get_mempool():get_variable("fuzzy_hashes", "fstrings")
+
+ if res and #res > 0 then
+ for _,h in ipairs(res) do
+ add_header(add[settings.routines['fuzzy-hashes'].header], h)
+ end
+ end
+ end
+
for _, n in ipairs(active_routines) do
local ok, err
if custom_routines[n] then