martinschaible / rspamd-rules

Curated Multimaps and Rules for Rspamd
Apache License 2.0
13 stars 1 forks source link

Lua script to detect URL also in img-Tags #18

Open martinschaible opened 1 year ago

martinschaible commented 1 year ago

This might be helpful to deal with URL's:

Filename : /etc/rspamd/rspamd.local.lua

local lua_selectors = require "lua_selectors"

lua_selectors.register_extractor(rspamd_config, "all_urls", {
  get_value = function(task, args)
    return task:get_urls(true, true), 'userdata_list'
  end,
  description = 'All URLs',
})

# multimap.conf
type = "selector";
selector = "all_urls;