ratelimit.lua 564 B

1234567891011121314151617
  1. local custom_keywords = {}
  2. custom_keywords.mailcow = function(task)
  3. local rspamd_logger = require "rspamd_logger"
  4. local dyn_rl_symbol = task:get_symbol("DYN_RL")
  5. if dyn_rl_symbol then
  6. local rl_value = dyn_rl_symbol[1].options[1]
  7. local rl_object = dyn_rl_symbol[1].options[2]
  8. if rl_value and rl_object then
  9. rspamd_logger.infox(rspamd_config, "DYN_RL symbol has value %s for object %s, returning %s...", rl_value, rl_object, "rs_dynrl_" .. rl_object)
  10. return "rs_dynrl_" .. rl_object, rl_value
  11. end
  12. end
  13. end
  14. return custom_keywords